Examples
Code Assistant
Streaming code with syntax highlighting. AgentsKit's CodeBlock component renders code beautifully as it streams in.
Streaming code with syntax highlighting. AgentsKit's CodeBlock component renders code beautifully as it streams in.
I emit real fenced code blocks β ask for a snippet and
Markdown will highlight it.#With AgentsKit
import { useChat, ChatContainer, Message, CodeBlock, Markdown } from '@agentskit/react'
function CodeChat() {
const chat = useChat({ adapter })
return (
<ChatContainer>
{chat.messages.map(msg => (
<Message key={msg.id} message={msg}>
<Markdown content={msg.content} streaming={msg.status === 'streaming'} />
</Message>
))}
<InputBar chat={chat} placeholder="Ask about code..." />
</ChatContainer>
)
}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.