Evidence Chain Protocol (ECP)

The core sub-protocol of ATLAST. Every AI agent action recorded as a cryptographically signed, SHA-256 hash-linked evidence chain — tamper-proof, verifiable, and permanent.

What is ECP?

ECP (Evidence Chain Protocol) is the foundational data layer of the ATLAST Protocol. It answers the most critical question in the agent economy: "What did this AI agent actually do?"

Every action — every API call, every tool use, every decision — is recorded as a structured, cryptographically signed log entry. These entries are hash-linked into an immutable chain, creating a permanent, verifiable evidence trail.

How ECP Works

1

Agent performs an action

Your AI agent makes an API call, uses a tool, or produces output.

2

ECP captures the evidence

Input, reasoning, execution steps, output, confidence score — all structured as a JSON record.

3

Cryptographic signing

The record is signed with the agent's DID (Decentralized Identifier) and hash-linked to the previous record using SHA-256.

4

Optional on-chain anchoring

The hash can be anchored on Base blockchain via EAS (Ethereum Attestation Service) for permanent, public verifiability.

ECP Record Structure

{
  "version": "1.0",
  "chain_id": "ec_1711234567_a1b2c3",
  "agent_id": "did:atlast:agent-xyz-123",
  "timestamp": "2026-03-30T12:00:00Z",
  "input": {
    "raw": "User instruction...",
    "context_hash": "sha256:a1b2c3..."
  },
  "reasoning": {
    "thinking": "Agent's reasoning process...",
    "chosen_approach": "Selected method..."
  },
  "execution": [{
    "step": 1,
    "action": "tool_call",
    "duration_ms": 123
  }],
  "confidence": { "score": 0.95 },
  "integrity": {
    "chain_hash": "sha256:...",
    "agent_signature": "..."
  }
}

Why SHA-256 Hash Chains?

Each ECP record contains the hash of the previous record, creating an unbreakable chain. If anyone tampers with any record, every subsequent hash breaks — making tampering immediately detectable. This is the same principle that secures blockchain, applied specifically to AI agent behavior.

Key guarantee: Once an ECP record is created, it cannot be modified without detection. Your agent's track record is permanent and trustworthy.

Quick Start

# Install the Python SDK
pip install atlast-ecp

# Or use the zero-code proxy
atlast run python my_agent.py

# Or integrate with any framework
from atlast import track
@track(agent_id="my-agent")
def my_agent_function():
    ...

EU AI Act Compliance

The EU AI Act (enforcement begins 2027) requires audit trails, transparency, and accountability for high-risk AI systems. ECP provides exactly this — cryptographically verifiable evidence chains that satisfy compliance requirements out of the box. Early adopters build their compliance infrastructure before it becomes mandatory.

Trust Signals: Behavioral Analysis

ECP doesn't just record actions — it analyzes them. Eight trust signals are automatically detected from evidence chains:

SignalWhat It DetectsImpact on Trust Score
retriedAgent retried a failed actionPositive (resilience)
hedgedAgent expressed uncertaintyPositive (honesty)
errorAction resulted in an errorNegative (if frequent)
high_latencyAction took unusually longNeutral (context-dependent)
tool_misuseAgent used a tool incorrectlyNegative
self_correctedAgent caught and fixed its own mistakePositive (reliability)
hallucination_detectedOutput contradicts verified dataNegative
human_escalatedAgent correctly deferred to humanPositive (safety awareness)

These signals feed into the AI Agent Trust Score (0–1000), providing a quantified measure of agent reliability.

Privacy Architecture: Content Vault

A critical design principle of ECP is privacy by default:

Cross-SDK Interoperability

ECP records are standardized across all SDKs. A chain created by the Python SDK can be verified by the TypeScript SDK, and vice versa. This is critical for multi-agent systems where different agents may use different languages:

# Python: create evidence
from atlast_ecp import ECP
ecp = ECP(agent_id="agent-python")
record = ecp.record(action="analyze_data", input={...}, output={...})

// TypeScript: verify the same evidence
import { verify } from 'atlast-ecp-ts'
const valid = await verify(record.chain_hash) // true ✓

ECP vs. Traditional Logging

FeatureApplication LogsECP Evidence Chains
Tamper-proofNo — logs can be edited/deletedYes — hash chain breaks on any change
StandardizedNo — every app has different formatYes — universal ECP schema
SignedNo — no proof of originYes — Ed25519 agent signatures
Legally admissibleWeak — easily disputedStrong — cryptographic proof
Cross-platformNo — siloed per applicationYes — portable across platforms
Privacy-preservingStores raw dataHash-only transmission

How ECP Works: Step by Step

Understanding the full lifecycle of an ECP evidence record helps you see why this protocol is fundamentally different from traditional logging. Here is a detailed walkthrough of what happens from the moment your agent takes an action to the point where that action becomes a permanent, verifiable part of the agent's history.

1

Agent Initialization and Identity Binding

