Agents in the diagram workflow
Merfolk is designed to fit the agentic workflows teams are building. An agent can help an editor create or update a diagram from working context, while the team reviews the rendered result and comments on what needs to change. Approved editors remain responsible for deciding what becomes the next version.
The agent is part of the workflow around the diagram, not a replacement for the people who understand the work.
Every CLI command that produces output supports --json, returning structured data that agents can parse reliably without screen-scraping.
The docs site itself is machine-consumable:
/llms.txt— a flat index of all pages with their URLs and descriptions, following the llms.txt spec. Agents can fetch this once to discover all available documentation..mdalternates — every page is available as plain Markdown by appending.mdto the URL. For example:https://docs.merfolk.io/cli/diagrams/list.md
Getting started as an agent
- Start with a diagram task: map a process, explain a system, or update a known workflow.
- Fetch
/llms.txtto discover available documentation. - Install skills with
merfolk skills installto teach your agent the CLI conventions. - Use
--jsonon every command for structured output. - Share the result in the web app so the people who know the work can review it.
The --json contract
When --json is passed, the CLI:
- Prints valid JSON to stdout
- Prints errors as JSON to stderr with an
errorkey - Exits with a non-zero code on failure
This makes it safe to pipe output and check exit codes.
Next steps
- Skills overview — what the bundled skills teach
- Agent integration — concrete examples with Claude Code, OpenCode, and Codex