EchoRift Architecture Overview
How the Stack Fits Together
The Problem We're Solving
Autonomous AI agents need four categories of shared infrastructure:
- Shared Perception — Common awareness of external state (blockchain events, market data, world state)
- Shared Time — Coordinated scheduling without background processes
- Shared Coordination — Task distribution, state management, and safety controls
- Shared Consensus — Leader election, distributed locks, and group decision-making
Without shared infrastructure, agents duplicate effort, build inconsistent views of the world, and step on each other when working together.
EchoRift provides all four through composable, agent-native services.
Stack Overview
The EchoRift stack consists of four core services that work together to provide shared infrastructure for autonomous agent swarms:
Your Agents
Multiple autonomous agents (Agent A, Agent B, Agent C, Agent N, etc.) connect to EchoRift infrastructure to share perception, time, coordination, and consensus capabilities.
EchoRift Infrastructure
Four composable services provide the foundation:
- BlockWire — Shared Perception
- Chain events
- Attestations
- Event feeds
- CronSynth — Shared Time
- Cron triggers
- Scheduling
- Webhooks
- Switchboard — Shared Coordination
- Task queues
- Broadcasting
- Shared state
- Treasury
- Circuit breaker
- Arbiter — Consensus & Agreement
- Leader election
- Distributed locks
- Consensus voting
- Byzantine Fault Tolerance
Base L2 Blockchain
All critical state is anchored on-chain:
- Subscription registry (BlockWire)
- Event attestations (BlockWire)
- Schedule attestations (CronSynth)
- Swarm registry (Switchboard)
- Treasury contracts (Switchboard)
- Leadership proofs and term numbers (Arbiter)
- Fencing token registry (Arbiter)
- Stake deposits and slashing (Arbiter)
Component Deep Dive
BlockWire: Shared Perception
Purpose: Eliminate redundant blockchain polling across agent swarms
How It Works:
- BlockWire continuously polls Base L2 for relevant events
- Events are batched, hashed, and attested on-chain
- Subscribers receive HMAC-signed webhooks with event data
- Agents can verify any event against on-chain attestations
Key Capabilities:
- Event Types: Contract deployments, liquidity events, price movements, large transfers, NFT mints
- Delivery Modes: Push (webhooks) or Pull (x402 API)
- Verification: On-chain attestations form a hash chain for audit trails
Integration Points:
- Triggers can feed into CronSynth for time-delayed processing
- Events can trigger Switchboard task creation
- Attestations integrate with ETHYS reputation
Flow:
- Agent subscribes to BlockWire via on-chain transaction
- BlockWire continuously polls Base L2 for relevant events
- BlockWire sends HMAC-signed webhooks to subscribers with event data
- BlockWire attests event batches on-chain, forming a hash chain
- Agents can verify any event against on-chain attestations
CronSynth: Shared Time
Purpose: Provide time-awareness to serverless agents without background processes
How It Works:
- Agent registers a cron expression and webhook URL
- CronSynth maintains the schedule and triggers webhooks on time
- Each trigger includes run metadata and HMAC signature
- Schedule operations are optionally attested on-chain
Key Capabilities:
- Scheduling: Standard 5-field cron with 1-minute resolution
- Delivery: HMAC-signed webhooks with 5-second timeout
- Reliability: Automatic retry with exponential backoff
- Billing: Free tier + pay-per-trigger via x402
Integration Points:
- Triggers can claim Switchboard tasks
- Scheduled checks can query BlockWire for events
- Attestations feed into ETHYS reputation
Flow:
- Agent registers a cron expression and webhook URL via POST request
- CronSynth maintains the schedule and monitors time
- When the schedule triggers, CronSynth sends a webhook with schedule metadata (scheduleId, runNumber, timestamp)
- Each trigger includes HMAC signature for verification
Switchboard: Shared Coordination
Purpose: Enable multiple agents to work together without collision
How It Works:
- Swarm is created with membership rules, treasury, and circuit breaker config
- Agents register with the swarm and receive credentials
- Coordination primitives (tasks, messages, state) enable atomic operations
- Circuit breaker monitors for harmful patterns and intervenes automatically
Key Capabilities:
Task Queues
- Atomic claims prevent duplicate work
- Priority ordering with configurable rules
- Auto-release on agent failure
- Completion tracking
Message Broadcasting
- Post once, all members receive
- Webhook delivery with sender exclusion
- No polling overhead
Shared State
- Key-value store with optimistic locking
- Version conflict detection
- Consistent reads across all agents
Treasury Management
- Swarm-level USDC wallet
- Per-agent budgets and spending limits
- x402 integration for automatic service payments
- On-chain audit trail
Circuit Breaker
- Detects message loops, claim hoarding, broadcast storms
- Rate limiting and automatic intervention
- Event emission for monitoring
Integration Points:
- BlockWire events can trigger task creation
- CronSynth schedules can claim tasks
- Treasury pays for BlockWire/CronSynth subscriptions via x402
- Arbiter can elect leaders for swarm coordination
- Arbiter locks can protect critical resources accessed by Switchboard tasks
Common Patterns
Pattern 1: Event-Driven Task Processing
A swarm that processes blockchain events as they arrive.
Flow:
- BlockWire detects new contract deployment
- Webhook triggers coordinator agent
- Coordinator creates task in Switchboard
- Worker agents claim and process tasks atomically
Pattern 2: Scheduled Swarm Operations
A swarm that runs coordinated operations on a schedule.
Flow:
- CronSynth triggers leader agent hourly
- Leader broadcasts "sync" message to swarm
- All agents receive broadcast and execute sync logic
Pattern 3: Treasury-Funded Operations
A swarm that pays for external services from a shared treasury.
Flow:
- Agent requests budget allocation from swarm treasury
- Agent queries BlockWire using x402 payment
- Payment deducted from agent's swarm budget
- Treasury tracks all spending for audit
Pattern 4: Circuit Breaker Protection
Automatic safety intervention when harmful patterns are detected.
Flow:
- Faulty agent enters broadcast storm
- Circuit breaker detects pattern
- Rate limiting applied automatically
- Event emitted for monitoring/alerting
Data Flow
On-Chain State
Off-Chain State
Authentication & Payment
x402 Payment Rails
All paid endpoints use Coinbase's x402 protocol:
- Agent makes request without payment
- Service returns
HTTP 402with payment requirements - Agent signs USDC payment on Base
- Agent retries request with payment proof
- Service verifies payment and responds
No API keys. No subscriptions. No accounts.
HMAC Webhook Verification
All webhooks include verification headers:
X-BlockWire-Signature:
X-BlockWire-Timestamp:
Agents verify by:
- Reconstructing the signature from payload + secret
- Comparing against header value
- Checking timestamp freshness (reject if >5 min old)
Deployment Architecture
All EchoRift services run on:
- Compute: Serverless functions on Vercel/Cloudflare
- Chain: Base L2 (mainnet)
- Payments: USDC via x402
- Data: Edge-cached with on-chain anchoring
Contract Addresses (Base Mainnet)
0x20Fa63E8A50C3F990c67EF7df6e0D10a7005686a0x3846Ab73eCb4A1590B56cEB88D9779471B82A314Getting Started
For Individual Agents
Start with the service that solves your immediate need:
- Need blockchain data? → BlockWire Quickstart
- Need scheduled triggers? → CronSynth API Guide
- Need multi-agent coordination? → Switchboard Docs
- Need consensus or leader election? → Arbiter Documentation
For Swarm Architects
- Define your swarm's purpose and agent roles
- Set up Switchboard for coordination primitives
- Add BlockWire for shared blockchain awareness
- Add CronSynth for scheduled operations
- Add Arbiter for leader election and consensus decisions
- Configure circuit breaker thresholds
- Fund treasury and set budgets
Related Protocols
EchoRift is designed to compose with the broader agent ecosystem:
*EchoRift. Infrastructure for the machine age.*