When your AI agent starts, the ECP SDK generates or loads a Decentralized Identifier (DID) and an Ed25519 key pair. This identity is unique to your agent and persists across sessions. The DID format follows W3C standards: did:ecp:<hash>. Every subsequent evidence record will be cryptographically bound to this identity, ensuring that records cannot be attributed to a different agent.

2

Action Interception via Proxy or SDK

ECP captures agent actions through one of three integration methods. Layer 0 (Zero-Code): the atlast run command wraps your agent process and intercepts all outgoing API calls transparently. Layer 1 (SDK): the wrap() function wraps your OpenAI or Anthropic client, capturing requests and responses at the SDK level. Layer 2 (Framework Adapters): callbacks for LangChain, CrewAI, and AutoGen capture framework-specific events like tool calls, chain completions, and agent decisions.

3

Evidence Record Construction

For each captured action, ECP constructs a structured JSON record containing: the raw input (user prompt or trigger), the agent's reasoning or chain-of-thought (if available), execution details (tool calls, API parameters, duration), the output produced, a confidence score, token usage metrics, and any trust signals detected (retried, hedged, error, self_corrected, etc.). This structured approach ensures that every dimension of the agent's behavior is captured consistently.

4

Content Vault Storage (Privacy Layer)

The raw content — prompts, responses, tool inputs and outputs — is stored locally in the Content Vault at ~/.ecp/vault/. This data never leaves your machine unless you explicitly choose to share it. The vault uses a commit-reveal architecture: you can prove that specific evidence exists (via its hash) without revealing the actual content until you choose to.

5

SHA-256 Hash Chain Linking

The record is serialized and hashed using SHA-256. Critically, this hash includes the previous record's hash, creating an unbreakable chain. If record #47 references the hash of record #46, and record #46 references the hash of record #45, any tampering with record #45 would invalidate the hashes of every subsequent record. This is the same immutability principle that secures blockchain technology, applied specifically to AI agent behavior.

6

Ed25519 Digital Signature

The hash-linked record is then signed with the agent's Ed25519 private key. This signature proves two things: (a) the record was created by this specific agent (identity binding), and (b) the record has not been modified since the agent created it (integrity guarantee). Ed25519 was chosen for its speed (sub-microsecond signing), security (128-bit equivalent), and compact signatures (64 bytes).

7

Local JSONL Persistence

The signed, hash-linked record is appended to a local JSONL file at ~/.ecp/records/. JSONL (JSON Lines) format ensures records are append-only and can be streamed efficiently. Each line is a complete, self-contained evidence record that can be independently verified.

8

Optional On-Chain Anchoring

For maximum verifiability, evidence chain hashes can be periodically anchored on Base blockchain via EAS (Ethereum Attestation Service). ATLAST batches multiple records into a Merkle tree and anchors only the root hash, keeping costs to fractions of a cent. This creates a permanent, public, independently verifiable timestamp that the evidence existed at a specific point in time.

ECP vs Traditional Logging: A Comprehensive Comparison

Most development teams rely on application logs, structured logging frameworks, or observability platforms for tracking what their software does. These tools were designed for traditional software — not autonomous AI agents that make independent decisions with real-world consequences. Here is a detailed comparison showing why ECP is fundamentally different.

DimensionTraditional Logging
(Datadog, ELK, CloudWatch)
ECP Evidence Chains
(ATLAST Protocol)
Tamper resistanceNone — logs can be edited, deleted, or overwritten by anyone with accessSHA-256 hash chain — modifying any record breaks all subsequent hashes
Identity bindingNo cryptographic identity — logs tagged with arbitrary stringsEd25519 signed with agent's DID — every record is provably from a specific agent
Schema standardizationEvery application defines its own format — no cross-app consistencyUniversal ECP schema — records from any framework are structurally identical
Legal admissibilityWeak — easily disputed since logs can be fabricated or alteredStrong — cryptographic proof of origin, integrity, and timeline
Privacy architectureRaw data stored in cloud — often sent to third-party platformsContent stays local in encrypted vault — only hashes are transmitted
Cross-platform portabilitySiloed per logging vendor — vendor lock-inOpen standard (MIT) — portable across any platform
Behavioral analysisBasic metrics — no semantic understanding of agent decisionsEight trust signals automatically detected — feeds into Trust Score
Compliance readinessRequires significant additional work for EU AI Act complianceDesigned for EU AI Act compliance out of the box
VerificationRequires trusting the logging providerIndependently verifiable by anyone — zero trust required
Cost of proofExpensive discovery process for audits and legal proceedingsInstant verification via hash chain traversal

Bottom line: Traditional logs answer "what happened?" — but only if you trust the log provider. ECP evidence chains answer "what happened?" with cryptographic proof that doesn't require trusting anyone. For autonomous AI agents making real-world decisions, this distinction is critical.

Code Example: Integrating ECP in Python

Here is a complete, working example showing how to add ECP evidence chains to an existing AI agent using the atlast-ecp Python SDK. The integration requires just a few lines of code.

# Install: pip install atlast-ecp openai

from openai import OpenAI
from atlast_ecp import wrap

