<< All versions
A2A envelope (in
Skill v1.0.0
currentTrusted Publisher100/100microsoft/aks-lab-githubcopilot/pydantic-contracts
──Details
PublishedOctober 5, 2026 at 10:59 AM
Content Hashsha256:cfedc75f0ca3df27...
Git SHA
──Files
Files (1 file, 1.7 KB)
SKILL.md1.7 KBactive
SKILL.md · 76 lines · 1.7 KB
version: "1.0.0"
Skill: Pydantic Contracts (process boundary)
Any data crossing HTTP, A2A, MCP, or a queue is a frozen Pydantic v2 model.
A2A envelope (in src/shared/server.py)
python
from pydantic import BaseModel, ConfigDict, Fieldclass InvokeRequest(BaseModel):model_config = ConfigDict(frozen=True, extra="forbid")run_id: str = Field(min_length=1, max_length=64)goal: str = Field(min_length=1, max_length=4000)context: dict[str, str] = Field(default_factory=dict)class InvokeResponse(BaseModel):model_config = ConfigDict(frozen=True)run_id: stroutput: strtool_calls: list[str] = Field(default_factory=list)
Orchestrator workflow contracts
python
class Goal(BaseModel):model_config = ConfigDict(frozen=True)goal: strsku: str | None = Nonestore_id: str | None = Noneclass Plan(BaseModel):model_config = ConfigDict(frozen=True)stock_view: strprice_view: strpo_view: strshipping_view: strsummary: str
Per-agent tool inputs
Each agent's tools.py defines its own pair. Examples:
python
class StockQuery(BaseModel):model_config = ConfigDict(frozen=True)sku: strlocations: list[str]class LocationStock(BaseModel):model_config = ConfigDict(frozen=True)location: stron_hand: intreorder_point: intclass StockReport(BaseModel):model_config = ConfigDict(frozen=True)sku: stritems: list[LocationStock]
Rules
extra="forbid"on all request models.frozen=Trueon all models — agents and tools should never mutate inputs.- No bare
dict/Anyin tool signatures.# noqa: ANN401only with a written reason.