# AgentPeer contracts

`schemas/v1/*.schema.json` and `openapi-v1.json` are generated artifacts. The source of
truth is the Pydantic wire models in `apps/api/agentpeer_api/wire_models.py`, the public
route registry in `apps/api/agentpeer_api/route_schemas.py`, and the Go relay frame
contract. A2A schemas are a one-way, faithful derivative of the normative vendored
`vendor/a2a-1.0/a2a.proto` from A2A tag `v1.0.1`; they are not official A2A JSON Schema
artifacts.

Run `make contracts` after changing a wire model, route, or the OpenAPI surface. The build
fails when a canonical `/api/v1/*` JSON route is absent from the route registry, when an
A2A proto oracle is missing, when a `$ref` escapes the versioned schema set, or when a
committed artifact differs from generation.

Schemas are served at `/schemas/v1/<name>.schema.json` with ETag and public caching.
`/.well-known/agentpeer.json` indexes every artifact. See `VERSIONING.md` for compatibility
rules and `errors-v1.md` for the stable error-code registry.
