@aibind/solid
v0.12.0
Published
AI SDK bindings for SolidJS — reactive hooks for streaming, structured output, and agents
Maintainers
Readme
@aibind/solid
Low-level SolidJS reactive hooks for AI streaming. If you're using SolidStart, use @aibind/solidstart instead — it wraps this package with sensible defaults and server handlers.
Install
npm install @aibind/solid ai solid-jsUsing SolidStart? Install
@aibind/solidstartinstead — it includes this package and adds server handlers and default endpoints.
Usage
This package requires you to specify an endpoint for every hook. For SolidStart projects, @aibind/solidstart provides defaults automatically.
import { useStream } from "@aibind/solid";
function Chat() {
const { text, loading, send } = useStream({
endpoint: "/my/stream/endpoint", // required
system: "You are a helpful assistant.",
});
return <p>{text()}</p>;
}Entry Points
| Entry | Exports |
| ------------------------ | ----------------------------------------------------------------------- |
| @aibind/solid | useStream, useStructuredStream, defineModels |
| @aibind/solid/agent | useAgent |
| @aibind/solid/markdown | useStreamMarkdown, StreamParser, HtmlRenderer, MarkdownRecovery |
| @aibind/solid/history | ReactiveChatHistory, ReactiveMessageTree |
| @aibind/solid/project | Project |
Documentation
Full documentation: aibind.dev
Requirements
- SolidJS 1.8+
- AI SDK 6.0+
License
MIT
