Skip to navigation

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:

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 name from gen_ai.agent.name, a role, and entryPoint set to true for the agent that receives the user message first.
  • Prompt and tools: the system prompt text and each tool’s name, description, and inputSchema copied verbatim, with source file and line locations.
  • Handoffs: other agents in the same map that this agent transfers control to, listed in handsOffTo.
  • Surfaces: one surfaces entry per channel people use to reach the agent. Each entry takes a type (such as chat, slack, sms, email, api, or webhook) and an optional note, for example the provider.
  • Non-production endpoints: optional endpoints where 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:

Example describe_agents input
{
"productId": "YOUR_PRODUCT_ID",
"agents": [
{
"name": "customer-support",
"role": "Handles customer order questions",
"entryPoint": true,
"prompt": {
"text": "Help customers check order status and process returns."
},
"tools": [
{
"name": "lookup_order",
"description": "Returns the status of an order by ID.",
"inputSchema": {
"type": "object",
"properties": {
"orderId": { "type": "string" }
},
"required": ["orderId"]
}
}
],
"surfaces": [
{
"type": "slack",
"note": "Internal support channel"
}
]
}
]
}

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:

Send an agent map with the CLI
npx @runtypelabs/connect describe-agents --input agent-map.json

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 in describe_agents under surfaces).
  • 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 in ref.
  • trace: seen in traces, with a trace or run ID in ref.
  • user: told directly by you, with an optional ref.

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:

  1. 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.
  2. Tell your coding agent which facts to accept, edit, add, or reject, or tell it to dismiss the confirmation.
  3. Have your coding agent call resolve_pending_action with the action’s id in actionId and your decision in resolution:
    • To confirm facts, pass resolution: "confirm" and the IDs of the facts shown to you in factIds. Runtype confirms only the facts that you were shown.
    • To send corrections, pass edits (accepted only with confirm) containing changes ([{ factId, value }]), additions ([{ field, value }]), or rejections (fact IDs). Runtype confirms every remaining fact in factIds as 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 business context from the command line, run resolve-pending-action with the action ID and fact IDs:

Confirm business context with the CLI
npx @runtypelabs/connect resolve-pending-action \
--action-id YOUR_ACTION_ID \
--resolution confirm \
--fact-ids '["YOUR_FACT_ID"]' \
--json

Replace the following:

  • YOUR_ACTION_ID: the id of the confirm_business_context pending action from get_status or save_business_context.
  • YOUR_FACT_ID: each fact ID from payload.factIds that 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 onboarding status
npx @runtypelabs/connect get-status --json

Check the output for the following:

  • next points to start_baseline_simulation, or to a later step if you already ran the first simulation.
  • pendingActions no longer lists confirm_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