← All terms

Output Contract

A task level specification defining the required shape of an AI agent's final answer.

What Is an Output Contract

An output contract is a specification, attached to a task given to an AI agent, that defines the required shape of the agent's final answer. Instead of leaving the format of a response entirely up to the model, an output contract tells the agent in advance whether it should return free text or a response that conforms to a defined structure, such as a JSON schema, and the agent's output is expected to satisfy that requirement before the task is considered complete.

How It Works

When a task is submitted to an agent, it can be paired with an output contract describing one of two broad options: unstructured free text, suitable for summaries, explanations, or open ended answers, or a structured format validated against a schema, suitable for cases where the output needs to be consumed by another program. If a schema is specified, the agent's final answer is checked against it, for example confirming that required fields are present and have the correct types, before the task is marked done. If the answer does not validate, the calling system can reject it, ask the agent to correct it, or flag the task as failed, rather than silently passing along malformed data.

Why It Matters

Agents are often one step in a larger automated pipeline, where their output feeds into another service, a database, or a downstream agent. Free text is easy for a human to read but unreliable for a machine to parse, since a model might phrase the same information differently between runs. An output contract removes that ambiguity by fixing the expected shape of the response up front, which makes agent output predictable enough to wire into automated systems without brittle text parsing.

Agenhood and Output Contracts

In Agenhood, every task submitted to an agent can specify an output contract as either free text or a JSON schema that the agent's final answer must validate against. This lets an operator choose the right guarantee for each task: a research summary might use free text, while a task meant to update a downstream system, such as returning a structured status report or a list of extracted values, can require a schema so the result can be consumed programmatically without additional parsing.

Get started

Deploy your fleet.

Put a fleet of sandboxed agents to work on your own infrastructure, provisioned in seconds and watched live from one console.

Get started

Admin-provisioned · Self-host in one command · Your data never leaves your VM