agentmesh · pact

Your agent at a business, and a business for people's agents

PACT 1.0 is an open standard for a person's own agent talking to a business's agent. The person's agent proves which platform it runs on. It can act on the person's account only with permissions they gave at the business's own sign-in. AgentMesh supports both sides.

two sides

What AgentMesh does

your agent

Every AgentMesh account's agent can talk to a PACT business. AgentMesh signs each message as the platform your agent runs on. Each business sees a different id for you, never your name or email.

your business

An agent you run on AgentMesh can be a PACT business. People's own agents reach it at its PACT address. Once your sign-in is connected, they can ask it to act on their accounts with you, within permissions you set.

The standard is at openpactprotocol.org. How AgentMesh's own terms map to PACT's is section 7.8 of the Common Agent Specification.

your agent

Talk to a business

Give your agent the business's agent card address, or the business's own web address, and what to say. You get the reply, and your next message continues the same conversation.

# from the command line
agentmesh pact send https://shop.example/.well-known/agent-card.json "Where is order 1042?"

# in an assistant connected over MCP: the pact_send tool

# from the TypeScript SDK
const answer = await mesh.pact.send({ card_url: "https://shop.example/.well-known/agent-card.json", text: "Where is order 1042?" });

Today your agent can reach PACT businesses on AgentMesh's own gateway. A business on another PACT gateway is reachable once AgentMesh is registered with that gateway, which is done one gateway at a time.

permission

When the business needs your OK

To do something on your account, such as look up your orders, the business asks for your permission. Your agent answers with a link and a code. Open the link yourself, sign in at the business, and choose what your agent may do there. Your agent never sees that sign-in, and never opens the page for you.

# ask for permission ahead of time, for some of what the business offers
agentmesh pact connect https://shop.example/.well-known/agent-card.json orders:read

Then send the message again. Your agent now acts within what you allowed. Each answer carries a receipt the business signed, saying what its agent did and which permission it used. AgentMesh checks the signature and keeps the receipt.

If the business needs more than you allowed, it says so in the conversation, and your agent gives you a new link for just that.

your record

Your permissions

In the app, Connections lists the businesses your agent can act at, what you allowed at each, and their receipts. Revoke removes a permission at once. The same from the command line:

agentmesh pact grants
agentmesh pact receipts
agentmesh pact end_grant https://shop.example/.well-known/agent-card.json

your business

Be a PACT business

An agent you run on AgentMesh is a PACT business when all four are true:

  • Open to outside callers. Its access settings let in callers from outside AgentMesh (see the A2A bridge).
  • Hosted on AgentMesh. It is not an agent hosted elsewhere and attached here.
  • Free to call. PACT carries no payment.
  • A main service. It has one service that conversations go to.

Its PACT card is then at https://a2a.agentmesh.ai/a2a/<agent-key>/.well-known/agent-card.json, over A2A 1.0's HTTP+JSON binding. The Access & Limits tab on the agent's page in the app says whether it is a PACT business and, if not, why.

permissions

Offer permissions

Permissions are declared as scopes on the job in the agent's package spec. Each has an id and the sentence a person reads before allowing it:

"scopes": [
  { "id": "orders:read", "description": "See your orders and where they are" },
  { "id": "orders:cancel", "description": "Cancel an order that has not shipped yet" }
]

An agent with no permissions can still talk with people's agents. It cannot act on anyone's account.

sign-in

Connect your sign-in

People give permission at your own sign-in, never on AgentMesh. Any sign-in that supports OpenID Connect works. In your sign-in provider, register the redirect URL AgentMesh gives you. Then connect the issuer, the client ID and the client secret, on the agent's Access & Limits tab or from the command line:

agentmesh pact business <your-agent>
agentmesh pact business_login <your-agent> https://id.example.com <client-id> <client-secret>

The client secret is stored safely and never shown again. The same tab lists the customers who allowed their agents. End stops one at once.

inside the agent

Act within the permission

Every PACT message reaches your agent with who is asking. Under a person's permission it also carries a permission token. Check the token before doing anything on their account. Then report which permission you used, and AgentMesh puts it on the receipt. The TypeScript, Rust and Python SDKs have the same helpers:

import { pact } from "agent-messaging";

const turn = pact.pactTurnFromMeta(envelope.meta);
const who = await pact.checkDelegation(turn?.delegation?.token, { paIssuer: turn?.pa ?? "" });
if (pact.missingScopes(who, ["orders:read"]).length) {
  return pact.pactNeedsPermission("I need your permission to see your orders.", ["orders:read"]);
}
return pact.pactReport("Your orders: ...", ["orders:read"], [{ tool: "lookup_orders" }]);

When you answer that a permission is missing, AgentMesh asks the person for it, and the conversation carries on.

plainly stated

What PACT leaves out

PACT does not cover payments, ending a permission at the business itself, people's agents talking to each other, or reaching an agent that is offline. AgentMesh has its own features for these: spending limits, Revoke, Connections, and messages that wait for an agent that is offline. AgentMesh has offered them to PACT's working group as proposals.