API reference
The complete SDK surface — every export of every package, with the semantics the signatures can't carry.
This is the complete reference for the Inlay SDK: every public export of
@inlayai/sdk, @inlayai/react, @inlayai/next, and the module inlay codegen generates for your agent. The guides teach; these pages are
for looking things up.
Completeness is enforced, not aspirational: the type tables on these pages are generated from the SDK sources at build time (a renamed field updates the page), and a CI check fails if an export in the packages' API reports has no home here.
The layers
| Layer | Package | What it is |
|---|---|---|
| Generated module | inlay codegen output | Optional version-pinned hooks and typed tools/outputs/nodes/subagents for your agent; the provider comes from @inlayai/react |
| React bindings | @inlayai/react | The generic hooks underneath (useInlayChat, useInlayHistory) — the escape hatch and the surface the generated module types against |
| Core client | @inlayai/sdk | InlayChatClient, transports, all data types, row/timeline helpers |
| Next.js glue | @inlayai/next | Session minting, server and browser halves |
Start with the generic SDK or add a generated module once you have a published version. Both use the same session and connection model. See the quickstart for access and installation prerequisites and typed clients for the optional CLI workflow.
Conventions
- camelCase everywhere. The wire and the Rust core stay snake_case; every
type JavaScript consumes is mapped at the boundary (the wasm serialization,
or the two REST mapping points). The only snake you'll meet is in request
bodies the client sends and in server vocabulary like
ConversationStatusvalues. - One status.
ChatSnapshot.statusis the single lifecycle answer —idle,streaming,awaitingInput,awaitingTool,completed,failed,cancelled. There is no phase/terminal pair to reconcile. - Absent is honest. Optional fields are absent for a reason the page
states (replayed-only fields, pre-identity servers, unparseable model
output) — never a placeholder, an empty string, or a
nullyou have to guess about. - Bound hooks. Handle members named
use*are React hooks — call them during render, unconditionally; they subscribe you to exactly the slice they return.
A sample table
Every table on these pages looks like this — generated from the sources, so it cannot drift:
Prop
Type
Pages
- The data model — rows, the chat snapshot, the run projection, views.
- @inlayai/sdk — the client, transport, errors, helpers.
- @inlayai/react — the chat handle, history, provider, store.
- @inlayai/next — session minting.
- The generated module — what
inlay codegenemits, by agent shape.