@agentskit/solid — for agents
SolidJS binding — `useChat` hook backed by createStore for fine-grained reactivity.
#Purpose
SolidJS binding for the ChatReturn contract from @agentskit/core. Same shape as React/Vue/Svelte hooks — store-backed, cleanup wired via onCleanup.
#Install
npm install @agentskit/solid
# peer:
npm install solid-js#Primary exports
useChat(config): ChatReturn— Solid hook backed bycreateStore+onCleanup.
#Minimal example
import { useChat } from '@agentskit/solid'
import { anthropic } from '@agentskit/adapters'
const adapter = anthropic({ apiKey: import.meta.env.VITE_ANTHROPIC_KEY, model: 'claude-sonnet-4-6' })
export function Chat() {
const chat = useChat({ adapter })
return (
<div>
<ul>{chat.messages.map(m => <li>{m.role}: {m.content}</li>)}</ul>
<button onClick={() => chat.send('Hello')}>Send</button>
</div>
)
}#Common patterns
- Reactivity: Solid stores are fine-grained — access
chat.messagesdirectly inside JSX, not destructured. - SSR:
useChatis client-only. Wrap in<ClientOnly>for SolidStart SSR. - Cleanup: subscriptions tear down via
onCleanup; no manual unsubscribe needed.
#Related
- @agentskit/core —
ChatReturncontract. - @agentskit/adapters — provider adapters.
- @agentskit/react, @agentskit/vue, @agentskit/svelte, @agentskit/angular — sibling bindings.
#Source
- npm: https://www.npmjs.com/package/@agentskit/solid
- repo: https://github.com/AgentsKit-io/agentskit/tree/main/packages/solid
Explore nearby
- PeerFor agents — overview
Dense, LLM-friendly reference for every AgentsKit package. Designed to paste into an agent's context window.
- Peer@agentskit/core — for agents
Zero-dependency foundation. Contracts, chat controller, primitives, and a dozen feature subpaths.
- Peer@agentskit/adapters — for agents
Provider adapters (OpenAI-compatible + native) + router + ensemble + fallback + generic factory.