Skip to main content
PraisonAI TypeScript provides a Router for directing requests to specialized agents based on keywords or patterns.

Quick Start

1

Simple Usage

The simplified Router class uses keyword-based routing:
2

With Configuration

Use regex pattern routes — see Router with Patterns below.

Router with Patterns

Use regex patterns for more complex routing:

Advanced Router (Legacy)

For more control, use the RouterAgent class with custom conditions:

Route Conditions

Priority Routing

Adding Routes Dynamically

Context-Aware Routing

Verbose Mode


Routing

Smart routing

Agent Team

Multi-agent teams