---
title: "Understand the agent harness contract"
description: "The agent harness coordinates model calls, tools, and delegated executors between one task submission and one terminal outcome."
lang: en
status: public-preview
lastUpdated: 2026-09-04
url: https://duale.ai/en/docs/agent-harness
---

## AI-generated summary

The agent harness coordinates model calls, tools, and delegated work so your application submits one task and receives one terminal outcome within a set deadline.

- Defines agent, task, and executor as the three objects that structure the work.
- The harness manages model routing, built-in tools, registered functions, and child executor delegation.
- The task contract stays stable regardless of the executor tree shape the harness chooses.
- Points to Executors and deadlines and Context continuity as the next guides to choose.

Summaries were generated by AI. Generative AI is experimental.

---

Your application submits one task and receives one terminal outcome. Between those points, the agent harness coordinates
models, tools, and delegated work within the deadline you set. Stored history and result handoffs keep context available
as the work progresses.

Your process handles calls to the tools it registered. Duale AI coordinates the rest, so your application does not call
a model provider or join delegated results itself.

## Agent, task, and executor

These objects describe different parts of the work.

| Object   | Meaning                                                                                           |
| -------- | ------------------------------------------------------------------------------------------------- |
| Agent    | The identity, tools, and access your application uses to submit work                              |
| Task     | One submission with an instruction, an absolute deadline, and one terminal outcome                |
| Executor | One bounded unit of agent work. The root carries the conversation; children handle delegated work |

[Agents and access](https://duale.ai/en/docs/agents-and-access.md) defines agent identity and access. [SDK
concepts](https://duale.ai/en/docs/sdk/concepts.md) defines the task and result contract.

Your application submits a task for an agent. The harness creates the executors needed to complete the task.

## What the harness coordinates

Duale AI coordinates the work needed to produce the terminal outcome:

- model calls through eligible routes, guided by the task's routing preferences;
- built-in document, web, and computation tools;
- calls to functions your process registered with `@tool`;
- delegation to child executors and the return of their results;
- stored task history, the active model context, and targeted recall.

```mermaid
flowchart LR
    accTitle: The managed loop from one task to one terminal outcome
    accDescr {
      Your application submits one task to a root executor. The executor can use
      built-in tools, call a tool registered by your process, or delegate focused
      work to a child executor. Child results return to the root, which produces
      the terminal outcome for your application.
    }
    App[Your application]
    Root[Root executor]
    BuiltIn[Built-in tools]
    Tool[Your registered tool]
    Child[Child executor]
    Outcome[Terminal outcome]

    App -->|task| Root
    Root --> BuiltIn
    Root --> Tool
    Root --> Child
    Child -->|result| Root
    Root --> Outcome
    Outcome --> App
```

The available sources depend on the agent's access and tools. [Authoring tools](https://duale.ai/en/docs/sdk/tools.md) defines the
functions your process supplies. [Libraries](https://duale.ai/en/docs/libraries.md) and [Web search](https://duale.ai/en/docs/web.md) explain the document
and web sources.

## One stable application contract

The harness can use different bounded executor trees for similar work without changing the task contract. Your
application provides the instruction, response model, deadline, and routing preferences, then receives one terminal
outcome.

[SDK concepts](https://duale.ai/en/docs/sdk/concepts.md) defines the task and terminal-outcome contract. Build your integration around that
contract and let the harness choose the executor-tree shape.

## Choose an Agent harness guide

- Use [Executors and deadlines](https://duale.ai/en/docs/agent-harness/executors.md) to understand branching, inherited deadlines, and
  Dashboard traces.
- Use [Context continuity](https://duale.ai/en/docs/agent-harness/context-continuity.md) to understand retained history and choose between
  delegation and `response.next()`.

## Related content

- [Understand nested executors and deadlines](https://duale.ai/en/docs/agent-harness/executors.md)
- [Divide agent ownership and access](https://duale.ai/en/docs/agents-and-access.md)
- [Secure your use of the platform](https://duale.ai/en/docs/security.md)
- [Keep context across long-running work](https://duale.ai/en/docs/agent-harness/context-continuity.md)
- [Understand model routing and the stable application contract](https://duale.ai/en/docs/model-routing.md)
- [Production runtime for durable AI agents](https://duale.ai/index.md)

---

## Sitemap

See the full [Markdown sitemap](https://duale.ai/sitemap.md) for all pages.
