Skip to main content

Pipeline overview

Every inter-agent message flows through five deterministic stages:
StageComponentWhat it does
1. SchemaPydantic AgentMessageValidates sender/receiver IDs, payload type, timestamp, optional signature
2. TrustTrustBoundaryChecks blocklists, allowlists, pair blocks, rate limits — deny-all by default
3. Engine_route_to_engine()Routes to finance_guard, logic_guard, code_guard, or passthrough
4. AttestationA2ACryptoServiceSigns the verdict with ES256 JWT — includes payload hash, trace ID, engine used
5. VerdictVerificationVerdictReturns forwarded or blocked with reason, attestation, and audit trace

Full verification sequence


Component relationship


Trust boundary evaluation

The trust boundary evaluates every request through a strict sequence. Note that allowlist checks happen before rate-limit allocation to prevent map-spray attacks.

Engine routing

The interceptor routes payloads based on payload_type:
PayloadTypeEngineVerificationPrecision
financial_transactionfinance_guardDecimal arithmetic — recomputes totals from line itemsDecimal("0.01") tolerance
logic_assertionlogic_guardSet-based contradiction detection (P AND NOT P)Deterministic, sorted output
code_executioncode_guardCase-insensitive regex for eval, exec, subprocess, os.system, etc.Import/alias detection
general / data_querypassthroughNo verification — forwarded immediatelyN/A

Data model


JWT attestation structure

Every verdict includes a signed JWT with this payload:
{
  "iss": "did:qwed:a2a:local",
  "sub": "sha256:abc123...",
  "iat": 1711411200,
  "exp": 1711497600,
  "jti": "a2a_demo_001",
  "qwed_a2a": {
    "version": "1.0",
    "verdict": "forwarded",
    "engine": "finance_guard",
    "sender": "procurement-agent",
    "receiver": "treasury-agent"
  }
}
The sub claim is a SHA-256 hash of the original payload, making the attestation tamper-evident. Any modification to the payload invalidates the hash match.