@agentskit/vue
v0.3.2
Published
Vue 3 composable + headless chat components for AgentsKit — streaming, tools, and memory across any LLM provider.
Downloads
541
Maintainers
Readme
@agentskit/vue
Vue 3 composable + headless chat components. Same ChatReturn contract every AgentsKit framework binding ships — swap frameworks without changing your agent.
Tags: ai · agents · llm · agentskit · vue · vue3 · composable · chat · streaming
Why
- One contract, every framework —
useChatreturns the exact same shape as the React / Svelte / Solid / Angular / RN / Ink bindings. - Composition API native — values surface as
refs; drops into<script setup>with zero glue. - Headless by default — components emit
data-ak-*attributes; bring your own styling. - Streaming, tools, HITL — all core features work identically to
@agentskit/react.
Install
npm install @agentskit/vue @agentskit/adaptersPeers: vue ^3.4.
Quick example
<script setup lang="ts">
import { useChat } from '@agentskit/vue'
import { anthropic } from '@agentskit/adapters'
const chat = useChat({
adapter: anthropic({ apiKey: import.meta.env.VITE_ANTHROPIC_API_KEY, model: 'claude-sonnet-4-6' }),
})
</script>
<template>
<div data-ak-chat>
<p v-for="m in chat.messages" :key="m.id" :data-ak-role="m.role">{{ m.content }}</p>
<form @submit.prevent="chat.send(chat.input)">
<input
:value="chat.input"
:disabled="chat.status === 'streaming'"
@input="(e) => chat.setInput((e.target as HTMLInputElement).value)"
/>
</form>
</div>
</template>State is reactive — read chat.messages / chat.input directly (no .value).
API
useChat(config)— composable returningChatReturn: reactivemessages,status,input,error,usage+ actionssend(text),setInput(v),stop,retry,clear,approve,deny,edit,regenerate.<ChatContainer :config>— batteries-included headless container.- Headless primitives at parity with
@agentskit/react:Message,InputBar,Markdown,CodeBlock,ToolCallView,ThinkingIndicator,ToolConfirmation— each emitsdata-ak-*only.
Ecosystem
| Package | Role |
|---------|------|
| @agentskit/core | ChatReturn contract |
| @agentskit/adapters | LLM providers |
| @agentskit/tools | Built-in + integration tools |
| @agentskit/memory | Chat + vector backends |
| @agentskit/react · svelte · solid · react-native · angular · ink | Same contract, different host |
Contributors
License
MIT — see LICENSE.
