[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71V551MRAJENMVATZZBDP4M":3,"skill-same:01M71V551MRAJENMVATZZBDP4M":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M71V551MRAJENMVATZZBDP4M","runtime",null,"Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread\u002Fmessage data.","AkaraChen\u002Fangel-engine","AkaraChen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85140972?v=4","01M6E197RY34TPAFK03227R387","01M71V2QPZM89DQ8R1AB7021P4",19,"MIT","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fruntime\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"assistant","state management","state","ui","data","system","management","guide","use","message","runtimes","with","for","thread","when","2026-11-10 13:02:02",false,"---\nname: runtime\ndescription: Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread\u002Fmessage data.\nversion: 0.0.1\nlicense: MIT\n---\n\n# assistant-ui Runtime\n\n**Always consult [assistant-ui.com\u002Fllms.txt](https:\u002F\u002Fassistant-ui.com\u002Fllms.txt) for latest API.**\n\n## References\n\n- [.\u002Freferences\u002Flocal-runtime.md](.\u002Freferences\u002Flocal-runtime.md) -- useLocalRuntime deep dive\n- [.\u002Freferences\u002Fexternal-store.md](.\u002Freferences\u002Fexternal-store.md) -- useExternalStoreRuntime deep dive\n- [.\u002Freferences\u002Fthread-list.md](.\u002Freferences\u002Fthread-list.md) -- Thread list management\n- [.\u002Freferences\u002Fstate-hooks.md](.\u002Freferences\u002Fstate-hooks.md) -- State access hooks\n- [.\u002Freferences\u002Ftypes.md](.\u002Freferences\u002Ftypes.md) -- Type definitions\n\n## Runtime Hierarchy\n\n```\nAssistantRuntime\n├── ThreadListRuntime (thread management)\n│   ├── ThreadListItemRuntime (per-thread item)\n│   └── ...\n└── ThreadRuntime (current thread)\n    ├── ComposerRuntime (input state)\n    └── MessageRuntime[] (per-message)\n        └── MessagePartRuntime[] (per-content-part)\n```\n\n## State Access (Modern API)\n\n```tsx\nimport { useAui, useAuiState, useAuiEvent } from \"@assistant-ui\u002Freact\";\n\nfunction ChatControls() {\n  const api = useAui();\n  const messages = useAuiState(s => s.thread.messages);\n  const isRunning = useAuiState(s => s.thread.isRunning);\n\n  useAuiEvent(\"composer.send\", (e) => {\n    console.log(\"Sent in thread:\", e.threadId);\n  });\n\n  return (\n    \u003Cdiv>\n      \u003Cbutton onClick={() => api.thread().append({\n        role: \"user\",\n        content: [{ type: \"text\", text: \"Hello!\" }],\n      })}>\n        Send\n      \u003C\u002Fbutton>\n      {isRunning && (\n        \u003Cbutton onClick={() => api.thread().cancelRun()}>Cancel\u003C\u002Fbutton>\n      )}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Thread Operations\n\n```tsx\nconst api = useAui();\nconst thread = api.thread();\n\n\u002F\u002F Append message\nthread.append({ role: \"user\", content: [{ type: \"text\", text: \"Hello\" }] });\n\n\u002F\u002F Cancel generation\nthread.cancelRun();\n\n\u002F\u002F Get current state\nconst state = thread.getState();  \u002F\u002F { messages, isRunning, ... }\n```\n\n## Message Operations\n\n```tsx\nconst message = api.thread().message(0);  \u002F\u002F By index\n\nmessage.edit({ role: \"user\", content: [{ type: \"text\", text: \"Updated\" }] });\nmessage.reload();\n```\n\n## Events\n\n```tsx\nuseAuiEvent(\"thread.runStart\", () => {});\nuseAuiEvent(\"thread.runEnd\", () => {});\nuseAuiEvent(\"composer.send\", ({ threadId }) => {\n  console.log(\"Sent in thread:\", threadId);\n});\nuseAuiEvent(\"thread.modelContextUpdate\", () => {});\n```\n\n## Capabilities\n\n```tsx\nconst caps = useAuiState(s => s.thread.capabilities);\n\u002F\u002F { cancel, edit, reload, copy, speak, attachments }\n```\n\n## Quick Reference\n\n```tsx\n\u002F\u002F Get messages\nconst messages = useAuiState(s => s.thread.messages);\n\n\u002F\u002F Check running state\nconst isRunning = useAuiState(s => s.thread.isRunning);\n\n\u002F\u002F Append message\napi.thread().append({ role: \"user\", content: [{ type: \"text\", text: \"Hi\" }] });\n\n\u002F\u002F Cancel generation\napi.thread().cancelRun();\n\n\u002F\u002F Edit message\napi.thread().message(index).edit({ ... });\n\n\u002F\u002F Reload message\napi.thread().message(index).reload();\n```\n\n## Common Gotchas\n\n**\"Cannot read property of undefined\"**\n- Ensure hooks are called inside `AssistantRuntimeProvider`\n\n**State not updating**\n- Use selectors with `useAuiState` to prevent unnecessary re-renders\n\n**Messages array empty**\n- Check runtime is configured\n- Verify API response format\n","# assistant-ui Runtime\n\n**Always consult [assistant-ui.com\u002Fllms.txt](https:\u002F\u002Fassistant-ui.com\u002Fllms.txt) for latest API.**\n\n## References\n\n- [.\u002Freferences\u002Flocal-runtime.md](.\u002Freferences\u002Flocal-runtime.md) -- useLocalRuntime deep dive\n- [.\u002Freferences\u002Fexternal-store.md](.\u002Freferences\u002Fexternal-store.md) -- useExternalStoreRuntime deep dive\n- [.\u002Freferences\u002Fthread-list.md](.\u002Freferences\u002Fthread-list.md) -- Thread list management\n- [.\u002Freferences\u002Fstate-hooks.md](.\u002Freferences\u002Fstate-hooks.md) -- State access hooks\n- [.\u002Freferences\u002Ftypes.md](.\u002Freferences\u002Ftypes.md) -- Type definitions\n\n## Runtime Hierarchy\n\n```\nAssistantRuntime\n├── ThreadListRuntime (thread management)\n│   ├── ThreadListItemRuntime (per-thread item)\n│   └── ...\n└── ThreadRuntime (current thread)\n    ├── ComposerRuntime (input state)\n    └── MessageRuntime[] (per-message)\n        └── MessagePartRuntime[] (per-content-part)\n```\n\n## State Access (Modern API)\n\n```tsx\nimport { useAui, useAuiState, useAuiEvent } from \"@assistant-ui\u002Freact\";\n\nfunction ChatControls() {\n  const api = useAui();\n  const messages = useAuiState(s => s.thread.messages);\n  const isRunning = useAuiState(s => s.thread.isRunning);\n\n  useAuiEvent(\"composer.send\", (e) => {\n    console.log(\"Sent in thread:\", e.threadId);\n  });\n\n  return (\n    \u003Cdiv>\n      \u003Cbutton onClick={() => api.thread().append({\n        role: \"user\",\n        content: [{ type: \"text\", text: \"Hello!\" }],\n      })}>\n        Send\n      \u003C\u002Fbutton>\n      {isRunning && (\n        \u003Cbutton onClick={() => api.thread().cancelRun()}>Cancel\u003C\u002Fbutton>\n      )}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Thread Operations\n\n```tsx\nconst api = useAui();\nconst thread = api.thread();\n\n\u002F\u002F Append message\nthread.append({ role: \"user\", content: [{ type: \"text\", text: \"Hello\" }] });\n\n\u002F\u002F Cancel generation\nthread.cancelRun();\n\n\u002F\u002F Get current state\nconst state = thread.getState();  \u002F\u002F { messages, isRunning, ... }\n```\n\n## Message Operations\n\n```tsx\nconst message = api.thread().message(0);  \u002F\u002F By index\n\nmessage.edit({ role: \"user\", content: [{ type: \"text\", text: \"Updated\" }] });\nmessage.reload();\n```\n\n## Events\n\n```tsx\nuseAuiEvent(\"thread.runStart\", () => {});\nuseAuiEvent(\"thread.runEnd\", () => {});\nuseAuiEvent(\"composer.send\", ({ threadId }) => {\n  console.log(\"Sent in thread:\", threadId);\n});\nuseAuiEvent(\"thread.modelContextUpdate\", () => {});\n```\n\n## Capabilities\n\n```tsx\nconst caps = useAuiState(s => s.thread.capabilities);\n\u002F\u002F { cancel, edit, reload, copy, speak, attachments }\n```\n\n## Quick Reference\n\n```tsx\n\u002F\u002F Get messages\nconst messages = useAuiState(s => s.thread.messages);\n\n\u002F\u002F Check running state\nconst isRunning = useAuiState(s => s.thread.isRunning);\n\n\u002F\u002F Append message\napi.thread().append({ role: \"user\", content: [{ type: \"text\", text: \"Hi\" }] });\n\n\u002F\u002F Cancel generation\napi.thread().cancelRun();\n\n\u002F\u002F Edit message\napi.thread().message(index).edit({ ... });\n\n\u002F\u002F Reload message\napi.thread().message(index).reload();\n```\n\n## Common Gotchas\n\n**\"Cannot read property of undefined\"**\n- Ensure hooks are called inside `AssistantRuntimeProvider`\n\n**State not updating**\n- Use selectors with `useAuiState` to prevent unnecessary re-renders\n\n**Messages array empty**\n- Check runtime is configured\n- Verify API response format\n",{"name":5,"license":14,"version":38,"description":7},"0.0.1","master","48a57981043dbb2c534a27f410715a205f50bcfb",".agents\u002Fskills\u002Fruntime",2,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine","https:\u002F\u002Fangel-engine.vercel.app\u002F","https:\u002F\u002Fgithub.com\u002FAkaraChen","https:\u002F\u002Fakr.moe","button painter, string concatenator, log alchemist.\r\n\r\nNo slop, no lag.","2026-09-09 08:58:26",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add AkaraChen\u002Fangel-engine --skill runtime",{"tool":55,"command":56},"bunx","bunx skills add AkaraChen\u002Fangel-engine --skill runtime",{"tool":58,"command":59},"pnpm","pnpm dlx skills add AkaraChen\u002Fangel-engine --skill runtime","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fruntime\u002FSKILL.md",true,[63,69,73,77,81],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fexternal-store.md","REFERENCE","参考文档",7515,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fruntime\u002Freferences\u002Fexternal-store.md",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Flocal-runtime.md",6524,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fruntime\u002Freferences\u002Flocal-runtime.md",{"path":74,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fstate-hooks.md",6214,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fruntime\u002Freferences\u002Fstate-hooks.md",{"path":78,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fthread-list.md",7325,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fruntime\u002Freferences\u002Fthread-list.md",{"path":82,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Ftypes.md",3810,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fruntime\u002Freferences\u002Ftypes.md",[86,98,116,130,143,158],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":33},"01M71V8NX6JM9719CJM1R07JNF","update","Update assistant-ui and AI SDK to latest versions. Detects current versions, identifies breaking changes, and executes migrations.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fupdate\u002FSKILL.md",[],[88,93,94,95,96,21,97,18],"changes","latest","migrations","ai sdk","sdk",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":33},"01M71V8GA53EWDYMKDCE95JN9M","tools","Guide for tool registration and tool UI in assistant-ui. Use when implementing LLM tools, tool call rendering, or human-in-the-loop patterns.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftools\u002FSKILL.md",[],[105,106,21,18,107,108,32,30,109,110,111,112,113,114,115,26,25],"Tools","human-in-the-loop","tool","implementing","loop","rendering","human","llm tools","call","patterns","registration",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":33},"01M71V8EK5HG1TY1JSJA9ZG6RA","thread-list","Guide for multi-thread management in assistant-ui. Use when implementing thread lists, switching threads, or managing conversation history.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fthread-list\u002FSKILL.md",[],[123,124,31,125,32,30,108,126,127,128,26,25,24,129,21,18],"list","thread list","multi","threads","switching","conversation","history",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":33},"01M71V8CQ30TTQP2KHPYCGCR3R","streaming","Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fstreaming\u002FSKILL.md",[],[132,137,138,32,139,30,108,26,25,140,141,142,18],"custom","issues","stream","protocols","package","debugging",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":33},"01M71V86CFGGT33XS5FCVAYPVG","setup","Setup and configure assistant-ui in a project. Use when installing packages, configuring runtimes, setting up chat UI, or troubleshooting setup issues.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fsetup\u002FSKILL.md",[],[145,150,151,21,138,152,18,26,153,32,154,28,155,156,157],"troubleshooting","configure","packages","setting","chat ui","project","chat","up",{"skillNo":159,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":33},"01M71V84DGS3SN4VJ829MHNBB8","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002FSKILL.md",[],[5,28,32,31,30,29,27,26,25,24,23,22,21,20,19,18]]