Type API
The symbol-level reference is generated from the source, not written by hand. Browse it at Type API, or reach it from the top navigation.
What it covers
Every public entry point is documented from its declarations, one page per entry point:
Because it is generated, it always matches the shipped types: signatures, unions, defaults, and the error classes each surface can throw. When this Reference section and the generated pages disagree, the generated pages are correct.
How the pages are organized
/api/ lists the modules. Each module page is named after the entry point's source path
with .ts and a trailing /index dropped (agent-bundle/routes is compiled from
routes/authoring.ts, so its page is routes/authoring; agent-bundle/app from app/index.ts is
app; the root agent-bundle export is index, served at /api/index-1 because /api/ is the
module index itself) and groups its members under Classes, Interfaces, Type Aliases,
Variables, and Functions. A name an entry point re-exports from another entry point is listed under
References with a link to the page that documents it, runEvals on index points to
runEvals on api.
Every member is a heading, so it has a URL: /api/<module>#<member>, the fragment being the name
lowercased with () dropped, /api/eval#defineevalsuite documents
defineEvalSuite. Ids are unique per page: when the same text already appears higher up, a
property named build, or AgentEventPayloadFields beside agentEventPayloadFields, the later
heading is suffixed, so build in agent-bundle/api is #build-2. The #
link beside each heading carries its exact id.
Generated pages are language-neutral
The site mirrors the generated reference under both locales, so /api/ and /zh/api/ resolve for readers of either language. The content is not translated: the Chinese copy is the English Markdown with a notice under each page title saying so, and the symbol documentation stays in the language it was authored in.
That is deliberate. A translated copy of generated output would drift from the source on the first refactor, and a symbol reference whose types are current but whose prose is stale is worse than one that is honestly monolingual. Hand-written pages, everything in the Guide and the rest of this Reference, are complete translations.
Where to start
- Compiling from a script:
buildandvalidateinagent-bundle/api. - Calling typed tools from an MCP App:
createAppClientinagent-bundle/app, explained in The typed App client. - Writing tests:
renderRoute,expectDocument, and the matrices inagent-bundle/test, explained in Testing. - Writing evals:
defineEvalSuiteand the assertions inagent-bundle/eval, explained in Evaluations.