Section G• Last verified November 2026

Developer Overview

Architectural overview for developers extending Mandate or integrating external applications.

Developer Architecture Overview

Mandate is built using Next.js 14 App Router, TypeScript, PostgreSQL 18.6, Prisma ORM, and NEAR API JS.

Core Backend Services

ExecutionBoundaryService

Nonced cryptographic envelope generation and OutLayer TEE dispatch.

UniversalPolicyEngine

Deterministic rule evaluation and budget reservation enforcement.

ObjectiveEngine

DAG plan generation, cycle detection, and topological dispatching.

ReconciliationService

Background recovery of ambiguous transactions and stale leases.

Application Data Flow

Diagram 1: End-to-End Execution Architecture
Intel SGX TEE · NEAR Testnet
User / TreasuryAuthorizes Mandate & Plan
AI Agent SwarmProposes Tasks & Actions
Universal Policy EngineEvaluates Limits & Rules
Execution BoundaryNonced Authorization Envelopes
AI ProposesMandate EnforcesUser ControlsOutLayer Executes
OutLayer Intel SGX TEE

Protected enclaves holding agent private keys. Signs NEAR transfers only when valid execution envelope is verified.

NEAR Protocol Testnet

Final settlement blockchain. Transactions broadcast and independently confirmed via RPC node state proofs.

Audit & Reconciliation

PostgreSQL 18.6 durable checkpoints, SHA-256 hash chaining, idempotency keys, and multi-round lease recovery.