Skip to content

Decision records ​

This page: the architectural decisions behind the scaffolder and the app it generates: what was chosen, and what it was chosen against.

The two that explain the architecture ​

Worth reading even if you never change the template. Between them they answer "why is there a host layer at all" and "why is a dangerous operation shaped the way it is".

ADRDecisionWhy it matters
0010Consequence is gated by a server approval, not a frontend confirmationBind for context, gate for consequence: the rule that decides how every consequential operation is exposed, and the one mistake the template is built to make obvious
0002An application-owned host protocol instead of @assistant-ui/react-ai-sdkWhy the Agent Host is code you can read. Everything in Host protocol follows from it

All records ​

ADRStatusDecisionWhy it matters
0001acceptedConsume published @agent-surface/* and @orpc-agent/*Generated apps depend on npm versions, not a workspace layout that cannot be scaffolded
0002acceptedAn application-owned host protocolAvoids an ai@5 / ai@7 split-brain, and makes composition, dispatch and correlation code you can read
0003acceptedPin the AI SDK to the v5 line@orpc-agent/ai-sdk peers on ai@^5; the host protocol isolates the browser from this choice
0004acceptedA JSON file store, not SQLiteZero native dependencies (the most common create-* install failure), and state survives restarts
0005accepted · amendedConfirmation mode wait, executed between protocol stepsA human decision never holds a streaming response open
0006acceptedA scripted LanguageModelV2 for the live path in CIThe whole production pipeline is tested with zero credentials
0007acceptedDemo identity as a server-signed cookieRoles are never read from a request body or tool input; one file is the seam for real auth
0008supersededA model key could be connected from the browserThe feature is gone. Kept for why a single shared process makes that dangerous
0009acceptedThe host answers server tool calls the runtime leaves openFound with a live model, not by tests: a batched call otherwise strands the UI and malforms the model's history
0010acceptedConsequence is gated by a server approvalA contextual binding reaches the server as a direct call, so binding a dangerous operation quietly weakens it
0011acceptedThe agent surface is compiled from source, not discovered at runtime"What can the model do in this app" stops being a question only a running app can answer

Adding one ​

Architectural decisions get an ADR in docs/adr/, numbered sequentially, with the same shape: Status · Context · Decision · Consequences. Add it to the table above and to the sidebar in docs/.vitepress/config.ts.

A decision that replaces an earlier one does not delete it: set the old record's status to superseded, and open it with what replaced it and what is still worth reading. ADR-0008 is the worked example. See Contributing.

Built on Agent Surface, oRPC Agent, Mastra and assistant-ui.