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

# The Agent Harness SDK

The Agent Harness SDK is the package `@telnyx/agent-harness`. Its export is `createHarness(spec)`, which builds a harness from `spec`. Anything that implements the turn taking drives the harness.

The harness never touches the runtime directly. It dictates what it needs from the runtime layer through the ports contract, and whatever implements the contract can host the harness; see [Ports](/docs/agent-sdk/harness-sdk/ports) for detail.

| Export | What it is |
| - | - |
| `@telnyx/agent-harness` | `createHarness`, the ports contract, and the runtime adapter that builds ports from an instance of the Agent Runtime SDK's [`Agent`](/docs/agent-sdk/runtime-sdk) class, and a generic channel contract for discrete-message channels. |
| `@telnyx/agent-harness/node` | A plain-Node ports adapter for tests, in memory with a file-backed SQLite database. |
| `@telnyx/agent-harness/contract` | The executable ports contract, version 2, that any host adapter must pass. |

The pages document the harness in three parts.

**The Interface** is what is exposed to the layer above, the call that builds a harness and the harness it returns.

| Group | What it is for |
| - | - |
| [createHarness()](/docs/agent-sdk/harness-sdk/create-harness) | Build a harness from a spec. |
| [Turns](/docs/agent-sdk/harness-sdk/harness/turn) | Run one input through the model and the tools. |
| [Runs](/docs/agent-sdk/harness-sdk/harness/accept) | Admit inputs as persistent runs, execute and recover them, and decide their approvals. |

**Plug-ins** are the parts the package ships for plugging into the harness.

| Plug-in | What it is for |
| - | - |
| [Virtual Workspace](/docs/agent-sdk/harness-sdk/plug-ins/workspace) | Give the model a per-instance text store with skills, as tools. |
| [Scheduling](/docs/agent-sdk/harness-sdk/plug-ins/scheduling) | Let the model schedule its own follow-ups. |
| [Middleware](/docs/agent-sdk/harness-sdk/plug-ins/middleware) | Wrap a turn, a model step or a tool call. |

**The Internals** is how the harness is implemented over the ports contract.

| Group | What it is |
| - | - |
| [Ports](/docs/agent-sdk/harness-sdk/ports) | What the harness requires from the runtime. |
| [Adapters](/docs/agent-sdk/harness-sdk/adapters/runtime) | Implementations of the ports contract, and the suite that checks one. |
| [Persistence](/docs/agent-sdk/harness-sdk/persistence/run-ledger) | The run ledger and the step memo behind persistent runs. |
| [Channels](/docs/agent-sdk/harness-sdk/channels/router) | A generic contract for discrete-message channels. |

> [!WARNING]
>
> **Beta.** `@telnyx/agent-harness` is at 0.1.0-beta.2. It depends on `@telnyx/edge-runtime` `^0.16.1` and requires Node 22.13 or later. Its tools are AI SDK tools from `ai` 6.0.266, the exact version it depends on, and a tool set built with another version of `ai` does not type-check against it.
