Using the toolkit

Four files change per client. Everything else stays.

The toolkit ships with a working example: an agent that handles customer support triage. It runs end-to-end. When I bring it into a new project, I don't rebuild anything. I edit four files.

1. Tools

templates/mcp-triagem-atendimento/src/index.ts

The example ships with three mocked tools: check order status, check refund policy, escalate to a human. I replace them with the real ones: query the client's CRM, hit their API, write to their database.

Rule: any tool that changes state returns a ticket ID and lets the graph pause for approval. The tool itself never executes the destructive action directly.

2. Model

templates/triagem-atendimento/src/triagem_atendimento/graph.py

One line: the model constructor. Gemini by default because the free tier is enough to test. Swap for Claude, GPT, or anything LangChain supports when the client has a preference or a paid key.

3. Approval routing

templates/triagem-atendimento/src/triagem_atendimento/graph.py

The graph pauses at the approval node. Where the approve/reject decision comes from is the client's call: a button in the web UI, a Slack message with two buttons, a WhatsApp reply, an email link. All of them just resume the graph via the /approve endpoint.

4. Instructions

templates/triagem-atendimento/src/triagem_atendimento/graph.py

A system prompt at the top of the graph state: the agent's role, tone, what it can and can't do, when to escalate. This is where the client's domain knowledge lives.

Running it

# backend
cd templates/triagem-web/api
uv sync
uv run uvicorn api.main:app --port 8000

# frontend (another terminal)
cd templates/triagem-web/web
npm install
npm run dev

Frontend opens at localhost:3000. Backend on 8000. The MCP server for tools is already deployed on Cloudflare Workers, so nothing else needs to run.

Before shipping

The security checklist in the repo lists what to verify per tool (data scope, side effects, credentials). The Promptfoo suite runs against the real agent with deterministic assertions, so it doesn't need a paid judge model. Both are part of every delivery.