Multi-Agent Orchestration
Watch agents execute multi-step tasks with tool calls, real-time progress, and streaming responses. Try single agents or unleash the swarm!
Research Assistant
Multi-step research with web search and summarization
Data Analyst
Complex calculations with visualizations
Code Reviewer
Security scanning and style analysis
AgentExecutor
Sequential execution with tool binding and state management.
AgentSwarm
Parallel multi-agent coordination with shared context.
ToolResult
Renders tool outputs with appropriate formatting.
StreamingAgentExecutor
Real-time streaming of agent thoughts and actions.
How It Works
AI Kit's agent orchestration system lets you define multiple specialized AI agents and coordinate them through a central router. Each agent has its own system prompt, tool set, and behavioral constraints. When a user sends a message, the orchestrator analyzes the intent and routes it to the most appropriate agent. If the task spans multiple domains, agents can hand off to each other seamlessly while maintaining full conversation context.
The framework provides built-in support for tool execution, allowing agents to call external APIs, query databases, or perform computations mid-conversation. Each tool call is displayed to the user with real-time progress indicators, so they can see exactly what the agent is doing. The orchestrator manages concurrency, error recovery, and timeout handling automatically. The agent system supports both sequential workflows where agents pass results along a chain, and parallel execution where multiple agents work on sub-tasks simultaneously before merging results.
Use Cases
- Customer support triage with specialized agents for billing, technical issues, and account management that route automatically.
- Software development assistants combining a code-writing agent, a testing agent, and a review agent in a single workflow.
- Research pipelines where a search agent gathers sources, an analysis agent extracts insights, and a writing agent produces reports.
- E-commerce concierge with product recommendation, inventory lookup, and order management agents working together.
Integration Guide
Define your agents and let AI Kit orchestrate them:
import { AgentOrchestrator, defineAgent } from '@ainative/ai-kit';
const supportAgent = defineAgent({
name: 'support',
description: 'Handles customer support queries',
systemPrompt: 'You are a helpful support agent...',
tools: [lookupOrder, checkStatus, createTicket],
});
const codeAgent = defineAgent({
name: 'coder',
description: 'Writes and reviews code',
systemPrompt: 'You are an expert programmer...',
tools: [runCode, lintCode, searchDocs],
});
function AgentChat() {
return (
<AgentOrchestrator
agents={[supportAgent, codeAgent]}
routingStrategy="intent-based"
onAgentSwitch={(from, to) => console.log(from, '->', to)}
/>
);
}