{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://pactspec.dev/schema/v1.json", "title": "PactSpec v1", "description": "Machine-readable capability declaration for AI agents. Defines what an agent does, how to call it, what it costs, and how to test it. See https://pactspec.dev/spec for documentation.", "type": "object", "required": [ "specVersion", "id", "name", "version", "provider", "endpoint", "skills" ], "properties": { "specVersion": { "type": "string", "const": "1.0.0", "description": "PactSpec schema version. Always \"1.0.0\" for v1 specs." }, "id": { "type": "string", "pattern": "^urn:pactspec:[a-z0-9-]+:[a-z0-9-]+$", "description": "Unique URN identifier, e.g. urn:pactspec:acme:invoice-processor" }, "name": { "type": "string", "minLength": 1, "maxLength": 100, "description": "Human-readable agent name." }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Semantic version of this agent, e.g. \"1.2.0\"." }, "description": { "type": "string", "maxLength": 500, "description": "What this agent does." }, "provider": { "type": "object", "description": "Who operates this agent.", "required": ["name"], "properties": { "name": { "type": "string", "description": "Organization or individual name." }, "url": { "type": "string", "format": "uri", "description": "Provider's website." }, "contact": { "type": "string", "format": "email", "description": "Contact email." } } }, "endpoint": { "type": "object", "description": "Where to call this agent.", "required": ["url"], "properties": { "url": { "type": "string", "format": "uri", "description": "Agent endpoint URL." }, "auth": { "type": "object", "description": "Authentication configuration.", "properties": { "type": { "type": "string", "enum": ["none", "bearer", "x-agent-id", "header"], "description": "Authentication method." }, "header": { "type": "string", "description": "Custom header name when type is \"header\"." } } } } }, "skills": { "type": "array", "minItems": 1, "description": "Capabilities this agent provides. Each skill has typed input/output schemas.", "items": { "type": "object", "required": [ "id", "name", "description", "inputSchema", "outputSchema" ], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9-]+$", "description": "Skill identifier (lowercase, hyphens allowed)." }, "name": { "type": "string", "description": "Human-readable skill name." }, "description": { "type": "string", "description": "What this skill does." }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Searchable tags." }, "inputSchema": { "type": "object", "description": "JSON Schema for the skill's input." }, "outputSchema": { "type": "object", "description": "JSON Schema for the skill's output." }, "examples": { "type": "array", "description": "Example input/output pairs.", "items": { "type": "object", "required": ["input", "expectedOutput"], "properties": { "description": { "type": "string" }, "input": { "description": "Example input value." }, "expectedOutput": { "description": "Expected output for the example input." } } } }, "pricing": { "type": "object", "description": "What this skill costs per invocation.", "required": ["model", "amount", "currency"], "properties": { "model": { "type": "string", "enum": ["per-invocation", "per-token", "per-second", "free"], "description": "Billing model." }, "amount": { "type": "number", "minimum": 0, "description": "Price per unit." }, "currency": { "type": "string", "enum": ["USD", "USDC", "SOL"], "description": "Currency." }, "protocol": { "type": "string", "enum": ["x402", "stripe", "none"], "description": "Payment protocol." } } }, "testSuite": { "type": "object", "description": "URL to a test suite that can be run against the live endpoint.", "required": ["url"], "properties": { "url": { "type": "string", "format": "uri", "description": "Test suite URL." }, "type": { "type": "string", "enum": ["http-roundtrip", "json-schema-validation"], "description": "Test format." } } } } } }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Searchable tags for the agent." }, "license": { "type": "string", "description": "SPDX license identifier." }, "links": { "type": "object", "description": "Related links.", "properties": { "documentation": { "type": "string", "format": "uri", "description": "Documentation URL." }, "repository": { "type": "string", "format": "uri", "description": "Source code repository." } } }, "delegation": { "type": "object", "description": "If this agent wraps another agent.", "properties": { "delegatedFrom": { "type": "string", "description": "Spec ID of the upstream agent being wrapped." }, "terms": { "type": "string", "format": "uri", "description": "URL to delegation agreement." } } }, "interop": { "type": "object", "description": "Interoperability with other protocols.", "properties": { "mcp": { "type": "object", "properties": { "serverUrl": { "type": "string", "format": "uri", "description": "MCP server endpoint." }, "tools": { "type": "array", "items": { "type": "string" }, "description": "MCP tool names." } } }, "openapi": { "type": "object", "properties": { "specUrl": { "type": "string", "format": "uri", "description": "OpenAPI spec URL." } } }, "acp": { "type": "object", "properties": { "supported": { "type": "boolean", "description": "Whether ACP sessions are supported." }, "sessionTypes": { "type": "array", "items": { "type": "string" }, "description": "Supported session types." } } } } } } }