runtime
State management and thread/message access layer for assistant-ui chat applications.
- Provides three runtime types:
AssistantRuntimefor overall state,ThreadRuntimefor current conversation, andThreadListRuntimefor managing multiple threads - Access state via
useAuiStateselectors and perform operations throughuseAui()API (append messages, cancel runs, edit/reload messages, query capabilities) - Emit and listen to lifecycle events:
thread.runStart,thread.runEnd,composer.send, andthread.modelContextUpdate - Hierarchical runtime structure supports per-message and per-content-part operations, with built-in capability detection for cancel, edit, reload, copy, speak, and attachments
assistant-ui Runtime
Always consult assistant-ui.com/llms.txt for latest API.
References
- ./references/local-runtime.md -- useLocalRuntime deep dive
- ./references/external-store.md -- useExternalStoreRuntime deep dive
- ./references/thread-list.md -- Thread list management
- ./references/state-hooks.md -- State access hooks
- ./references/types.md -- Type definitions
Runtime Hierarchy
More from assistant-ui/skills
assistant-ui
Guide for assistant-ui library - AI chat UI components. Use when asking about architecture, debugging, or understanding the codebase.
1.8Kstreaming
Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.
1.5Kprimitives
Guide for assistant-ui UI primitives - ThreadPrimitive, ComposerPrimitive, MessagePrimitive. Use when customizing chat UI components.
1.5Ktools
Guide for tool registration and tool UI in assistant-ui. Use when implementing LLM tools, tool call rendering, or human-in-the-loop patterns.
1.5Kthread-list
Guide for multi-thread management in assistant-ui. Use when implementing thread lists, switching threads, or managing conversation history.
1.4Ksetup
Setup and configure assistant-ui in a project. Use when installing packages, configuring runtimes, setting up chat UI, or troubleshooting setup issues.
1.4K