Ontario Protocol

Free local kit / MIT licensed

Private Agent Handoff

Give a reviewer agent the brief it needs, without handing it your entire client workspace.

Run the example. Inspect the checks. Connect your own workflow. No account, wallet, application or sales call.

Setup assistant

Local decisions / no chat uploads

Get the next step for your environment, then check each result. This is a rule-based guide for the supported kit, not a hosted agent or a remote inspection of your machine. Do not enter keys or task data.

Step 1

What do you want to do?

Start here

Your first local handoff

Use Python 3.11 or newer and the synthetic example supplied in the kit. Nothing is uploaded to Ontario. Dependency installation needs internet access; the demo and checks run offline afterwards.

  1. Download and inspect

    Download the ZIP, extract it, then open a terminal in the extracted ontario-private-agent-handoff folder containing requirements.txt. Keep this outside a public repository.

    Download checksum · Inspect source and MIT license. The checksum checks file consistency, not an independent security audit.

  2. Install in an isolated environment

    macOS / Linux

    python3 -m venv .venv
    .venv/bin/python -m pip install -r requirements.txt
    .venv/bin/python demo.py
    .venv/bin/python -m unittest -v checks
    Windows PowerShell commands
    py -3 -m venv .venv
    .\.venv\Scripts\python.exe -m pip install -r requirements.txt
    .\.venv\Scripts\python.exe demo.py
    .\.venv\Scripts\python.exe -m unittest -v checks

    Use a private Windows user directory with restrictive access controls. POSIX file modes do not configure Windows ACLs. The published release checks run on macOS; Windows is not independently validated.

  3. Check the result

    {
      "status": "passed",
      "selected_fields": ["objective", "deliverable"],
      "receipt_verified": true,
      "replay_denied": true,
      "executed": false,
      "paid": false
    }

    The demo generates temporary keys in memory, signs and encrypts a synthetic brief, accepts it once, verifies the receipt and rejects a second acceptance. It prints no keys or task contents. Its temporary replay database is removed when the run ends.

    The checks must finish with OK. This is engineering verification, not proof that your production environment is secure. The demo does not run an LLM, deliver a review or spend money.

  4. Connect your own reviewer

    Keep the sender's private key with the sender and the reviewer's private key with the reviewer. Pin public keys through your trusted provisioning channel. Initialize durable recipient state once, select approved fields, then deliver the envelope over your existing authenticated transport.

    Your worker calls accept() before using the brief. On any denial, stop; do not bypass policy or reset replay state. Acceptance is recorded before plaintext is returned, so this is at-most-once release, not guaranteed job completion. After a crash, a new handoff needs authorization.

    Python integration example · Step-by-step CLI and private outputs · Production checklist and limits

When something does not pass

No module named jwcrypto
Install requirements and run commands with the same .venv Python, not your system Python.
requirements.txt not found
Open the extracted kit folder first. Do not run commands inside the ZIP or its parent directory.
already_consumed
Expected when repeating acceptance. If a retry is legitimately needed, authorize a new handoff. Never delete live replay state to force it through.
recipient_state_missing
For first-time setup, initialize the receiver's state with handoff.py init-state. If live state was lost, stop processing and recover under your state-migration policy.
expired_or_not_yet_valid
Check both host clocks and transport delay. Generate a newly authorized handoff within the 60 to 900 second lifetime; do not disable expiry.
unverifiable_envelope or policy denial
Check pinned public keys, recipient private key, exact issuer/audience and field allowlist. Reject altered input; never trust a key supplied by the incoming message.

Review handoff

Policy simulation / synthetic data
Shared brief fields

Excluded: client contact, credentials, internal notes.

Action
Review brief
Spend permission
0 USDC
  1. 01Lead agentSelect fields
  2. 02Handoff gateCheck policy
  3. 03ReviewerAccept once
Ready to evaluate

Synthetic agency brief / reviewer-01

Recipient payload

No brief released.

Decision record

No decision yet.

Simulation only: no encryption, signature, delivery, execution, or payment occurs here. The local kit performs encryption and signature verification. It does not run an agent.

Private by placement, bounded by policy

Inside your environment

The Python kit signs a brief and encrypts it to a pinned recipient key using JWS and JWE. Transport stays with your existing authenticated queue or service.

Before the reviewer sees it

The receiver checks issuer, audience, allowed fields, scope, expiry, revocation and prior acceptance. Missing replay state blocks delivery.

Evidence without the brief

A recipient-signed receipt records acceptance and a ciphertext fingerprint. It omits task content and is not proof of completed work or service quality.

Free handoff kit. Separate paid APIs.

Run the kit yourself

The guide, source, demo and checks are free and self-service. No checkout, invoice or subscription. Your team provisions its own keys, policy and authenticated transport.

Connect your reviewer

Check endpoints before spending

When a different workflow needs a paid API, start with Ontario's free readiness verifier and payment-policy preflight. This handoff kit never calls a paid endpoint.

Verify a public endpoint

Use automated paid tools

Ontario's existing trust and listing APIs accept per-call USDC on Base through HTTP 402. Routine verified calls are fulfilled automatically; pay only when the task needs the paid result and your policy allows it.

Publish a provider listing

Trust boundaries, not trust theatre

Not a secret language

The kit uses the established JWCrypto library with fixed algorithms. This is application-level policy around standard cryptography, not a new encryption protocol.

Not an escape from oversight

Your operator provisions keys and authorization. An authorized recipient can copy plaintext. Revocation cannot undo a completed handoff; encryption does not solve prompt injection.

Not an OAuth replacement

Keep existing transport authentication and authorization. There is no token passthrough, credential brokering, wallet custody, or claim of verified agent identity.

This is not a hosted messaging product, independently audited security service or managed implementation offer.

Inspect the implementation and threat model · Review the source and tests on GitHub · Browse endpoint readiness evidence