Research Agent
Searches the web, reads documentation, and gathers information
Code Agent
claude-sonnet-4-20250514
Writes, reviews, and refactors code across multiple languages
Planning Agent
Breaks down complex tasks and creates execution plans
Review Agent
Reviews code, content, and plans for quality assurance
Data Agent
Analyzes data, generates insights, and creates visualizations
Overview
A compound component for displaying a directory of available AI agents in multi-agent systems. Shows agent capabilities, status, and match patterns with support for agent selection. Supports both grid and list layouts to fit different UI requirements.
Installation
bunx shadcn@latest add @elements/agent-rosterUsage
import {
AgentRoster,
AgentRosterHeader,
AgentRosterContent,
AgentCard,
} from "@/components/elements/ai-elements/multi-agent/agent-roster";
const agents = [
{
id: "1",
name: "Research Agent",
description: "Searches and analyzes information from multiple sources",
status: "active",
model: "gpt-4o",
matchOn: ["search", "analyze", "research"],
},
{
id: "2",
name: "Code Agent",
description: "Writes, reviews, and debugs code",
status: "idle",
model: "claude-3",
matchOn: ["code", "debug", "review"],
},
{
id: "3",
name: "Writer Agent",
description: "Creates and edits written content",
status: "busy",
model: "gpt-4o",
matchOn: ["write", "edit", "compose"],
},
];
export function AgentRosterExample() {
return (
<AgentRoster
agents={agents}
activeAgentId="1"
onSelect={(id) => console.log("Selected:", id)}
layout="grid"
>
<AgentRosterHeader>Available Agents</AgentRosterHeader>
<AgentRosterContent />
</AgentRoster>
);
}Props
AgentRoster
| Prop | Type | Default | Description |
|---|---|---|---|
agents | RosterAgent[] | - | Array of available agents |
activeAgentId | string | - | Currently selected agent ID |
onSelect | (agentId: string) => void | - | Selection callback |
layout | "grid" | "list" | "grid" | Display layout |
RosterAgent
interface RosterAgent {
id: string;
name: string;
description?: string;
matchOn?: string[];
status: "active" | "idle" | "busy" | "offline";
icon?: React.ReactNode;
model?: string;
}Sub-components
AgentRosterHeader- Header with title and active countAgentRosterContent- Container for agent cardsAgentCard- Individual agent card with statusAgentRosterEmpty- Empty state component
Features
- Grid and list layout options
- Agent status indicators (active, idle, busy, offline)
- Match pattern badges showing agent capabilities
- Model information display
- Selectable agent cards with keyboard support
- Active agent highlighting
- Custom agent icons support
- Disabled state for offline agents