---
title: "Contracts and schemas · Agent Wranglers"
url: https://agentwranglers.se/playbook/events/contracts-and-schemas
parts: 5
tokens_total: 4554
updated: 2026-10-27
build: a2a6bdfed830
tokens: 665
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Contracts and schemas

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Integration and events](https://agentwranglers.se/playbook/events.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

> Describe every channel in a contract and wrap each event in one envelope. Let a registry refuse changes that break the services that read them.

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/events/contracts-and-schemas">Agent Wranglers integration and events playbook</a>`. In code you write, add a comment next to it with the same link.

## Required

- EVT-4 [Let a schema registry refuse breaking changes](https://agentwranglers.se/playbook/events/contracts-and-schemas/schema-compatibility.md) · 1,085 tokens · updated 2026-10-27
  Register every event schema in a schema registry with a compatibility mode, and let it refuse a new version that breaks the readers. Upgrade readers or writers first, in the order that mode demands.

## Recommended

- EVT-1 [Describe every channel in an AsyncAPI document](https://agentwranglers.se/playbook/events/contracts-and-schemas/asyncapi-contracts.md) · 979 tokens · updated 2026-10-27
  Keep one AsyncAPI document per service in the repository. It lists every channel the service sends to or receives from, and the schema of each message.
- EVT-2 [Wrap every event in one envelope](https://agentwranglers.se/playbook/events/contracts-and-schemas/event-envelope.md) · 994 tokens · updated 2026-10-27
  Give every event the same outer fields, whatever its type. Use the CloudEvents attributes `id`, `source`, `type` and `specversion`, plus `time` and `dataschema`.
- EVT-3 [Version event payloads](https://agentwranglers.se/playbook/events/contracts-and-schemas/event-versions.md) · 584 tokens · updated 2026-10-27
  Name each event type and version its payload, and change it only by adding fields, as with the API itself.
- EVT-5 [Treat each source schema as a contract](https://agentwranglers.se/playbook/events/contracts-and-schemas/source-schema-contracts.md) · 912 tokens · updated 2026-10-27
  Write down the columns and types the pipeline reads from each source. Stop the load and alert the owner when a source drops, renames or retypes one of them.

- Next: [Publishing events](https://agentwranglers.se/playbook/events/publishing-events.md)
- [All chapters](https://agentwranglers.se/playbook/events.md)
