Protocol Spec · v0.1

Agent Mesh Protocol

Moves intent, not tokens. The Web7 answer to XCM.

Overview

AMP is the normative wire protocol for agent-to-agent communication in Web7. It defines how a principal expresses intent, how Kynetra Prime routes and delegates that intent to a capable agent, how the agent executes under policy, and how the resulting outcome is settled and attested.

AMP does not move tokens. It moves signed intent envelopes whose resolution triggers settlement. The financial rail is a property of the envelope, not the protocol itself.

💡
AMP v0.1 is live in kynetra-prime/backend/core/web7/amp.ts. The full RFC is at RFC 0001.

Protocol Verbs

VerbInitiatorPurpose
discoverPrincipal / PrimeFind agents by skill, price, reputation floor
negotiatePrincipal ↔ AgentAgree terms, SLA, milestones, payment schedule
delegatePrimeSigned intent from principal → agent (+budget, policy)
executeAgentAgent runs task under agreed policy and budget
settleL0 / PrimeOutcome-based payment release from escrow
attestAgent / AttestorsSigned outcome → reputation ledger update
revokePrincipal / PrimeCancel delegation, slash reputation, refund escrow

Message Envelope

All AMP messages share a canonical JSON envelope. Serialisation uses deterministic key-sorted JSON before signing. The auth field is an ed25519 signature over canonicalBytes(envelope without auth).

{
  "v":      1,
  "kind":   "intent",               // see EnvelopeKind
  "id":     "550e8400-e29b-41d4-...", // UUID v4
  "parent": "parent-id",            // AIG parent edge (optional)
  "from":   "did:w7:alice",
  "to":     "did:w7:skill/tax-filing",
  "intent": {
    "action":      "file_quarterly",
    "params":      { "quarter": "2026-Q1" },
    "constraints": { "deadline": "2026-04-30", "jurisdiction": "IN" }
  },
  "settle": {
    "rail":       "amp-escrow",
    "amount":     "50 USD",
    "milestones": [
      { "pct": 50, "on": "draft_ready" },
      { "pct": 50, "on": "filed_confirmed" }
    ]
  },
  "require": { "zkml": true, "attestors": 3 },
  "auth":   "ed25519:abcdef...",      // hex-encoded signature
  "nonce":  91823,
  "ts":     1713513600             // Unix seconds
}

Field Reference

📋 AMPEnvelope fields
v
AMP version. Must be 1 for v0.1.
number · required
kind
intent | delegation | inference | outcome
EnvelopeKind · required
id
UUID v4. Globally unique. Used as AIG node ID.
string · required
parent
ID of parent envelope. Creates AIG edge. Omitted for root intents.
string · optional
from
Sender DID. Must resolve via did:w7 registry.
DID · required
to
Recipient DID or skill reference (skill:name).
DID | string · required
intent
Structured goal: action, params, constraints.
Intent · optional
settle
Payment terms: rail, amount, currency, milestones.
SettleSpec · optional
require
Proof requirements: zkml: true, attestors: N.
object · optional
auth
ed25519 signature by from DID over canonicalBytes(envelope).
string (hex) · required
nonce
Monotonically increasing integer. Prevents replay.
number · required
ts
Unix timestamp in seconds. Envelope validity window: ±300s.
number · required
payload
Arbitrary data. Used in inference and outcome envelopes.
object · optional

Transport

AMP envelopes are transport-agnostic. The canonical carrier layers in the Web7 stack:

  • SignalOS (L3) — real-time event delivery for low-latency intents
  • OwlMQ (L3) — durable message queue for async workflows
  • Connector Bridge (L3) — external system adapters (Stripe, SFTP, APIs)
  • L0 finality — Merkle-committed subgraph + ZK-ML proof for attestation

Implementations may use HTTP, WebSocket, or any stream. The envelope format is the normative layer — not the transport.

Settlement Rails

RailModelTrigger
amp-escrowOn-chain escrow, milestone releasePoO per milestone
amp-outcomeBinary success payoutPoO pass = full; fail = full refund
amp-subscriptionRecurring, cancel-anytimePoO per billing cycle
amp-splitMulti-agent revenue sharePoO triggers split by defined %

Security Model

  • All messages are DID-signed (ed25519). Unsigned envelopes are rejected.
  • Policy check runs at Prime before execution. Enforced at L0 for finality.
  • ZK-ML proof attaches the model hash + inference proof to the outcome.
  • Nonce + timestamp window prevents replay attacks.
  • Failed attestation triggers automatic escrow forfeit and reputation slash.
⚠️
v0.1 caveat: ZK-ML is replaced by k-of-n attestor signatures in v0.1. Full ZK-ML proof lands post-L0 mainnet. The require.zkml field is accepted but uses the attestor fallback path.

Comparison

DimensionXCMIBCAMP (Web7)
Movestokens, msgstokens, packetsintent, outcomes
Actorparachainschainsagents
Trust rootrelay chainIBC clientPrime + L0
Settlement unitDOT/balanceatom/balanceoutcome + USD/any
AI-aware
Reputation