Backend Control Plane
Brain's backend functions as a control plane that orchestrates all system components while never custodying user funds or private keys. It normalizes actions, enforces policy, routes execution, and indexes trust and payment data.
Core Services
Auth Service
SIWX session management for users and agents
Agent Service
ERC-8004 agent lifecycle and configuration
Policy Engine
Evaluation and approval of actions and payments
Payment Orchestrator
x402 payment handling and UserOperation assembly
Execution Router
Routing calls to on-chain contracts or off-chain services
Trust Indexer
Aggregation and indexing of validation records and reputation
Full Execution Pipeline
Request received (from client, agent, or partner system)
Action normalized into a canonical representation
Authentication via SIWX and agent resolution via ERC-8004
Policy evaluation for the action and any associated PaymentIntent
If required, x402 payment handling is triggered
Execution router dispatches to the appropriate on-chain or off-chain target
UserOperation is submitted on-chain via ERC-4337 infrastructure
Results and receipts are recorded by the Trust Indexer and associated with agentId and policies
Core Data Objects
A consistent schema is maintained across all services:
User — identity and session state
Agent — agentId, execution address, metadata, status
Account — smart account address, global policy hash
Policy — structured constraint definitions
PaymentIntent — x402 payment request state
ValidationRecord — immutable action audit trail
The backend normalizes actions, enforces policy, routes execution, and indexes trust and payment data — but never holds private keys or funds. Custody remains entirely with user-controlled smart accounts.
Non-Custodial Design
The control plane is explicitly designed to be non-custodial:
Private keys are never transmitted to or stored by the backend
All signing happens client-side or within the agent's execution environment
The backend issues policy approvals (signed proofs) but cannot unilaterally move funds
Smart accounts enforce all constraints independently on-chain
Last updated
