AgentsKit Chat dogfood
How Ask Playbook composes the public AgentsKit Chat framework without recreating chat state.
Ask Playbook on AgentsKit Chat
Ask Playbook is a production dogfood host for
@agentskit/chat. The host
keeps the playbook corpus, endpoint, brand, CTA, and CSS. AgentsKit Chat owns
the definition, session, ordered content, standard components, and React shell;
AgentsKit owns messages, streaming, memory, cancellation, retry, editing, and
regeneration.
Host recipe
- Pin the stable npm packages
@agentskit/chat,@agentskit/chat-protocol, and@agentskit/chat-reactat exact version0.2.0. Their published manifests resolve the internal graph without host overrides. - Build one
defineChatdefinition with the public standard component manifest, an AgentsKitAdapterFactory, andChatMemory. - Project the Ask service's validated NDJSON records into ordered text and the
standard
source-listcomponent. Unknown records stay inert. - Render
AgentChatand use native React slots only for Playbook branding, linked prose, the composer, loading copy, and citations. - Keep
corpus="playbook"andNEXT_PUBLIC_ASK_ENDPOINTin this host.
The implementation lives in components/ask-widget.tsx and
components/ask-chat/ask-adapter.ts. Do not add a reducer, stream loop, message
store, cancellation state, or a second component protocol to the host.
Migration and parity evidence
The former widget managed messages, streaming, AbortController, NDJSON,
sessionStorage, message rendering, and scrolling itself. It was removed only
after the AgentsKit Chat integration covered:
- text, citations, errors, done, malformed and unknown records;
- cancellation through the public adapter source;
- migration from
ak:ask-thread-v2:playbookto canonical serialized memory; - safe, bounded citations and ordered text +
source-listrendering; - empty/loading states, close, clear, send, stop, retry, edit, and regenerate;
- production build plus responsive evidence at 375, 768, 1280, and 1440 px, with no sub-44 px panel targets.
See AgentsKit Chat issue #27 for the shared Registry/Playbook evidence and upstream-adoption record.