> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebuno.io/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK

Build agents and clients for Rebuno. The SDK is ESM-only, has no runtime
dependencies, and needs Node 22 or later. See the
[Quickstart](/sdk/typescript/getting-started) to install and run it.

## What you write

You write one ordinary async function. Rebuno runs that handler for you. Route
every non-deterministic effect through the kernel, which records the outcome.
Three ways to do it:

<Columns cols={3}>
  <Card title="defineTool" icon="wrench" href="/sdk/typescript/tools">
    Records a `tool_call` step: actions the agent takes, such as a search, an
    email, or a database write.
  </Card>

  <Card title="rebunoFetch" icon="brain" href="/sdk/typescript/llm-calls">
    Records an `llm_call` step: calls to an LLM provider.
  </Card>

  <Card title="step" icon="clock" href="/sdk/typescript/steps">
    Records a `local` step: local non-determinism such as the clock, a random
    choice, or a fresh id.
  </Card>
</Columns>

On a re-dispatch the handler runs again from the top. Any step with a recorded
result replays it instead of running a second time.

## Sections

<Columns cols={2}>
  <Card title="Quickstart" icon="rocket" href="/sdk/typescript/getting-started">
    Install, configure, and run a complete example.
  </Card>

  <Card title="Agents" icon="robot" href="/sdk/typescript/agents">
    The `Agent` host, input validation, `serve` vs `fetch`, and lifecycle.
  </Card>

  <Card title="Tools" icon="wrench" href="/sdk/typescript/tools">
    `defineTool`, `wrapTool`, idempotency, blocking work, and MCP tools.
  </Card>

  <Card title="LLM calls" icon="brain" href="/sdk/typescript/llm-calls">
    `rebunoFetch` and `createRebunoFetch`.
  </Card>

  <Card title="Steps" icon="clock" href="/sdk/typescript/steps">
    `step()` for durable local work.
  </Card>

  <Card title="Clients" icon="plug" href="/sdk/typescript/client">
    Creating and inspecting executions, and approvals.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/sdk/typescript/errors">
    The error class hierarchy.
  </Card>

  <Card title="How it works" icon="gears" href="/sdk/typescript/internals">
    Step identity, replay, heartbeats, and the kernel protocol.
  </Card>
</Columns>
