RAG Chat
Retrieval-Augmented Generation — chat with your documents. Show citations, source references, and document context alongside AI responses.
Retrieval-Augmented Generation — chat with your documents. Show citations, source references, and document context alongside AI responses.
#With AgentsKit
import { useChat, ChatContainer, Message, InputBar } from '@agentskit/react'
function RAGChat() {
const chat = useChat({
adapter: myRAGAdapter,
initialMessages: [{
id: 'sys', role: 'system',
content: 'Answer based on the provided documents. Cite sources.',
status: 'complete', createdAt: new Date()
}],
})
return (
<ChatContainer>
{chat.messages.map(msg => (
<Message key={msg.id} message={msg} />
))}
<InputBar chat={chat} placeholder="Ask about your documents..." />
</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.
Customer Support Bot
Quick replies, typing indicators, escalation flows. Build production support experiences with AgentsKit's headless components.
Agent Actions
AI agents that generate live, interactive UI — task trackers, dashboards, forms. The agent doesn't just respond with text, it builds working interfaces.