AgentSwitch classifies incoming prompts against skills you configure — URL namespaces, keywords, intents — and tells your frontier agent exactly where to route, with the schema it needs.
Each skill maps URL namespaces, keywords and intents to an agent — plus the input schema that agent expects.
Your agent calls POST /api/classify with the prompt and optional context JSON. Origin is verified server-side from request headers; backend callers may declare a schema namespace.
Deterministic rules answer fast; ambiguous prompts fall back to an LLM. You get agent, intent, schema, confidence.
Create or update a skill here and the classifier uses it on the very next request. No redeploy.
Skills save to AgentSwitch's managed store by default. Point AgentSwitch at a markdown file in a private GitHub repo instead — skills become a versioned file you can review, diff and edit like code. Edits pushed to the repo apply on the next classify call.
Exactly what your agent will call in production — same endpoint, same response.
{
"message": "Hit Classify to see the routing decision"
}
Register agents backed by your own or public MCP servers — AgentSwitch runs the agentic loop (model picks tools, hub executes them via MCP, results feed back) and classify routes to them by name. The chef-agent is free: recipes from whatever ingredients you have.
Output appears here — try the free chef-agent with some ingredients.
Industry-standard eval: faithfulness, hallucination (SelfCheckGPT sampling), precision and recall. Evaluate your agent's answer against its context — or let the model answer and self-check — and see how it ranks against every prior eval.
Point your frontier agent at these endpoints. Set an API_TOKEN secret in production and send it as a Bearer header.
curl -X POST /api/classify \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "prompt": "refund invoice INV-123", "schema": "app.foo.com/billing", "context": { "user_id": "u_42" } }'
{
"referrer": "app.foo.com",
"namespace": "app.foo.com/billing/*",
"skill": "billing-agent",
"agent": "billing",
"agent_intent": "refund",
"schema": { … }, // what the agent expects
"confidence": 0.87,
"method": "rules", // rules | llm | fallback | none
"context": { … } // your context, passed through
}
GET /api/skills list all POST /api/skills create GET /api/skills/:name read one PUT /api/skills/:name upsert DELETE /api/skills/:name remove GET /api/agents list hub agents POST /api/agents register MCP agent POST /api/agents/:name/run execute agent GET /api/storage backend config (token masked) PUT /api/storage switch managed ↔ GitHub repo DELETE /api/storage revert to managed store
const route = await fetch("/api/classify", { method: "POST", headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ prompt, schema, context }), }).then(r => r.json()); // then dispatch: await agents[route.agent].run(route.agent_intent, route.schema);