
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@agentkit-react/core
Advanced tools
Ship AI chat in 10 lines of React. Drop-in hooks and components for streaming AI interfaces.
Ship AI chat in 10 lines of React.
Drop-in hooks and components for streaming AI interfaces. Works with Claude, GPT, Vercel AI SDK, or any LLM. So simple an AI agent can write it for you.
npm install @agentkit-react/core
import { useChat, ChatContainer, Message, InputBar } from '@agentkit-react/core'
import { anthropic } from '@agentkit-react/core/adapters'
import '@agentkit-react/core/theme'
function Chat() {
const chat = useChat({
adapter: anthropic({ apiKey: 'your-key', model: 'claude-sonnet-4-6' }),
})
return (
<ChatContainer>
{chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
<InputBar chat={chat} />
</ChatContainer>
)
}
That's it. Streaming, auto-scroll, keyboard handling, light/dark theme — all included.
| AgentKit | Vercel AI SDK | assistant-ui | |
|---|---|---|---|
| API surface | 3 hooks | Full toolkit | 50+ components |
| Setup | 10 lines | ~30 lines | ~50 lines |
| Headless | Yes | No UI included | Opinionated |
| Agent-friendly | Entire API fits in 2K tokens | Large docs surface | Large docs surface |
| Bundle | <5KB | ~30KB | ~80KB |
import { anthropic, openai, vercelAI, generic } from '@agentkit-react/core/adapters'
// Claude
useChat({ adapter: anthropic({ apiKey, model: 'claude-sonnet-4-6' }) })
// GPT
useChat({ adapter: openai({ apiKey, model: 'gpt-4o' }) })
// Vercel AI SDK (route handler)
useChat({ adapter: vercelAI({ api: '/api/chat' }) })
// Any ReadableStream
useChat({ adapter: generic({ send: async (msgs) => fetch('/api', { body: JSON.stringify(msgs) }).then(r => r.body!) }) })
// app/chat/page.tsx
'use client'
import { useChat, ChatContainer, Message, InputBar } from '@agentkit-react/core'
import { anthropic } from '@agentkit-react/core/adapters'
import '@agentkit-react/core/theme'
export default function ChatPage() {
const chat = useChat({ adapter: anthropic({ apiKey: process.env.NEXT_PUBLIC_API_KEY!, model: 'claude-sonnet-4-6' }) })
return (
<ChatContainer>
{chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
<InputBar chat={chat} />
</ChatContainer>
)
}
// src/App.tsx
import { useChat, ChatContainer, Message, InputBar } from '@agentkit-react/core'
import { openai } from '@agentkit-react/core/adapters'
import '@agentkit-react/core/theme'
function App() {
const chat = useChat({ adapter: openai({ apiKey: import.meta.env.VITE_OPENAI_KEY, model: 'gpt-4o' }) })
return (
<ChatContainer>
{chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
<InputBar chat={chat} />
</ChatContainer>
)
}
// app/routes/chat.tsx
import { useChat, ChatContainer, Message, InputBar } from '@agentkit-react/core'
import { vercelAI } from '@agentkit-react/core/adapters'
import '@agentkit-react/core/theme'
export default function Chat() {
const chat = useChat({ adapter: vercelAI({ api: '/api/chat' }) })
return (
<ChatContainer>
{chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
<InputBar chat={chat} />
</ChatContainer>
)
}
// src/routes/chat.tsx
import { useChat, ChatContainer, Message, InputBar } from '@agentkit-react/core'
import { anthropic } from '@agentkit-react/core/adapters'
import '@agentkit-react/core/theme'
export default function Chat() {
const chat = useChat({ adapter: anthropic({ apiKey: 'your-key', model: 'claude-sonnet-4-6' }) })
return (
<ChatContainer>
{chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
<InputBar chat={chat} />
</ChatContainer>
)
}
// Stream any async source
const { text, status, error, stop } = useStream(source)
// Reactive state (proxy-based, minimal re-renders)
const state = useReactive({ count: 0 })
// Full chat session
const chat = useChat({ adapter })
<ChatContainer> {/* scrollable chat layout */}
<Message message={m} /> {/* chat bubble with streaming */}
<InputBar chat={chat} /> {/* input + send */}
<Markdown content={s} /> {/* markdown renderer */}
<CodeBlock code={s} language="ts" copyable />
<ToolCallView toolCall={tc} />
<ThinkingIndicator visible />
Components ship unstyled with data-ak-* attributes. Import the theme for instant polish:
import '@agentkit-react/core/theme' // light/dark, CSS custom properties
Override any token:
:root {
--ak-color-bubble-user: #10b981;
--ak-radius: 16px;
}
The entire API fits in under 2,000 tokens. See the agent-friendly reference — paste it into your LLM context and start generating chat UIs.
Inspired by Arrow.js — the first UI framework for the agentic era.
MIT
FAQs
Ship AI chat in 10 lines of React. Drop-in hooks and components for streaming AI interfaces.
We found that @agentkit-react/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.