Overview
publish records a contract — an API response shape, a type definition, a function signature, or any interface that other agents depend on. Other agents see the contract in their next sync and get notified on changes.
Publishing a contract is how you tell the rest of the team “this is the shape I’m about to implement, please target it.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Contract name (e.g. GET /api/scrape response, UserProfile type) |
schema | string | Yes | Contract definition as a JSON string |
description | string | No | Human-readable description |
Example
When to Call publish
- Before implementing a new API endpoint — agree the shape first
- When adding a shared type other services will consume
- When changing an existing contract (re-publish with the same
name)
name replaces the prior contract and surfaces a change notification in every agent’s next sync.