New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@aibind/sveltekit

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aibind/sveltekit

AI SDK bindings for SvelteKit — streaming, structured output, agents, server handlers, and remote functions

latest
Source
npmnpm
Version
0.12.0
Version published
Maintainers
1
Created
Source

@aibind/sveltekit

AI SDK bindings for SvelteKit. Reactive Svelte 5 classes, server handlers, remote functions, and agents — all wired up with sensible defaults.

Install

npm install @aibind/sveltekit ai svelte

Peer dependencies: svelte ^5.53, ai ^6.0, @sveltejs/kit ^2.53.

Quick Start

1. Add the stream handler

// src/hooks.server.ts
import { createStreamHandler } from "@aibind/sveltekit/server";
import { anthropic } from "@ai-sdk/anthropic";

export const handle = createStreamHandler({
  model: anthropic("claude-sonnet-4-20250514"),
});

2. Stream in a component

<script lang="ts">
  import { Stream } from "@aibind/sveltekit";

  const stream = new Stream({
    system: "You are a helpful assistant.",
  });

  let prompt = $state("");
</script>

<form
  onsubmit={(e) => {
    e.preventDefault();
    stream.send(prompt);
  }}
>
  <input bind:value={prompt} />
  <button disabled={stream.loading}>Send</button>
</form>

{#if stream.text}
  <p>{stream.text}</p>
{/if}

Entry Points

Import PathWhat You Get
@aibind/sveltekitStream, StructuredStream, defineModels
@aibind/sveltekit/servercreateStreamHandler, ServerAgent
@aibind/sveltekit/agentAgent
@aibind/sveltekit/remoteAIRemote
@aibind/sveltekit/historyReactiveChatHistory, ReactiveMessageTree
@aibind/sveltekit/markdownStreamMarkdown
@aibind/sveltekit/projectProject

Documentation

Full documentation, API reference, and guides: aibind.dev

License

MIT

Keywords

svelte

FAQs

Package last updated on 10 Mar 2026

Related posts