● classifier online

Route every prompt to the right agent

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.

01

Define skills

Each skill maps namespaces, keywords and intents to an agent — plus the input schema that agent expects.

02

Send prompts

Your agent calls POST /api/classify with the message and optional context JSON. Origin is verified server-side from request headers; backend callers may declare a schema namespace.

03

Get the route

Deterministic rules answer fast; ambiguous prompts fall back to an LLM. You get agent, intent, schema, confidence.

Configure

Your skills

Create or update a skill here and the classifier uses it on the very next request. No redeploy.

Add a skill

Loading skills…
Try it

Classification playground

Exactly what your agent will call in production — same endpoint, same response.

Request

Response

{
  "message": "Hit Classify to see the routing decision"
}
Agent hub

Build & test agents

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.

Agents

Add an Agent
Loading agents…

Test runner

Output appears here — try the free chef-agent with some ingredients.

Measure

Prompt evaluator

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.

Evaluate a prompt

Integrate

Call it from your agent

Point your frontier agent at these endpoints. Set an API secret in production and send it as a Bearer header.

POST /api/classify

curl -X POST https://agents.publichome.page/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" }
  }'

Response

{
  "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
}

From an agent (JS)

const route = await fetch("https://agents.publichome.page/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);