Basic chat
Streaming chat with a mock adapter. Zero config, runs in-browser.
'use client'import { useMemo } from 'react'import { useChat, ChatContainer, Message, InputBar } from '@agentskit/react'import '@/styles/agentskit-theme.css'import { createMockAdapter, initialAssistant } from './_shared/mock-adapter'const RESPONSES = [ "Great question! Streaming works by sending tokens incrementally. AgentsKit flushes chunks into the UI on each animation frame so the interface stays responsive at high token rates.", "`useChat` from @agentskit/react wraps state, streaming, abort, and retries. Internally it uses a ChatController from @agentskit/core backed by the adapter's StreamSource.", "Tokens are atomic units LLMs work with — roughly 3–4 characters. AgentsKit batches chunks and the default Message component renders each incremental update without layout thrash.", "Context windows are measured in tokens. AgentsKit prunes older messages when you approach the limit so long conversations stay coherent without hitting provider errors.",]export function BasicChat() { const adapter = useMemo( () => createMockAdapter(RESPONSES.map((text) => ({ text }))), [], ) const chat = useChat({ adapter, initialMessages: [ initialAssistant( "Hi! I'm your AI assistant. Ask me anything about streaming, React hooks, or how AgentsKit works under the hood.", ), ], }) return ( <div data-ak-example className="flex h-[420px] flex-col overflow-hidden rounded-lg border border-ak-border bg-ak-surface" > <ChatContainer className="flex-1 space-y-2 p-4"> {chat.messages.map((m) => ( <Message key={m.id} message={m} /> ))} </ChatContainer> <InputBar chat={chat} /> </div> )}Tool use
Tool-calling agent that browses a mocked product catalog.
toolschatRAG
Retrieval-augmented chat with inline source citations.
ragchatCode assistant
Code-aware chat with syntax-highlighted output.
codechatMarkdown chat
Rich Markdown rendering in assistant responses.
markdownchatSupport bot
Chat with escalation, memory, and confirmation gates.
supportmemorytoolsMulti-agent
Planner + worker + reviewer topology.
multi-agentMulti-model
Switch providers on the fly in a single conversation.
multi-modelchatAgent actions
Streaming UI with live tool-call visualization.
toolsstreamingshadcn/ui chat
AgentsKit styled with shadcn/ui tokens.
chatdesign-systemMaterial UI chat
AgentsKit styled with MUI components.
chatdesign-systemSandbox runner
Agent-emitted code runs isolated in E2B / WebContainer.
sandboxtoolscodeObservability trace
Live span tree with tokens, latency, cost. Exports to LangSmith / OTEL.
observabilityproductionPersistent memory
Cross-session recall with sqlite, redis, or lancedb backends.
memorypersistenceEval suite
Run regression tests, track accuracy / latency / cost in CI.
evalproductionciSlack integration
Agent posts to Slack via @agentskit/tools.
integrationstoolsInk terminal
Same controller, rendered in your terminal via Ink.
inkcliterminalSkill swap
Hot-swap personas mid-conversation: researcher, critic, planner.
skillspromptsRuntime ReAct
Standalone agent runtime — no UI required. ReAct loop with tools + memory.
runtimemulti-agentProvider fanout
Same prompt across openai, anthropic, gemini, ollama. Compare quality + cost.
adaptersmulti-modelRAG with citations
Retrieve top-k chunks with scores and inline cite refs.
ragcitations