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

# System Contract

> What a connected system emits and what it can do.

A system contract is the written way to define the capabilities of a [connected system](https://documentation.aibydna.com/desp/concepts/connected-system.md).
This contract will be used later by D.E.S.P in order to take a decision.

Per Connected System you have a System Contract that includes:

* What [State](https://documentation.aibydna.com/desp/concepts/state.md) events this system will emit.
* What are the capabilities of this system.

## How Deltas are checked against the contract

When a [Delta](https://documentation.aibydna.com/desp/concepts/delta.md) arrives, [Aether](https://documentation.aibydna.com/desp/concepts/aether.md) checks its event against the system's contract:

| Case | What happens |
| - | - |
| The system has no contract yet | Aether creates one containing the event. |
| The event is not in the contract | Aether adds it to the contract. Its payload schema is inferred from this first payload. |
| The event is in the contract | The payload is validated against the event's schema. A mismatch is rejected with `422 contract_violation`. |

An event added this way is marked `PROGRESS` (not final). Review it in the [Aether Dashboard](https://documentation.aibydna.com/desp/aether/dashboard.md) and edit its kind or schema if needed.

> [!WARNING]
>
> A misspelled or invented event name is not rejected: it becomes a new event in the contract. Make sure your systems only send the events you declared, e.g. by passing the contract to AI agents in their prompt.

> [!NOTE]
>
> The first payload of a new event must give each field a clear type. A field that is `null`, or an array that is empty or mixes types, is rejected with `422 contract_violation`. Declare the event in the contract first, or send typed values.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.