principia-ai/WriteHERE
Recursive planning for long-form fiction and technical reports
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
WriteHERE is a Python writing agent that alternates between decomposing a task and executing subtasks. Instead of fixing a complete outline before drafting, it can use results from retrieval, reasoning, and composition to decide what to do next. recursive/engine.py is the entrypoint, graph.py represents the task graph, and memory.py and cache.py separate memory and caching concerns.
The code layout puts agent logic and prompts in recursive/agent/, execution modules in recursive/executor/, and model integrations in recursive/llm/. The optional React UI runs alongside a Flask backend launched via backend/server.py. Dependencies include Flask-SocketIO, DuckDuckGo search, Trafilatura, and LangChain text splitters. These establish available libraries, not a guaranteed transport, retrieval pipeline, or stable plugin API.
Key Capabilities & Differentiators
The CLI supports --mode story for fiction and --mode report for technical reports. The sample commands pair test_data/meta_fiction.jsonl with gpt-4o and test_data/qa_test.jsonl with claude-3-sonnet. Both specify a JSONL output path and an independent completion marker through --output-filename and --done-flag-file. Treat the model IDs as example configurations, not guarantees of current provider availability.
The visualization shows task hierarchy, task type, and ready, in-progress, and completed states. That helps operators see where work is happening; it does not expose a model's private reasoning or prove a report's sources are correct. Report search setup lists a SerpAPI key, while the manifest also includes a DuckDuckGo library. The manifest lists Google Generative AI and boto3 as well, but does not establish runnable Gemini or Bedrock configurations.
Trade-offs & Limitations
Recursive planning is useful when an initial outline would lock in decisions before research or drafting reveals what is missing. In return, the number and order of subtasks are less predictable than in an outline-first pipeline. When subtasks invoke models or search services, that variability affects latency and cost. Test representative story and report jobs before budgeting; no numerical benchmark, per-job cost, or runtime bound is established here.
Use the CLI when batch output is sufficient and add the UI when someone needs to inspect task progress. The visualized task graph is not a substitute for checking factual accuracy or citations. Deployment also needs two independent checks: validate the dependency stack, which pins Flask 2.0.1 and Werkzeug 2.0.3, and resolve the licensing discrepancy. The README names MIT, but the referenced LICENSE is not visible in the root tree and metadata lists the license as unspecified.
Hardware & Deployment Guide
The CLI setup uses a Python virtual environment, pip install -v -e ., and credentials in recursive/api_key.env. The optional browser UI adds Node.js and can be launched with setup_env.sh followed by start.sh, defaulting to backend port 5001 and frontend port 3000. run_with_anaconda.sh provides another environment setup path. The stated minimums are Python 3.6+ and Node.js 14+; verify current dependency resolution instead of assuming those minimums still work.
Self-hosting runs the orchestration and UI on your infrastructure; it does not make hosted model or search calls offline. No local inference or GPU/CUDA requirement is established for the documented path. Size the host for concurrent Python jobs and retrieval, plus the web stack if enabled. No container manifest or tagged release is shown, so pin the revision you test and treat the provided launch commands as local setup, not a production deployment specification.
Research teams and developers prototyping long-form workflows in which retrieval and drafting can reshape the task plan, with either JSONL batch output or a live task view.
You need verified offline inference, fixed per-job budgets, publication-ready source verification, or cleared commercial licensing before deployment.
Quick Start & Installation
python -m venv venv source venv/bin/activate pip install -v -e . # Create api_key.env file based on example cp recursive/api_key.env.example recursive/api_key.env # Edit the file to add your keys nano recursive/api_key.env
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| WriteHERE ★ | 979 | +3 | Python | — | Recursive planning for long-form fiction and technical reports |
| deer-flow | 86.1k | +257 | Python | MIT | Self-hosted LangGraph agent runtime for long-running research, coding, and conte |
| dify | 162.4k | +370 | Python | — | Visual workflow and RAG workspace for building and serving LLM apps |
| BettaFish | 42.8k | +59 | Python | GPL-2.0 | Self-hosted multi-agent research for public-opinion analysis and reporting |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/principia-ai/WriteHERE.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about WriteHERE
How do I integrate WriteHERE into a batch pipeline without running the UI?
recursive/engine.py from the recursive/ directory with --filename, --output-filename, --done-flag-file, --model, and --mode. The examples use JSONL inputs and outputs and a separate completion marker. Start with the matching sample in test_data/; the Flask and React services are not needed for this path.Do I need a GPU, and how should I size the host?
Can I self-host it for commercial work or process confidential documents?
When is it a better fit than an outline-first writing pipeline?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy