Skip to main content

Build workforce with Claude Code

You already tell Claude Code what software to build. Plug Docana in and you can tell it what employees to build: "an agent that triages support tickets, answers the routine ones from our knowledge, and hands urgent ones to a human."

Claude Code designs the agent in Docana, validates it, imports it, and verifies it works, while you watch and steer. Minutes later the agent is real, and you can talk to it, test it, and put it in front of users.

1. Plug Docana in

In Claude Code, it's one command, then /mcp to sign in with your Docana account:

claude mcp add --transport http docana https://mcp.docana.com/mcp

In the Claude desktop app or claude.ai, open Settings → Connectors, click Add custom connector, and paste the same URL: https://mcp.docana.com/mcp. Docana appears in your connector list; click Connect and sign in.

Cursor and other MCP clients work too. The Docana MCP page has the setup for each.

2. Describe the employee

Now just ask. Paste something like this:

Using Docana, build an agent called Ticket Triage for my support application.
It reads incoming tickets, classifies their urgency, answers the routine ones
from our knowledge, and hands urgent ones to a human. Load the build-agent
prompt first, then validate the spec, import it, and verify it.

The build-agent prompt matters: it carries the same agent-design expertise Docana's own builder works with, so Claude Code designs the agent the way Docana would, not the way it guesses. Then it loops on validate until the spec is clean, imports it into your application, and checks the result.

The agent Claude Code created, open in Docana's agent builder with its reasonings and routing visible
The agent Claude Code created, open in Docana's agent builder with its reasonings and routing visible

3. Iterate like a manager

The first version is a starting point. Keep talking:

  • "Make it ask for the order number before answering shipping questions."
  • "It should never promise a refund amount. Route those to a human."
  • "Add a test case that proves urgent tickets get escalated."

Each request becomes a spec change that gets validated and imported the same way.

Because Claude Code also has a terminal, it can run the CLI right there: docana agents diff to show you what changed in agent terms, docana agents eval to prove the behavior holds. Ask for both; that's what keeps confident edits honest. Evals are the guardrail that makes this loop safe to run fast.

4. Put it to work

The agent is already live, and the connection runs both ways: the same conversation that built the employee can put it to work. Ask Claude Code to pass it a question, and it runs the agent right there (through the CLI in its terminal) and relays the answer:

Claude Code invoking the Ticket Triage agent from the conversation and relaying its escalation answer
Claude Code invoking the Ticket Triage agent from the conversation and relaying its escalation answer

Outside the conversation, meet it anywhere:

docana agent <id> open # open it in the platform
docana agent <id> run "We were double-charged on invoice 4812"
The new agent answering a question in the application's assistant chat
The new agent answering a question in the application's assistant chat

From there, it goes wherever the work is: your backend calls it with the execute API, routines run it on a schedule, and channels put it in front of users on the web, WhatsApp, or Slack.

Prefer files? Same workforce, in a repo

For agents that matter long-term, you'll want review and CI. The same conversation works against files: clone the template, open Claude Code in the folder, and it edits specs on disk instead of live in the workspace:

git clone https://github.com/DocanaAI/docana-agent-template.git my-agents
cd my-agents && docana login
claude

The template's AGENTS.md points assistants at docana help ai (the design rules and command list in one page), so they follow the validate → diff → push workflow automatically. You review diffs in pull requests, evals gate the merge, and the two modes compose: build live over MCP to explore, then pull the result into the repo with docana pull when it's worth keeping.

Next steps