{"slug": "your-ai-agent-is-only-as-good-as-its-job-description", "title": "Your AI Agent Is Only as Good as Its Job Description", "summary": "A developer argues that in multi-agent systems the agent description is the only part of an agent that participates in routing, since orchestrators and function-calling models select tools by reading names and descriptions rather than code. The writeup shows a refund request misrouted to a weather bot described as \"A helpful assistant for all your needs,\" and proposes an AgentCard pattern that defines purpose, handles, refuses and returns once and compiles it into the system prompt so the two cannot drift apart.", "body_md": "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.\n\nMulti-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.\n\nWhen 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.\n\nThat 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.\n\nSo 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.\n\nSkip the marketing copy. A purpose statement a router can match has four parts:\n\nCompare:\n\nBefore: \"An AI assistant for e-commerce.\"\n\nAfter: \"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.\"\n\nEvery word in the second version either narrows the match or sets expectations. \"E-commerce\" matches everything, which means it routes nothing well.\n\nSpecificity 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.\n\nThe 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.\n\n```\n// agent-card.ts — define the job once, compile it into the prompt\n\ninterface AgentCard {\n  name: string;\n  purpose: string;   // one sentence: verb + domain + outcome\n  handles: string[]; // requests it SHOULD accept\n  refuses: string[]; // requests it should decline or hand off\n  returns: string;   // what a successful reply looks like\n}\n\nconst refundAgent: AgentCard = {\n  name: \"refund-agent\",\n  purpose: \"Process refunds for orders in the EU storefront.\",\n  handles: [\"Refund order #1234\", \"Why was my refund denied?\"],\n  refuses: [\"Change a shipping address\", \"Refunds for the US store\"],\n  returns: \"A refund ID and status, or a denial reason.\",\n};\n\nfunction compilePrompt(card: AgentCard): string {\n  return [\n    `You are ${card.name}. Your only job: ${card.purpose}`,\n    `Accept requests like: ${card.handles.join(\"; \")}`,\n    // Explicit refusals give the model a clean exit instead of a guess\n    `Decline or hand off requests like: ${card.refuses.join(\"; \")}`,\n    `On success, reply with: ${card.returns}`,\n  ].join(\"\\n\");\n}\n\nconsole.log(compilePrompt(refundAgent));\n```\n\nThe `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.\n\nKeep the examples short. They act as few-shot anchors, not documentation.\n\nYou 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:\n\n``` python\n# route_check.py — does your description actually match user intent?\nimport re\n\ndef tokens(text: str) -> set[str]:\n    # lowercase, split on non-letters — crude but fine for a smoke test\n    return set(re.findall(r\"[a-z]+\", text.lower()))\n\ndef coverage(query: str, description: str) -> float:\n    # fraction of the query's words the description actually mentions\n    q, d = tokens(query), tokens(description)\n    return len(q & d) / len(q) if q else 0.0\n\nAGENTS = {\n    \"weather\": \"Answers questions about weather: forecasts, rain, \"\n               \"temperature, and severe weather alerts.\",\n    \"refund\":  \"Processes refund requests for EU storefront orders. \"\n               \"Checks eligibility, issues the refund, returns a refund ID.\",\n}\n\n# each query must route to the agent listed beside it\nROUTING_TABLE = [\n    (\"will it rain tomorrow\",             \"weather\"),\n    (\"any severe weather alerts today\",   \"weather\"),\n    (\"where is my refund\",                \"refund\"),\n    (\"I want my money back for order 42\", \"refund\"),\n]\n\nfor query, expected in ROUTING_TABLE:\n    scores = {name: coverage(query, desc) for name, desc in AGENTS.items()}\n    winner = max(scores, key=scores.get)  # ties break arbitrarily — a red flag itself\n    status = \"ok\" if winner == expected else \"FAIL\"\n    print(f\"[{status}] {query!r:38} -> {winner} {scores}\")\n```\n\nRun 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.\n\nFor 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.\n\nYour 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.\n\nNext steps:", "url": "https://wpnews.pro/news/your-ai-agent-is-only-as-good-as-its-job-description", "canonical_source": "https://dev.to/shruti_sharma_a2350383861/your-ai-agent-is-only-as-good-as-its-job-description-3pda", "published_at": "2026-12-04 17:08:56+00:00", "updated_at": "2026-12-04 17:14:30.247596+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "large-language-models"], "entities": ["Agentverse", "MCP"], "also_reported_by": [], "takeaway": "Define each agent's purpose, handles, refuses and returns in a single AgentCard and compile it into the system prompt, since routers and function-calling models select agents by description text alone and explicit refusals give the model a clean exit instead of an improvised answer.", "recommendation": {"advice": "Write agent descriptions as function signatures — verb, domain, outcome, plus explicit refusals — and compile them from one AgentCard so the routing description and system prompt never drift.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/your-ai-agent-is-only-as-good-as-its-job-description", "markdown": "https://wpnews.pro/news/your-ai-agent-is-only-as-good-as-its-job-description.md", "text": "https://wpnews.pro/news/your-ai-agent-is-only-as-good-as-its-job-description.txt", "jsonld": "https://wpnews.pro/news/your-ai-agent-is-only-as-good-as-its-job-description.jsonld"}}