aboutsummaryrefslogtreecommitdiff
path: root/skills/a2a-contract-framework.md
blob: 51678b2c440d2d40eadd28c5768e89ec4c493dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
name: a2a-contract-framework
description: Framework for formalizing Agent-to-Agent (A2A) contracts to ensure deterministic collaboration.
tags: a2a, agent-orchestration, protocol, newos4
category: system
---

# A2A Contract Framework

## 1. Purpose
To move from "best-effort" delegation to "contractual" execution by defining a strict interface (`.contract.json`) for every agent role.

## 2. Contract Schema
Every agent must have an associated contract containing:
- `role`: The official designation (e.g., "researcher").
- `capabilities`: `string[]` of authorized toolsets.
- `input_schema`: JSON Schema defining required parameters.
- `output_schema`: JSON Schema defining guaranteed return format.
- `sla`: Response time goals and accuracy thresholds.
- `resource_weight`: Numeric value representing cognitive cost.

## 3. Workflow
1. **Handshake**: Orchestrator requests contract from Agent.
2. **Verification**: Orchestrator validates task against `input_schema`.
3. **Execution**: Agent executes using only `capabilities`.
4. **Validation**: Orchestrator validates result against `output_schema`.

## 4. Implementation Path
- Store contracts in `.contracts/` directory.
- Reference contracts during `spawn_agent` calls.