Skip to main content

A self-correcting, autonomous writing system for books and articles (CLI/TUI).

Project description

Writing Agent - a self-correcting, autonomous writing system that turns a topic into a publication-ready manuscript

Docs Python Platforms License

The autonomous long-form writer that argues a thesis and cites real sources - not slop.

One command → a researched, self-critiqued, fact-checked, exported article (or book). Local-first and model-agnostic (any OpenAI-compatible host), on your own key, for cents.

Quickstart · What you get · Examples · Docs ↗


Why it's different

Most AI writing is fluent slop - confident, generic, unsourced. Writing Agent is a pipeline, not a prompt: a durable state machine with a separate critic, an enforced thesis, and claim↔source verification. Every article ships an evidence report - the argument it makes plus every source, ranked by influence. It won't replace a chat when you want to steer every sentence; it replaces the grind of turning a topic into a sourced, non-generic, finished piece. How it works ↗

Try it in 30 seconds

pip install writing-agent                # Python 3.10+ · or: pipx install writing-agent
export OPENROUTER_API_KEY=sk-or-...      # or any OpenAI-compatible host's key - your choice
writing-agent write --abstract "How stoicism applies to modern burnout"

write asks a few questions upfront, then researches, drafts, critiques, verifies, humanizes, and exports the finished file with zero babysitting.

No API key? WRITINGAGENT_FAKE=1 writing-agent write --abstract "test" runs the whole pipeline offline with placeholder output. No terminal? The web demo is a Gradio try-it page you can run from a clone or deploy as a Hugging Face Space. Extras, from-source installs, and host setup: installation guide ↗.

What you get

  • Argues, doesn't just cover - a contestable thesis a separate critic enforces in every section, and a side-by-side judge that picks the strongest of N drafts
  • Real sources, verified - web-grounded research, and each cited claim is checked against its source; unsupported citations are blocked, not shipped
  • Proof, not vibes - the evidence report shows the thesis + every source ranked by influence (0-100), built from the finished piece
  • Any field, any voice - registers (fiction → academic → copy), 46 selectable personas, and emotion targets; the craft engine holds up even on cheap models
  • Self-correcting, optionally self-directing - fixed quality gates by default; an opt-in agentic controller that chooses its own next move when you want it
  • Cheap when you want it - cost_mode: budget targets a finished article for ~$0.10-0.25 depending on the model
  • Durable - plain markdown + JSON on disk; kill a run mid-flight and run resumes exactly where it stopped
  • Ships, not just writes - 6 export formats (pdf · epub · html · docx · txt · md), self-laying-out diagrams, free-licensed or AI-generated images, an on-page SEO audit, a promo pack (X thread, LinkedIn, headlines), and one-paste Copy for Medium / Substack / X

Four ways to use it

Surface What it is
TUI - writing-agent The interactive studio: chat in plain English, slash commands, live run view, 11 themes
CLI - writing-agent <cmd> One-shot commands (write, run, export, seo, promote, ...) for scripting
Dashboard - writing-agent web Local control room on 127.0.0.1:8787 - commission runs, live logs, per-agent cost, evals, memory, copy-to-publish
Web demo - demo/ Standalone Gradio page (:7860) to try or host - free fake-mode preview, or bring a key

There's also an embeddable Python API - see docs ↗.

See real output

Judge it before you install it: examples/ has finished articles with their evidence reports, an A/B pilot against a plain chatbot, and examples/sample-run/ - a complete autonomous book run with every working file the agent produced.

Learn more

Everything else lives in the docs ↗: guides (articles, books, research, exporting), the full command and settings reference, model routing, cost & performance, and the FAQ. The engineering spec is docs/plan.md; the UI system is docs/design.md.

Contributing

git clone https://github.com/vikast908/WritingAgent && cd WritingAgent
pip install -e ".[dev]"
ruff check . && pytest        # the suite runs fully offline - no API key

Issues and PRs welcome - see CONTRIBUTING.md, plus SECURITY.md and the CHANGELOG.

Author

Built and maintained by @vikast908. Questions, ideas, or bugs? Open an issue.

License

MIT.

Model-agnostic · runs on any OpenAI-compatible host · Linux · macOS · Windows

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

writing_agent-0.4.0.tar.gz (510.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

writing_agent-0.4.0-py3-none-any.whl (476.1 kB view details)

Uploaded Python 3

File details

Details for the file writing_agent-0.4.0.tar.gz.

File metadata

  • Download URL: writing_agent-0.4.0.tar.gz
  • Upload date:
  • Size: 510.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for writing_agent-0.4.0.tar.gz
Algorithm Hash digest
SHA256 06aeee7089ac408ad2d7f3a341181a27866bbc9fb590aacd9a7b9745f0e47d12
MD5 dd056ac830c3daf47d191351271ff786
BLAKE2b-256 db369f0575103799fa54c0b0e6582ee037deac0fd42a2cc508c2998bbaa07de1

See more details on using hashes here.

Provenance

The following attestation bundles were made for writing_agent-0.4.0.tar.gz:

Publisher: release.yml on vikast908/WritingAgent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file writing_agent-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: writing_agent-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 476.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for writing_agent-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e719fb3a97611aa19e60e0f99d23b8d837da4c95820d572b6690c911f0df389c
MD5 e2379e5740e0d9d26a7b9a22128b599d
BLAKE2b-256 6b139185864c81594239bb7995acd2e99abb2238d256c52a2e8145ac34812e7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for writing_agent-0.4.0-py3-none-any.whl:

Publisher: release.yml on vikast908/WritingAgent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page