---
title: "Merfolk for Agents"
description: "Bring diagram work into the workflow your team already uses."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.merfolk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Merfolk for Agents

## 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](https://llmstxt.org). Agents can fetch this once to discover all available documentation.
- **`.md` alternates** — every page is available as plain Markdown by appending `.md` to the URL. For example: `https://docs.merfolk.io/cli/diagrams/list.md`

## Getting started as an agent

1. Start with a diagram task: map a process, explain a system, or update a known workflow.
2. Fetch `/llms.txt` to discover available documentation.
3. Install skills with `merfolk skills install` to teach your agent the CLI conventions.
4. Use `--json` on every command for structured output.
5. 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 `error` key
- Exits with a non-zero code on failure

This makes it safe to pipe output and check exit codes.

## Next steps

- [Skills overview](/agents/skills) — what the bundled skills teach
- [Agent integration](/agents/integration) — concrete examples with Claude Code, OpenCode, and Codex

Source: https://docs.merfolk.io/agents/overview/index.mdx
