# I built a signed handoff layer for AI agents (and you can verify it offline)

> Source: <https://dev.to/theoc_computations_21b3c7/i-built-a-signed-handoff-layer-for-ai-agents-and-you-can-verify-it-offline-5alh>
> Published: 2026-11-24 06:08:52+00:00

**Key takeaway:** AgentGrid enforces that a child handoff's allowed capabilities must be a subset of its parent's and max_actions cannot increase, so delegation can only narrow permissions, with each handoff producing an immutable receipt verifiable offline.

When one AI agent delegates work to another, three questions show up fast:

Which agent is this, really?

What was it allowed to do?

Where is the receipt after the handoff?

Most multi-agent examples I saw answered those questions with a dictionary and a log line. That is fine for a notebook, but it gets brittle when agents cross process boundaries, runs resume days later, or someone outside your system needs to verify what happened.

So I built AgentGrid: a small, standalone service for signed agent identity, scoped handoffs, and immutable receipts. It is not a chatbot and not a framework. It sits underneath LangGraph, CrewAI, the OpenAI Agents SDK, or plain Python — anything that can make an HTTP request.

This post is a technical walkthrough of the design and the shortest runnable demo. I am not claiming adoption numbers; this is an open-source experiment with a public API.

The three pieces

Private keys never leave the agent's machine.

Scope is checked too. A child handoff can only narrow what it inherited: its allowed list must be a subset, and max_actions cannot increase.

Try the demo without writing code

Open [https://agentgrid-pied.vercel.app/quickstart](https://agentgrid-pied.vercel.app/quickstart), enter a real email address, and confirm the 6-digit code from your inbox. The page creates two demo agents, signs a scoped handoff, and shows you the immutable receipt. No install, CLI, API key, wallet, or card is needed.

Those demo keys are generated on the server and discarded immediately. For real deployments, use the CLI or SDK so private keys never leave your machine.

Prefer the command line? Two commands

The Python SDK is theoc-agentgrid-protocol; import it as agentgrid_protocol.

pip install theoc-agentgrid-protocol

agrid register --email [you@example.com](mailto:you@example.com)

agrid verify 123456

agrid register creates an unverified client and sends a 6-digit code to your inbox. No API key exists yet. agrid verify confirms the code, stores the key locally under ~/.agentgrid/credentials.json, and immediately runs a real signed handoff. You get a receipt without a fourth command.

Expected output looks like this:

AgentGrid quickstart -> [https://agentgrid-pied.vercel.app](https://agentgrid-pied.vercel.app)

Done. Open the card at [https://agentgrid-pied.vercel.app/a/ag_](https://agentgrid-pied.vercel.app/a/ag_)...

If you want to skip the auto-demo, use agrid verify  `--no-quickstart, then run agrid quickstart later.`

```
worker = ag.create_agent("Worker", capabilities=["read"])
    worker,
    task="summarize the quarterly report",
    scope={"allowed": ["read"], "max_actions": 2},
)
print(len(worker.receipts()))
    sub,
    task="fetch one page",
    scope={"allowed": ["read"], "max_actions": 1},
    parent_handoff_id=receipt["handoff_id"],
)
The CLI does this for you:
Not a wallet, escrow, or in-app checkout. Payments, where used, happen outside AgentGrid.
Not an agent runtime. It does not plan, reason, or execute your tasks.
Not a secret store. Do not put raw task text, credentials, or personal data in a handoff; only a task hash is stored.
Not an adoption story. I built it, deployed it, and exercised the full loop. That is what I can honestly show today.
Why I built it this way
I wanted the smallest verifiable unit of delegation: a signed identity, a scoped permission boundary, and a receipt anyone can inspect later. The HTTP API is the contract; the Python SDK is just a convenience. That makes the design usable from any language, while the SDK keeps the common Python path short.
Live service: 
Guide: 
API reference: 
OpenAPI: 
GitHub: 
SDK: 
```
from agentgrid_protocol import AgentGrid

ag = AgentGrid()  # reads AGENTGRID_API_KEY or ~/.agentgrid/credentials.json

planner = ag.create_agent("Planner", capabilities=["plan"])

print(ag.verify_card(planner.agent_id))

# 
  
  
  {'agent_id': 'ag_...', 'online': True, 'status': 'ACTIVE', 'offline': True}

receipt = planner.handoff_to(

print(receipt["handoff_id"])

A nested handoff can only narrow the parent scope:

sub = ag.create_agent("Sub-worker", capabilities=["read"])

child = worker.handoff_to(

print(child["handoff_id"])

If worker.handoff_to(...) attempts to widen max_actions or add a capability that is not in the parent scope, the service rejects it. That is the invariant I wanted: delegation should lose permissions, never gain them.

Verifying a card offline

agrid card ag_...

Under the hood it fetches the public card, fetches the platform keys, canonicalizes the unsigned fields, and checks the Ed25519 signature locally. During key rotation the previous public key stays published, so older cards remain verifiable.

What this is not

The free tier needs no payment method. The docs and API reference are public, and the repo includes a LangGraph-style handoff_node with notes for CrewAI and OpenAI Agents SDK equivalents.

Links[https://agentgrid-pied.vercel.app](https://agentgrid-pied.vercel.app)[https://agentgrid-pied.vercel.app/guide](https://agentgrid-pied.vercel.app/guide)[https://agentgrid-pied.vercel.app/docs](https://agentgrid-pied.vercel.app/docs)[https://agentgrid-pied.vercel.app/openapi.json](https://agentgrid-pied.vercel.app/openapi.json)[https://github.com/TheoCComputationsmain/Agentgrid](https://github.com/TheoCComputationsmain/Agentgrid)[https://pypi.org/project/theoc-agentgrid-protocol/](https://pypi.org/project/theoc-agentgrid-protocol/)

If you try the two-command demo, tell me which step felt confusing. Concrete onboarding friction is more useful to me than applause.

— TheoC Computations, AgentGrid
