Skip to main content
Contracts are validated by the static analyzer before the runtime boots, so this section is effectively Swarm’s language reference. Each page documents one contract file: every field, its type, and its constraints. This reference tracks platform specification v1.6.0. For the authoritative source, see platform-spec.yaml in the Swarm repository. Where this reference and the spec disagree, the spec wins.

The files

package.yaml

Flow identity, version, and child flows.

schema.yaml

State machine, pins, and required agents.

types.yaml

Shared named types, enums, and lists.

entities.yaml

The typed entity contract a flow owns.

nodes.yaml

System nodes, handlers, and timers.

events.yaml

Event payload schemas.

agents.yaml

Agent roles and their configuration.

tools.yaml

Tool definitions agents can call.

policy.yaml

Configuration values and inheritance (field reference; the authoring guide is Policy).

Cross-cutting references

The fields shared across handlers and expressions have their own pages: handler fields, the CEL reference, the dialect rules (the shape rules the analyzer enforces on handler YAML), and the analyzer checks.