Writ
Give your agent a writ.
Writ turns plain business-language descriptions into portable AI agent specifications — through a friendly interview (for humans) or an MCP server (for other agents). No technical knowledge required.
What it does
Three ways to use it:
- Interactive TUI — a non-technical user runs
writ, answers 5–8 questions, and gets compiled specs. - CLI —
writ compile,writ bundle,writ resolveoperate on saved specs. - MCP server —
writ mcp-serveexposes the whole pipeline to another agent. Agent-to-agent spec authoring.
Writ produces, from any of those three entry points:
- AGENTS.md — human-readable spec (agentskills.io format)
- claude.json — ready for Anthropic Messages API
- openai.json — ready for OpenAI Responses API
- gemini.json — ready for Google Gemini API
- oas.yaml — Open Agent Spec v1
Quickstart
pip install writ-agents
export ANTHROPIC_API_KEY=sk-ant-...
writ
That's it — the TUI launches and guides you through the interview.
CLI
writ # start an interview
writ create # same as `writ`
writ compile spec.json --to claude -o out.json
writ compile spec.json --to agents-md --resolve -o AGENTS.md
writ bundle spec.json -o ./dist --resolve # emit all 5 formats
writ resolve spec.json # list matched connectors
writ doctor # env/config diagnostics
writ config --set-key sk-ant-... # save API key
writ mcp-serve # run as an MCP server
writ version
MCP server — agent-to-agent mode
Writ runs as an MCP server so other agents can build specs without a human in the loop:
writ mcp-serve # stdio transport (default — for Claude Desktop, Cursor, etc.)
writ mcp-serve --transport http
Exposed tools:
| Tool | Purpose |
|---|---|
writ_interview_start(initial_description?) |
Open a session, get the first question |
writ_interview_answer(session_id, answer) |
Reply, get next question or final spec |
writ_one_shot(description) |
Skip the interview — one call, full spec |
writ_resolve_connectors(spec) |
Map business terms → connector catalog |
writ_compile(spec, format) |
Compile to a single target format |
writ_compile_all(spec) |
Compile to all 5 formats at once |
writ_list_connectors() / writ_list_compilers() |
Introspect what's available |
writ_get_session(id) / writ_end_session(id) |
Session lifecycle |
Resources: writ://catalog (connector catalog), writ://schema (Spec JSON schema).
Example Claude Desktop config:
{
"mcpServers": {
"writ": {
"command": "writ",
"args": ["mcp-serve"],
"env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
}
}
}
See examples/mcp_client.py for a scripted agent-to-agent flow.
Example output
After a 6-question interview about a support triage agent, Writ produces:
# Support Triage Bot
> I help you route customer issues to the right team fast.
**Archetype:** triage
## Purpose
Automatically classify and route incoming customer support tickets.
## System Prompt
You are a support triage assistant. When a support email arrives, classify it by urgency (high/medium/low) and department (billing, technical, general). Route high-urgency tickets to the on-call lead via Slack immediately. Never close a ticket without human review.
Architecture
Human via TUI ─┐
CLI commands ──┼─► interview_step (core/step.py) ──► PartialSpec accumulated
MCP server ──┘ │
▼
Connector resolution
│
▼
5 compiled output formats
Every caller (TUI, CLI, MCP) sits on the same interview_step primitive in core/step.py. See docs/ARCHITECTURE.md for the full design.
Requirements
- Python 3.11+
- Anthropic API key
License
MIT. See LICENSE.
Metadata
Release files for writ-agents 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| writ_agents-0.2.1.tar.gz | 141.7 kB | Without provenance | Details for writ_agents-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| writ_agents-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for writ_agents-0.2.1-py3-none-any.whl |
Total release size: 186.0 kB
Release files / writ_agents-0.2.1.tar.gz
| Download URL | writ_agents-0.2.1.tar.gz |
|---|---|
| Size | 141.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e4678df000d87932e9c1d64bbb67cfb148d4d1df7c1c440dc783faf484a089e
|
|
BLAKE2b-256 checksum How to use checksums |
f574c131935ff41601175e437ee29bafbc6f9103900c5bf8d942f293cd86a4bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / writ_agents-0.2.1-py3-none-any.whl
| Download URL | writ_agents-0.2.1-py3-none-any.whl |
|---|---|
| Size | 44.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f4f7f91ab0131de87e80933a0a314419432759274141db1b4cf799ad72387b7
|
|
BLAKE2b-256 checksum How to use checksums |
9f314f82016e75822f863333ab5832bd5f16c7320f5c9b69b19a3a8a2e591be2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for writ-agents 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.