Last month I watched a multi-agent demo route a refund request to a weather bot. The weather bot's description read: "A helpful assistant for all your needs." The routing model believed it — and the user got a five-day forecast instead of their money back.

What you'll learn

  • Why your agent's description is selection-time interface, not documentation
  • A four-part formula for purpose statements that routers can actually match
  • How to encode boundaries — what your agent refuses — into its system prompt
  • A five-minute smoke test that catches routing failures before your users do

Why this matters now

Multi-agent systems went from research demos to production stacks in about two years. Orchestrators route work between specialized agents, function-calling APIs let models pick tools at runtime, and registries like the Agentverse or MCP servers expose hundreds of agents to a single coordinator. In every one of these systems, the routing decision is made by reading text: the agent's name, its description, its listed capabilities. That text is your agent's resume, its API contract, and its storefront sign — all in one. Yet most teams spend hours tuning prompts and seconds writing the description. That's backwards.

A description is an interface, not documentation

When an orchestrator decides which agent handles a request, it never reads your code. It reads your description — sometimes embedded into a vector index, sometimes pasted into an LLM's context as a menu of options. Function calling works the same way: the model sees tool names and descriptions, then picks.

That makes the description the only part of your agent that participates in selection. A brilliant implementation behind a vague description is a brilliant restaurant with no sign.

So treat the description like a function signature. It declares what comes in, what goes out, and what it declines — and everything not declared is a coin flip at routing time.

The anatomy of a purpose statement

Skip the marketing copy. A purpose statement a router can match has four parts:

  • Verb — what it does ("processes refunds", never "helps with")
  • Domain — where it applies ("EU storefront orders")
  • Boundary — what's explicitly out of scope
  • Output — what the caller gets back

Compare:

Before: "An AI assistant for e-commerce."

After: "Processes refund requests for EU storefront orders. Checks eligibility, issues the refund, and returns a refund ID. Does not handle shipping changes or non-EU stores."

Every word in the second version either narrows the match or sets expectations. "E-commerce" matches everything, which means it routes nothing well.

Specificity feels risky — like you're turning away customers. But in a routing system, being matchable is being discoverable. The narrow agent gets called; the broad one gets guessed at.

Compile it into a system prompt

The same discipline applies inside the agent. Your system prompt should restate the job, anchor it with examples, and — this is the part most tutorials skip — list what the agent refuses. Here's a pattern I use: define an agent card once, then compile it into the prompt so the two can never drift apart.

// agent-card.ts — define the job once, compile it into the prompt interface AgentCard { name: string; purpose: string; // one sentence: verb + domain + outcome handles: string[]; // requests it SHOULD accept refuses: string[]; // requests it should decline or hand off returns: string; // what a successful reply looks like } const refundAgent: AgentCard = { name: "refund-agent", purpose: "Process refunds for orders in the EU storefront.", handles: ["Refund order #1234", "Why was my refund denied?"], refuses: ["Change a shipping address", "Refunds for the US store"], returns: "A refund ID and status, or a denial reason.", }; function compilePrompt(card: AgentCard): string { return [ `You are ${card.name}. Your only job: ${card.purpose}`, `Accept requests like: ${card.handles.join("; ")}`, // Explicit refusals give the model a clean exit instead of a guess `Decline or hand off requests like: ${card.refuses.join("; ")}`, `On success, reply with: ${card.returns}`, ].join("\n"); } console.log(compilePrompt(refundAgent)); 

The refuses list matters more than the capabilities. A model that doesn't know what it shouldn't do will improvise — politely, confidently, and wrongly. Explicit refusals give it a clean exit: decline, or hand the request back to the orchestrator.

Keep the examples short. They act as few-shot anchors, not documentation.

Test discoverability like you test code

You wouldn't ship a function without running it. Ship descriptions the same way. Embedding-based checks need a model endpoint, but a token-overlap smoke test catches the worst failures in seconds, with zero dependencies:

# route_check.py — does your description actually match user intent? import re def tokens(text: str) -> set[str]: # lowercase, split on non-letters — crude but fine for a smoke test return set(re.findall(r"[a-z]+", text.lower())) def coverage(query: str, description: str) -> float: # fraction of the query's words the description actually mentions q, d = tokens(query), tokens(description) return len(q & d) / len(q) if q else 0.0 AGENTS = { "weather": "Answers questions about weather: forecasts, rain, " "temperature, and severe weather alerts.", "refund": "Processes refund requests for EU storefront orders. " "Checks eligibility, issues the refund, returns a refund ID.", } # each query must route to the agent listed beside it ROUTING_TABLE = [ ("will it rain tomorrow", "weather"), ("any severe weather alerts today", "weather"), ("where is my refund", "refund"), ("I want my money back for order 42", "refund"), ] for query, expected in ROUTING_TABLE: scores = {name: coverage(query, desc) for name, desc in AGENTS.items()} winner = max(scores, key=scores.get) # ties break arbitrarily — a red flag itself status = "ok" if winner == expected else "FAIL" print(f"[{status}] {query!r:38} -> {winner} {scores}") 

Run it and all four queries route correctly. Now swap the refund description back to "An AI assistant for e-commerce": its score on "where is my refund" drops to zero, the tie hands the request to whichever agent the router tries first, and the smoke test fails exactly the way your users would.

For production, replace the toy scorer with embedding similarity or an LLM-as-judge call. Keep the shape, though: a list of queries your agent must win, and a list it must lose.

Common pitfalls

  • Writing for humans, not routers. "Cutting-edge AI-powered assistant" scores zero on every real query. Use the nouns your users actually type.
  • The kitchen-sink agent. An agent that "does everything" gets picked for everything and fails everywhere. Split agents by job, not by technology.
  • Set-and-forget descriptions. Adding a new agent can steal traffic from an old one. Re-run the smoke test whenever the roster changes.

Wrap-up

Your agent's description is the one artifact that decides whether it gets used at all. Write it like an interface: verb, domain, boundary, output. Encode refusals in the system prompt, and test discoverability the way you test any other code path.

Next steps:

  1. Audit your current agents against the four-part formula — most will fail on "boundary".
  2. Write three queries each agent must win and three it must lose.
  3. Add a description smoke test to CI, and check your framework's official docs (uAgents, MCP, or your provider's function-calling guide) for exactly how descriptions are surfaced to the router.