Skip to main content
Route each request to the best handler agent — a classifier picks the path, specialised agents do the work.
The user sends a request; the classifier routes it to the best handler agent.

Quick Start

1

Simple Usage

2

With Configuration

Multi-step routes and step-complete hooks:

How It Works


Choosing a Routing Approach

Pick the mechanism that matches how the decision is made.

Configuration Options


RouterAgent — Model Selection

Import RouterAgent from praisonaiagents.agent.router_agent — it is not re-exported at the top level.

Best Practices

Instruct the classifier to reply with exact route keys — free-form labels break mapping.
Unhandled classifications should fall through to a general handler, not fail silently.
RouterAgent with routing_strategy="cost-optimized" saves cost on simple queries automatically.
on_step_complete shows which handler ran — useful when classification is ambiguous.

Workflows

Workflow patterns and orchestration

AutoAgents

Automatically created and managed agents