Examples
Multi-Model Comparison
Compare responses from different AI models side-by-side. Same input, different adapters — AgentsKit makes it trivial.
Compare responses from different AI models side-by-side. Same input, different adapters — AgentsKit makes it trivial.
@agentskit/adapters/openai · model: gpt-4o-mini
Pick a provider — AgentsKit hot-swaps the adapter without touching the rest of the app.
#With AgentsKit
Just use two useChat hooks with different adapters:
import { useChat, ChatContainer, Message, InputBar } from '@agentskit/react'
import { anthropic, openai } from '@agentskit/adapters'
function Compare() {
const claude = useChat({ adapter: anthropic({ apiKey, model: 'claude-sonnet-4-6' }) })
const gpt = useChat({ adapter: openai({ apiKey, model: 'gpt-4o' }) })
const sendBoth = (text: string) => {
claude.send(text)
gpt.send(text)
}
return (
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr' }}>
<ChatContainer>{claude.messages.map(m => <Message key={m.id} message={m} />)}</ChatContainer>
<ChatContainer>{gpt.messages.map(m => <Message key={m.id} message={m} />)}</ChatContainer>
<InputBar chat={{ ...claude, send: sendBoth }} />
</div>
)
}Explore 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.