draft1 for AI agents
draft1 is agent-ready. An agent can create an account key, generate a diagram, read it back, and iterate on it, without a human touching the dashboard.
Everything an agent needs
| OpenAPI 3.1 spec | https://www.draft1.ai/openapi.json |
| Site summary for LLMs | https://www.draft1.ai/llms.txt |
| MCP server | abdelhadi-azouni/draft1-mcp |
| GitHub Action | abdelhadi-azouni/draft1-diagram-action |
| Full API reference | draft1.ai/docs |
Claude Code, Claude Desktop
claude mcp add draft1 --env DRAFT1_API_KEY=YOUR_KEY \
-- npx -y github:abdelhadi-azouni/draft1-mcp
Cursor, Windsurf, Codex, any MCP client
Add to the client's MCP config:
{
"mcpServers": {
"draft1": {
"command": "npx",
"args": ["-y", "github:abdelhadi-azouni/draft1-mcp"],
"env": { "DRAFT1_API_KEY": "YOUR_KEY" }
}
}
}
Two tools are exposed: generate_diagram and edit_diagram.
CI: diagram your infra on every push
- uses: abdelhadi-azouni/draft1-diagram-action@v1
with:
api-key: ${{ secrets.DRAFT1_API_KEY }}
source: infra/main.tf
Direct HTTP, no SDK needed
POST https://api.app.draft1.ai/api/v1/diagrams
X-API-Key: YOUR_KEY
{"prompt": "describe any system, or paste Terraform / docker-compose / SQL"}
Designed so an agent does not get stuck
- Check budget first.
GET /api/v1/mereports remaining generations, so an agent never blind-spends a turn into a402. - Resume across sessions.
GET /api/v1/diagramslists everything the key has produced, so a diagram is never lost when an id falls out of context. - Read back what you made.
GET /api/v1/diagrams/{id}returns the draw.io XML link, the PNG, and the public share URL. - Iterate in plain English.
PATCHwith an instruction like "add a message queue between the services". - Deterministic errors. 401 for auth, 402 for quota, 404 for a bad id,
each with a plain-English
errorstring.
Free to try
Accounts get 3 free diagrams, no card. Unlimited is $29/month, and there is a one-time $9 pack of 10 if a subscription is overkill. Create a key.