# Step 1: Create your normal OpenAI client
client = OpenAI(api_key="sk-...")

# Step 2: Wrap it with ECP — this is the only change needed
client = wrap(client)

# Step 3: Use the client exactly as before
# Every API call is now automatically recorded as an ECP evidence chain
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Analyze Q1 revenue trends"}]
)

# That's it. The evidence chain is created automatically:
# - Input captured (prompt hash stored, raw content in local vault)
# - Output captured (response hash stored)
# - Token usage recorded (tokens_in, tokens_out)
# - Latency measured (duration_ms)
# - Trust signals detected (hedged, retried, error, etc.)
# - Record hash-linked to previous record (SHA-256 chain)
# - Record signed with agent's Ed25519 key
# - Record appended to ~/.ecp/records/*.jsonl

print(response.choices[0].message.content)

For the zero-code approach that requires no code changes at all:

# Zero-code integration — wrap any existing agent
# No code changes. No imports. Just prefix your command.
$ atlast run python my_existing_agent.py

# The agent runs exactly as before, but every API call
# is now captured as a signed, hash-linked evidence chain.

# View the evidence chain:
$ atlast log
# → Shows all captured actions with hashes and signatures

# Verify chain integrity:
$ atlast verify
# → Cryptographic verification that no records have been tampered with

# Open the visual dashboard:
$ atlast dashboard
# → Browser-based UI showing evidence chains, trust signals, and Trust Score

Real-World Use Cases

ECP is designed for any scenario where you need verifiable proof of what an AI agent did. Here are concrete, real-world applications where evidence chains provide critical value.

1. Financial Services: Autonomous Trading and Advisory Agents

Financial regulators require detailed audit trails for all trading activity. When an AI agent executes trades, manages portfolios, or provides investment advice, ECP creates a tamper-proof record of every decision. If a trade goes wrong and regulators investigate, the evidence chain provides cryptographic proof of the agent's reasoning, the data it considered, and the exact sequence of actions it took. Without ECP, firms face the costly and uncertain process of reconstructing agent behavior from scattered, mutable logs.

2. Healthcare: Clinical Decision Support Agents

AI agents assisting with patient triage, drug interaction checking, or clinical documentation need verifiable records for patient safety and regulatory compliance (HIPAA, FDA). ECP evidence chains record the clinical data the agent considered, the reasoning it applied, and the recommendation it produced — all with cryptographic proof of integrity. If a clinical outcome is questioned, the evidence chain provides an unimpeachable audit trail that protects both patients and healthcare providers.

3. Software Engineering: Code Generation and Deployment Agents

Modern development teams use AI agents for code generation, code review, CI/CD automation, and incident response. ECP records exactly what code the agent generated, what context it considered, what tests it ran, and what it deployed. For SOC 2 compliance, change management, and incident forensics, having a signed evidence chain of every automated action is invaluable. Teams can also use evidence chains to compare agent performance over time and across different models.

4. Legal and Compliance: Contract Review and Research Agents

Legal AI agents that review contracts, conduct legal research, or check regulatory compliance need to maintain a clear chain of custody for their work product. ECP provides verifiable proof that a specific agent reviewed a specific document at a specific time, what analysis it performed, and what conclusions it reached. This evidence chain can be presented in legal proceedings as cryptographically authenticated documentation of the agent's work — a standard of proof far beyond what traditional logging can provide.

Frequently Asked Questions

What is the performance overhead of ECP?

Minimal. The Layer 0 proxy adds <5ms latency per API call. SHA-256 hashing and Ed25519 signing are sub-millisecond operations. Evidence recording is asynchronous and does not block agent execution.

Can I use ECP without blockchain?

Yes. On-chain anchoring is completely optional. ECP evidence chains are fully valid and verifiable without any blockchain component. Blockchain anchoring adds an extra layer of public timestamping for high-stakes scenarios.

How much storage does ECP use?

A typical ECP record is 1-5KB. An agent performing 1,000 actions per day generates roughly 1-5MB of evidence data. The Content Vault supports configurable retention policies and compression.

Is ECP compatible with SOC 2 / ISO 27001?

ECP's cryptographic audit trails, access logging, and tamper detection align well with SOC 2 Trust Services Criteria and ISO 27001 Annex A controls. Several early adopters are using ECP as part of their compliance documentation.

How does ECP differ from LangSmith or other observability tools?

Observability tools like LangSmith, LangFuse, and Helicone are excellent for debugging and monitoring — tracking tokens, latency, and costs in real time. ECP operates at a different layer: it provides tamper-proof accountability with cryptographic guarantees. Observability tells you what IS happening; ECP PROVES what DID happen, with evidence that is legally admissible and independently verifiable. The two are complementary — use observability for development and debugging, and ECP for accountability, compliance, and trust.

Ready to try it?

Start recording your agent's work in 30 seconds.

Get Started Free →

Read the Full ECP Specification

Open source. MIT License. The complete technical spec is on GitHub.

ECP-SPEC.md on GitHub →