Developer quickstart

Four calls to your first proof card.

Discover the manifest, validate compatibility, run a workflow, escalate through Proxy when a human needs to decide. SDKs, MCP, and A2A all use the same contract surface underneath.

Before you begin

Install, configure, confirm — then build.

The quickstart assumes a hosted Patchr API, a builder token, and one SDK path. Local development uses the same env vars — just point the base URL at your local API.

Account and API key

Create a Patchr builder account, then create an API token for protected routes.

Runtime

Use Python 3.11+ for the Python SDK path or Node.js 20+ for the Node.js path.

Base URL

Use https://api.patchr.co for hosted calls, or point to your local API during development.

Transport tokens

Use PATCHR_MCP_TOKEN and PATCHR_A2A_TOKEN only when those transports are configured separately.

Setup commands
# 1. Install one client path
# Python
pip install patchr

# Node.js
npm install @patchr-core/sdk

# 2. Configure hosted Patchr
export PATCHR_API_BASE_URL="https://api.patchr.co"
export PATCHR_API_TOKEN="your-patchr-api-token"

# Optional transport-specific tokens
export PATCHR_MCP_BASE_URL="https://api.patchr.co/mcp"
export PATCHR_MCP_TOKEN="$PATCHR_API_TOKEN"
export PATCHR_A2A_BASE_URL="https://api.patchr.co"
export PATCHR_A2A_TOKEN="$PATCHR_API_TOKEN"

# 3. Confirm connectivity
curl https://api.patchr.co/healthz
curl https://api.patchr.co/v1/manifest

Build surface

Pick a client path and keep the code readable.

SDK, MCP, and A2A examples now share one wide code panel so longer snippets stay inside the card.

Python SDK

Use the Python client for server jobs, workers, and trusted backend services.

python
from patchr.sdk import PatchrClient

client = PatchrClient.fromEnv()
manifest = client.manifest()
run = client.runWorkflowTemplate("auditDisputedClaim", {
    "claim": "seller name and payment instructions do not match",
})

HTTP API

Call Patchr as a protocol service from external apps and agents.

Schemas and Events

Validate payloads, subscribe to reconciliation events, and avoid route drift.

Proof Output

Close workflows with proof cards, proof packs, receipts, and portable case files.

Activation path

Four calls to first proof.

The fastest path is contract discovery, handshake, workflow execution, then Proxy escalation when the work crosses into human judgment.

1

Discover contracts

Read public integration surfaces before hard-coding route assumptions.

curl https://api.patchr.co/v1/manifest
2

Validate compatibility

Use the handshake before registration or delegation.

curl -X POST https://api.patchr.co/v1/handshake -d '{"domains":["resolve","proxy"]}'
3

Run a workflow

Return evidence map, next action, proof pack, and proof card.

curl -X POST https://api.patchr.co/v1/workflows/templates/auditDisputedClaim/run
4

Escalate through Proxy

Suspend Resolve when a human needs to verify, call, message, or coordinate.

curl -X POST https://api.patchr.co/v1/proxy/missions

Community

Join the builders.

Get help, share what you've built, and follow protocol updates.

Full HTTP API reference

Every endpoint, parameter, and example — in one place.

The API reference covers authentication, orchestration, Hunt, Resolve, Bridge, Proxy, Pay, Events, Schemas, and the Sandbox. Every endpoint includes a working curl example and the expected response shape.