agentskit.js
Packages

@agentskit/svelte

Svelte 5 chat store. Same contract as @agentskit/react.

Install

npm install @agentskit/svelte svelte @agentskit/adapters

Hello world

<script lang="ts">
import { createChatStore } from '@agentskit/svelte'
import { anthropic } from '@agentskit/adapters'

const chat = createChatStore({ adapter: anthropic({ apiKey, model: 'claude-sonnet-4-6' }) })
</script>

{#each $chat.messages as m (m.id)}
  <p>{m.content}</p>
{/each}
<form on:submit|preventDefault={() => chat.send($chat.input)}>
  <input bind:value={$chat.input} />
</form>

Surface

  • createChatStore(config): SvelteChatStoreReadable<ChatState> + action methods + destroy().

Siblings

React · Vue · Solid · React Native · Angular · Ink

Source

npm: @agentskit/svelte · repo: packages/svelte

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page