agentskit.js
For agents

@agentskit/svelte — for agents

Svelte 5 store for AgentsKit.

Install

npm install @agentskit/svelte
# peer:
npm install svelte

Primary exports

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

Minimal example

<script lang="ts">
import { createChatStore } from '@agentskit/svelte'
const chat = createChatStore({ adapter })
</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>

Source

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

On this page