@agentskit/solid
v0.3.2
Published
Solid hook + headless chat components for AgentsKit — streaming, tools, and memory across any LLM provider.
Maintainers
Readme
@agentskit/solid
SolidJS hook + headless chat components. Same ChatReturn contract every AgentsKit framework binding ships — swap frameworks without changing your agent.
Tags: ai · agents · llm · agentskit · solid · solidjs · signals · chat · streaming
Why
- One contract, every framework —
useChatreturns the exact same shape as the React / Vue / Svelte / Angular / RN / Ink bindings. - Fine-grained reactivity — values surface as Solid accessors; no diff, no rerender overhead.
- Headless by default — components emit
data-ak-*attributes; style however you want. - Streaming, tools, HITL — all core features work identically to
@agentskit/react.
Install
npm install @agentskit/solid @agentskit/adaptersPeers: solid-js ^1.8.
Quick example
import { useChat, ChatContainer, Message, InputBar } from '@agentskit/solid'
import { For } from 'solid-js'
import { anthropic } from '@agentskit/adapters'
export function App() {
const chat = useChat({
adapter: anthropic({ apiKey: import.meta.env.VITE_ANTHROPIC_API_KEY, model: 'claude-sonnet-4-6' }),
})
return (
<ChatContainer>
<For each={chat.messages}>{(m) => <Message message={m} />}</For>
<InputBar chat={chat} />
</ChatContainer>
)
}State surfaces through a reactive proxy — read chat.messages / chat.input directly inside JSX.
API
useChat(config)— hook returningChatReturnvia a reactive proxy:messages,status,input+ actionssend(text),setInput(v),stop,retry,clear,approve,deny,edit,regenerate.- Headless components — emit
data-ak-*attributes only, no styling. Full parity with@agentskit/react:ChatContainer— scroll wrapper, auto-scrolls on new content.Message— renders a message; optionalavatar/actionsslots.InputBar— textarea + Send; Enter submits, Shift+Enter newlines, disabled while empty/streaming.Markdown— content surface with astreamingflag.CodeBlock—code+language, optionalcopyablecopy button.ToolCallView— collapsible tool-call view (name → args/result).ThinkingIndicator— shown whilevisible, with alabel.ToolConfirmation— HITL approve/deny, renders only whenstatus === 'requires_confirmation'.
Ecosystem
| Package | Role |
|---------|------|
| @agentskit/core | ChatReturn contract |
| @agentskit/adapters | LLM providers |
| @agentskit/tools | Built-in + integration tools |
| @agentskit/memory | Chat + vector backends |
| @agentskit/react · vue · svelte · react-native · angular · ink | Same contract, different host |
Contributors
License
MIT — see LICENSE.
