assistant-ui-runtime

Featured

Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread/message data.

AI & Automation 2,894 stars 189 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# assistant-ui Runtime **Always consult [assistant-ui.com/llms.txt](https://assistant-ui.com/llms.txt) for latest API.** ## References - [./references/local-runtime.md](./references/local-runtime.md) -- useLocalRuntime deep dive - [./references/external-store.md](./references/external-store.md) -- useExternalStoreRuntime deep dive - [./references/thread-list.md](./references/thread-list.md) -- Thread list management - [./references/state-hooks.md](./references/state-hooks.md) -- State access hooks - [./references/types.md](./references/types.md) -- Type definitions ## Runtime Hierarchy ``` AssistantRuntime ├── ThreadListRuntime (thread management) │ ├── ThreadListItemRuntime (per-thread item) │ └── ... └── ThreadRuntime (current thread) ├── ComposerRuntime (input state) └── MessageRuntime[] (per-message) └── MessagePartRuntime[] (per-content-part) ``` ## State Access (Modern API) ```tsx import { useAui, useAuiState, useAuiEvent } from "@assistant-ui/react"; function ChatControls() { const api = useAui(); const messages = useAuiState(s => s.thread.messages); const isRunning = useAuiState(s => s.thread.isRunning); useAuiEvent("composer.send", (e) => { console.log("Sent in thread:", e.threadId); }); return ( <div> <button onClick={() => api.thread().append({ role: "user", content: [{ type: "text", text: "Hello!" }], })}> Send </button> {isRunning && ( <button onClick={() => ...

Details

Author
compozy
Repository
compozy/compozy
Created
7 months ago
Last Updated
today
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category