Describe your agents
Send Runtype an agent map of the agents in your repository and the business context that custom signals and simulations use to score conversations. You can complete every step on this page through your coding agent on the Runtype Connect MCP server or with the runtype-connect CLI. If you signed up without a browser, every step works before you claim the organization with npx @runtypelabs/connect claim.
Before you begin
You need the following:
- A connected repository with a first trace that passed its check. If you haven’t set up tracing, see Connect a repository and Send a first trace.
- The Runtype Connect MCP server added to your coding agent, or the
runtype-connectCLI signed in. For setup steps, see Connect your coding agent.
Send the agent map
After your first trace passes, ask your coding agent to call get_status. It returns next set to describe_agents and your productId.
Ask your coding agent to inspect the repository and call describe_agents with productId and an agents list containing one entry per agent:
- Name and role: the exact
namefromgen_ai.agent.name, arole, andentryPointset totruefor the agent that receives the user message first. - Prompt and tools: the system
prompttext and each tool’sname,description, andinputSchemacopied verbatim, withsourcefile and line locations. - Handoffs: other agents in the same map that this agent transfers control to, listed in
handsOffTo. - Surfaces: one
surfacesentry per channel people use to reach the agent. Each entry takes atype(such aschat,slack,sms,email,api, orwebhook) and an optionalnote, for example the provider. - Non-production endpoints: optional
endpointswhere the agent or its MCP servers run outside production. Runtype records them without contacting them so you can later check simulation results against your real agent.
The following JSON shows an example describe_agents input for one agent with one tool and one surface:
Replace YOUR_PRODUCT_ID with the productId from get_status.
To send the map from the command line, pass the JSON file to describe-agents:
The agent map is separate from .runtype/agents.yaml, which tells npx @runtypelabs/connect relay how to start and reach an agent on your computer. For details, see Agent manifest.
Each name matches the agent that Runtype created from your traces. A name without traces creates an agent, with no observed profile or simulation until production traces arrive.
Sending an unchanged map stores nothing. A changed map becomes the next version. Resend the map only when agents, prompts, or tools change in code.
If a map exceeds a size limit or contains credentials in endpoints, Runtype refuses the whole map and stores nothing. For the size limits and refusal codes, see Troubleshooting.
How declared surfaces affect simulations
Runtype tests your agent with a simulation copy built from production traces (the copy). When an agent declares slack, telegram, sms, or imessage in surfaces, simulations of the copy format and split each reply for that channel. Runtype sets up no integration and sends no messages.
Declare the channel before you start the baseline simulation. If an agent declares more than one of those channels, simulations use the first in this order: slack, telegram, sms, imessage. In the simulation report, conversations from the copy show a tab named for the channel (Slack, Telegram, SMS, or iMessage) next to Conversation.
Draft and save business context
After describe_agents stores the agent map, get_status sets next to save_business_context. Ask your coding agent to draft business facts from the repository and save them with save_business_context, passing the same productId. Confirmed success and failure criteria become the basis for custom signals and for simulation scenarios.
Each fact has a field, a value, and a source. The field value must be one of the following:
product: what the product is.users: who uses the product.agent_placement: where the agent sits in the product.interaction: how conversations run on the agent’s channels (the channels themselves go indescribe_agentsundersurfaces).success_criterion: what a good conversation looks like (save one fact per criterion).failure_criterion: what a bad conversation looks like (save one fact per criterion).other: anything else that the agent’s work depends on.
Each fact also records its source with a kind and, for code or traces, a ref:
repo: read from the codebase, with a file path and optional line number inref.trace: seen in traces, with a trace or run ID inref.user: told directly by you, with an optionalref.
Runtype stores the facts as unconfirmed drafts until you review them. Saving the same fact again adds nothing.
Confirm the business context
When save_business_context stores facts, Runtype opens or updates a confirm_business_context pending action with every unconfirmed fact in payload.facts and its IDs in payload.factIds. The save response and get_status both carry it.
Your coding agent doesn’t stop for this confirmation. Right after the save, it asks you one question: which problem the first simulation should test. It offers the failure_criterion facts it drafted, the recommended one first, plus a free-text answer. When you pick one, it confirms only that fact, with that fact’s ID in factIds. If you don’t answer, it leaves the action open and goes ahead with the recommended problem. It shows the remaining facts with the first simulation report.
To review and record your decision on the remaining facts, follow these steps:
- Read the drafted facts that your coding agent shows you from
payload.facts. Your coding agent must ask for your answer and never confirms business context on its own. - Tell your coding agent which facts to accept, edit, add, or reject, or tell it to dismiss the confirmation.
- Have your coding agent call
resolve_pending_actionwith the action’sidinactionIdand your decision inresolution:- To confirm facts, pass
resolution: "confirm"and the IDs of the facts shown to you infactIds. Runtype confirms only the facts that you were shown. - To send corrections, pass
edits(accepted only withconfirm) containingchanges([{ factId, value }]),additions([{ field, value }]), orrejections(fact IDs). Runtype confirms every remaining fact infactIdsas drafted. Rejected facts stay rejected, so a later save doesn’t bring them back. - To skip review, pass
resolution: "dismiss". Runtype closes the action, leaves the facts unconfirmed, and blocks no onboarding step.
- To confirm facts, pass
To confirm business context from the command line, run resolve-pending-action with the action ID and fact IDs:
Replace the following:
YOUR_ACTION_ID: theidof theconfirm_business_contextpending action fromget_statusorsave_business_context.YOUR_FACT_ID: each fact ID frompayload.factIdsthat you reviewed.
Repeating the same answer on a closed action is safe.
Unconfirmed facts block no onboarding step, and scenario mining falls back to unconfirmed facts when none are confirmed: every unconfirmed success_criterion, and only the first failure_criterion saved, which is the recommended problem. The save_signal tool requires every fact in sourceFactIds to be confirmed and from the same product. If you plan to check a shipped change against production, confirm your success and failure criteria. A yes-or-no custom signal that cites confirmed criteria of one kind can decide that comparison.
Other pending actions, such as approving a simulation’s cost, appear in the same pendingActions list. For all pending action kinds and resolutions, see Connect MCP tools.
Verify your agent map and business context
Run get_status from your coding agent or with the CLI to confirm that Runtype stored both pieces of context:
Check the output for the following:
nextpoints tostart_baseline_simulation, or to a later step if you already ran the first simulation.pendingActionsno longer listsconfirm_business_context.
To inspect what the current agent map declares for one agent, ask your coding agent to call get_agent_profile with the agent’s name or ID.
When production disagrees with your description
When production traces disagree with your declared agent map, production wins.
Runtype builds each agent’s observed profile and the copy from production traces first. The copy uses the system prompt observed in traces. It uses your declared prompt.text only when traces don’t carry one. For tools, the copy uses the descriptions and input schemas observed in traces. It uses the declared map when traces lack a tool’s description or exact input schema, and it adds declared tools not seen in production.
If your code changed, call describe_agents again to store the next map version. If production runs a different prompt or tool set than your codebase declares, check your deployment or tracing setup before updating the map. For details on comparing your agent map with production traces, see Read the observed profile.
Next steps
- Score conversations with signals: turn confirmed success and failure criteria into custom signals.
- Run a baseline simulation: test a simulation copy of your agent against scenarios from real conversations.
- Connect CLI: see all
runtype-connectcommands and flags.