← For AI products solutions

SOLUTIONS · FOR AI PRODUCTS

Intent routing for AI agents: send each request to the right agent, tool or model

Route requests to an agent, tool or model with an intent classifier trained on your own logs. Measure accuracy and use confidence to choose cases for review.

Every request to an AI product starts with the same decision: who should handle this? The billing agent or the search tool, the small fast model or the large one, or a person. StayCharted trains an intent classifier on your own logs, the requests where you already know the right route, and returns that route with a confidence from your published model.

Why not let the LLM route?

An LLM can route requests when given your tool descriptions and rules. A separately trained classifier is another option when you have reviewed examples and want a held-out report, batch processing and confidence-based review. Both approaches still need evaluation on your routes.

On 3,080 BANKING77 test messages across 77 intents, StayCharted’s AI Classifier Model scored 92.6%, its Dedicated AI Model scored 93.7%, and Claude Sonnet 5.5 scored 84.7% with category definitions. This measures classification on that dataset, not an end-to-end agent deployment. Results on your routes may differ. Read the full method and all three datasets →

What it reads, and what it answers

It reads the user's message, and optionally a little context:

Field Example
The message "I was charged twice for the same order"
Channel or product area (optional) In-app chat · Billing page

It answers with your routes, for example:

  • Billing agent
  • Order-lookup tool
  • Small model, general question
  • Large model, complex request
  • Person

Each answer comes with a confidence. Below your cutoff, fall back to the LLM router or to a person, while keeping your safety and authorization rules in force.

How to set it up

1. Export requests where the right route is known

From your logs, export user messages and the route that turned out to be right:

  • the agent or tool that resolved it;
  • the route your team corrected it to;
  • or the label your support team gave it.

A few thousand rows is a good start; around 20 reviewed examples per route is a starting point, not a guaranteed minimum for useful results.

2. Train and compare

Upload the file and train an AI Classifier Model. It reads meaning and many languages, and runs on CPU. The report shows how often it chose the right route for messages it never saw, route by route, and which routes it mixes up.

Those mix-ups are worth reading: confused routes may need more examples, clearer labels or a different model.

3. Call it before the agent runs

Publish the model and call it through the Prediction API at the start of each request:

Show Code example
POST /api/v1/models/{model_id}/classify
{ "input": "I was charged twice for the same order" }
→ { "label": "Billing agent", "confidence": 0.97, "needsReview": false }
  • needsReview false (above your review cutoff): route directly.
  • needsReview true: fall back to your LLM router or to a person. On plans with the Review Queue, those requests also wait there, so your team can confirm the right route and teach the next version.

Agents built on Claude or ChatGPT can also call the model as a tool, through the StayCharted MCP connector.

4. Learn from the misroutes

Log each time a request was rerouted, add those rows to the training file, and retrain. The router keeps up as you add tools and agents.

Use the authenticated API base URL https://amt.staycharted.com and an Authorization: Bearer <key> header. Handle errors and null answers with a safe fallback. For several training columns, send an object with the same field names. Full API reference →. API access requires Essentials or Business.

What it doesn't do

  • It doesn't answer the user. It picks the route; your agents do the work.
  • It only knows the routes it was trained on. A new tool needs examples before the router sends anything to it.
  • It doesn't replace your safety checks. Keep your guardrails before and after the route.

Evaluate before automating

Use reviewed examples that reflect your current rules. Check errors by category and sample confident answers as well as uncertain ones. Confidence is a model score, not a guarantee. Keep mandatory safety and access rules in your application. Best practices for training and review →.

Common questions

What is intent routing for AI agents?

Deciding, for each user request, which agent, tool or model should handle it, usually with a classifier that runs before the main model.

Is a trained classifier better than an LLM router?

It depends on your task and examples. On BANKING77, StayCharted’s AI Classifier Model scored 92.6%, its Dedicated AI Model 93.7%, and Claude Sonnet 5.5 84.7%. That does not establish the best router for every application. A classifier still adds an API call; compare accuracy, latency and cost on your own traffic.

How many examples do I need?

About 20 per route to start, and more for routes that look alike.

Can it run on every request?

Yes, through the Prediction API, within your plan's allowance and rate limits. For high-volume production routing, talk to us about Enterprise limits.

Can my agent call it as a tool?

Yes. Connect Claude or ChatGPT to StayCharted, and the agent can ask your model for the route. Connector setup →

Put it into practice