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 package
@agentskit/chatat exact version0.3.0and import renderer and protocol APIs from its/reactand/protocolsubpaths. Its published manifest resolves the internal graph without host overrides. - Build one
defineChatdefinition with the public standard component manifest, an AgentsKitAdapterFactory, andChatMemory. - Load and verify the Playbook-owned deterministic artifact on first intent; exact patterns, prompts, templates, scripts, phases, and navigation answer locally before the fallback adapter is considered.
- 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 host shell lives in components/ask-widget.tsx; deterministic composition
lives in lib/discovery.ts; artifact generation lives in
scripts/lib/playbook-discovery.mjs. Do not add a reducer, stream loop, message
store, cancellation state, matcher, or 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; - verified local answers, ambiguity choices, semantic escalation, artifact failure/retry, and truthful local/backend provenance;
- 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.
Local-first pattern discovery
See which Playbook questions answer instantly in the browser and when repository-specific synthesis uses the backend.
Onboard Your Agent
One paste that feeds any coding agent the whole playbook and has it audit your repo — Claude Code, Cursor, Windsurf, Codex, Copilot, and more.