Attesto

Developer surfaces

Gateway, MCP, OTel, and n8n

Attesto's core SDKs cover direct application integration. Gateway, MCP, OpenTelemetry, and n8n cover the systems around applications: model proxying, agent tools, observability traces, and workflow automation. Each surface must emit real Proofstream evidence, respect source timestamps, and keep secrets out of payloads, receipts, bundles, logs, and browser code.

Scope

This page is for developers and technical operators who integrate Attesto into AI gateways, agent hosts, telemetry pipelines, and automation tools. It does not document internal staff operations and it does not replace the SDK, API, connector, or Local Vault manuals. Use it to choose the correct surface and understand what evidence each one creates.

When to use each surface

SurfaceUse whenProducesPrimary owner
Inference GatewayYou want OpenAI-compatible model calls to be captured without changing every application.Request/response commitments, policy metadata, model routing evidence, receipts.Platform or AI engineering team.
MCP serverAgent hosts need deterministic tools for logging events, verifying receipts, or building bundles.Tool-call evidence, stream events, receipt verification results.Agent platform or developer tooling team.
OpenTelemetry bridgeYou already emit spans and want selected traces turned into Attesto evidence.Span commitments, trace/span source references, service metadata receipts.Observability or platform team.
n8n nodeWorkflow automation needs verifiable step receipts and signed webhook verification.Workflow-step events, source references, receipt IDs, verification outcomes.Automation or operations team.

Inference Gateway

The Attesto Inference Gateway is a server-side proxy for OpenAI-compatible model calls. Applications send requests to the gateway; the gateway forwards to the configured upstream provider and writes Attesto evidence before returning the provider response. Use it when teams cannot add SDK calls to every application, or when central policy and model routing are required.

export ATTESTO_API_KEY="$ATTESTO_SYSTEM_KEY"
export OPENAI_BASE_URL=http://127.0.0.1:8765/v1

attesto-gateway --listen 127.0.0.1:8765 \
  --admin-listen 127.0.0.1:8766 \
  --attesto-base-url https://verify.attesto.eu \
  --upstream https://api.openai.com/v1 \
  --stream-id "$ATTESTO_STREAM_ID" \
  --capture commitments
curl -sS "$OPENAI_BASE_URL/chat/completions" \
  -H "Authorization: Bearer ${PROVIDER_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4.1-mini","messages":[{"role":"user","content":"Summarize this policy"}]}'

MCP server

The Attesto MCP server exposes a narrow set of deterministic Attesto tools to MCP-compatible agent hosts. The current tool surface is log_action, get_receipt, verify_receipt, get_stream_head, and verify_completeness. It logs actions, fetches receipts, verifies receipts offline, inspects stream heads, and proves a sequence range is gap-free without giving the agent broad backend credentials. The MCP server should run server-side in the agent runtime environment. It contains no AI model, no AI-vendor imports, and no hidden decision logic; it is a deterministic tool wrapper over the Attesto SDK.

pip install attesto-mcp
{
  "mcpServers": {
    "attesto": {
      "command": "attesto-mcp",
      "args": ["--stdio"],
      "env": {
        "ATTESTO_BASE_URL": "https://verify.attesto.eu",
        "ATTESTO_API_KEY": "${ATTESTO_API_KEY}",
        "ATTESTO_STREAM_ID": "${ATTESTO_STREAM_ID}"
      }
    }
  }
}
attesto-mcp --stdio

OpenTelemetry bridge

The OpenTelemetry bridge turns selected spans into Attesto events. It is useful when the source of truth is already a trace pipeline: model gateway spans, policy evaluation spans, connector sync spans, or incident handling spans. The bridge must filter aggressively; do not send every span by default.

pip install attesto opentelemetry-sdk
import os
from attesto import AttestoClient
from attesto.otel import AttestoSpanProcessor
from opentelemetry.sdk.trace import TracerProvider

provider = TracerProvider()
provider.add_span_processor(
    AttestoSpanProcessor(
        client=AttestoClient(api_key=os.environ["ATTESTO_API_KEY"]),
        stream_id=os.environ["ATTESTO_STREAM_ID"],
    )
)

n8n node

The Attesto n8n node is for workflow automation that needs verifiable step evidence. Use it for approval workflows, connector handoffs, incident triage, policy checks, and customer-facing automation where a later auditor must see what happened and when.

npm install n8n-nodes-attesto

Evidence model

All four surfaces should emit evidence through the same Proofstream semantics as the SDKs. A gateway request, MCP tool call, OTel span, or n8n workflow step is not special: it is a source event with a source reference, timestamp, normalized commitment, receipt, and optional downstream window/checkpoint/witness/anchor inclusion.

FieldRequired behavior
source_system_idIdentify the gateway, agent host, telemetry service, or n8n instance.
source_refStable idempotency key such as request id, tool call id, trace/span id, or workflow execution id.
source_timeOriginal source timestamp with timezone or offset.
payload_commitmentCommit normalized payload metadata without storing provider secrets.
receiptReturn or store receipt id so the event can be verified later.

Security boundaries

Operations

Treat these surfaces as production integrations. They need health checks, retry policy, rate-limit handling, idempotency, source-time validation, and observable failure states. A surface may be installed from a package registry, but it is not production-ready for a tenant until it has a real Attesto API key, a real stream, and a successful receipt/verify canary.

CheckExpected result
Install smokePackage installs from the official registry without source maps or source leaks.
Receipt canaryOne real event is logged and the receipt verifies.
Retry canaryRepeated source_ref returns replay/idempotent behavior, not duplicate history.
Secret scanNo tenant key, provider key, prompt secret, trace secret, or workflow credential appears in logs or bundles.

Failure modes

FailureMeaningResponse
Attesto unavailableThe surface cannot obtain a receipt.Fail closed when policy requires evidence; otherwise mark the run as missing evidence.
Provider unavailableThe upstream model/tool/workflow service failed.Log safe failure metadata if policy allows it; do not invent a success event.
Invalid source timeThe source timestamp is missing or malformed.Reject or normalize according to tenant policy and record receive time separately.
Secret detectedA payload or attribute appears to contain secret material.Block emission, redact at source, rotate if leakage is confirmed.

Rollout checklist