InlayDocs
Reference

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

LayerPackageWhat it is
Generated moduleinlay codegen outputOptional version-pinned hooks and typed tools/outputs/nodes/subagents for your agent; the provider comes from @inlayai/react
React bindings@inlayai/reactThe generic hooks underneath (useInlayChat, useInlayHistory) — the escape hatch and the surface the generated module types against
Core client@inlayai/sdkInlayChatClient, transports, all data types, row/timeline helpers
Next.js glue@inlayai/nextSession 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 ConversationStatus values.
  • One status. ChatSnapshot.status is 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 null you 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

On this page