Multi-Agent Planning
A planner agent that breaks tasks into steps and delegates to specialists. Built with @agentskit/react and the planner skill.
A planner agent that breaks tasks into steps and delegates to specialists. Built with @agentskit/react and the planner skill.
#Code
import { useChat, ChatContainer, Message, InputBar } from '@agentskit/react'
import { planner } from '@agentskit/skills'
import '@agentskit/react/theme'
function MultiAgentDemo() {
const chat = useChat({
adapter: yourAdapter,
skills: [planner],
systemPrompt: 'Break tasks into steps. Delegate research and coding to specialists.',
})
return (
<ChatContainer>
{chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
<InputBar chat={chat} placeholder="Give me a complex task..." />
</ChatContainer>
)
}#With Real Delegation (Runtime)
For actual multi-agent execution where child agents run independently:
import { createRuntime } from '@agentskit/runtime'
import { planner, researcher, coder } from '@agentskit/skills'
const runtime = createRuntime({
adapter: yourAdapter,
delegates: {
researcher: { skill: researcher },
coder: { skill: coder },
},
})
const result = await runtime.run('Build a REST API for task management', {
skill: planner,
})#Try it
cd apps/example-multi-agent
pnpm devExplore nearby
- PeerExamples
Interactive demos. For copy-paste code, see Recipes.
- PeerBasic Chat
The simplest use case β streaming AI conversation with auto-scroll, stop button, and keyboard handling. All in 10 lines with AgentsKit.
- PeerTool Use
AI assistants that call functions β weather, search, DB queries. Tool calls render as expandable cards.
Runtime Agent
Run a standalone agent from code β no UI required. The runtime executes a ReAct loop: call tools, observe results, decide next action.
shadcn Chat
AgentsKit's useChat hook styled with shadcn/ui patterns. This demo recreates the shadcn look β in a real app, you'd use actual shadcn components.