Skip to main content
Version: 0.0.1-alpha.9.1

API Reference

The full TypeScript API reference is auto-generated from the SDK's source on every documentation build by docusaurus-plugin-typedoc, which drives TypeDoc over src/index.ts and renders the result as Markdown pages in this section.

Browse the generated pages under API Reference in the left sidebar. Because they come straight from the source, the signatures, parameter types, and doc comments there are always in sync with the published package — they are never hand-edited.

What the public surface looks like

src/index.ts is the single public entrypoint of @agent-assembly/sdk. Everything it re-exports is part of the supported surface (and everything it does not export is an internal detail). At a glance, the public exports are:

Functions

ExportPurpose
initAssemblyThe front door — resolve a gateway, detect frameworks, register the agent, wire adapters, and return an AssemblyContext. See Configuration.
withAssemblyLow-level wrapper that governs a tool map using a gateway client you supply. See Guides.
currentAgentIdRead the current agent id from the async-context lineage store.
runWithAgentIdRun a function with a given agent id bound in the lineage store, so spawned work inherits lineage.
encodeAuditEvent / decodeAuditEventConvert an AuditEvent to/from its JSON wire form (camelCase ⇄ snake_case).
encodeCallStackNode / decodeCallStackNodeSame, for a single CallStackNode.
findAasmBinaryLocate the aasm runtime binary on disk, or null if none is found.

Values

ExportPurpose
ENFORCEMENT_MODESRuntime-checkable list of valid EnforcementMode values (["enforce", "observe", "disabled"]).
INSTALL_HINTThe install-instructions string surfaced when the runtime binary is missing.

Types

AssemblyConfig, AssemblyContext, AssemblyMode, EnforcementMode, AuditEvent, CallStackNode, CallStackNodeKind, ToolMap, WithAssemblyOptions, WireAuditEvent, and WireCallStackNode.

The generated reference documents every one of these in full — follow the sidebar.

How regeneration works

The plugin runs as part of pnpm --dir website build. It reads src/index.ts, traverses every exported symbol, and writes Markdown pages under docs/06-api-reference/api/ (gitignored), which the autogenerated sidebar then nests inside this API Reference section. Navigation, search, and dark mode all work without extra configuration.

You do not need to commit anything under docs/06-api-reference/api/; the workflow regenerates it on each push to master.

Manual regeneration

For local preview during development:

cd website
pnpm start # dev server; TypeDoc runs on first start and on file change
pnpm build # full production build, regenerates the API reference

If TypeDoc itself fails (e.g. a missing tsconfig reference or a syntax error in src/index.ts), the Docusaurus build fails — fix the underlying TypeScript issue before retrying.