Documentation Index
Fetch the complete documentation index at: https://docs.usecompassai.com/llms.txt
Use this file to discover all available pages before exploring further.
Compass has three layers. An off-chain agent generates and evaluates plans, an on-chain smart account enforces them, and Circle Gateway moves USDC between chains. A single audit trail spans all three.This page is the map. Each layer below has its own dedicated page that goes deeper.
The three layers
Layer 1: Off-chain agent
The off-chain layer is where decisions are proposed and evaluated. Nothing in this layer can move funds directly — it produces plans that the on-chain layer either accepts or rejects. It has four components:- Chat agent. The LLM-facing interface. It reads user messages, asks for missing detail, and emits structured plans. It is the only component that touches a language model. See Chat agent.
- Deterministic loop. A Rust evaluator that ticks on a fixed cadence, re-evaluates every account, and proposes routes when better venues appear. Pure functions, fully reproducible. No LLM in this loop. See The deterministic loop.
- Policy engine. Checks every plan — whether from the chat agent or the deterministic loop — against the rules attached to the user’s account. Rejects out-of-policy plans before they reach the on-chain layer. See Policy engine.
- Audit trail. Records every tick, every plan, every check, every decision. See Audit trail.
Layer 2: On-chain smart account
The on-chain layer is where funds actually move. It is per-user — every Compass user has their own smart account, deployed at a deterministic address. It has two components:- Diamond account. An ERC-2535 Diamond holding the user’s USDC and managing facets for each supported venue. The user is the sole owner. See Diamond account.
- Session key. A scoped key the agent uses to call whitelisted functions on whitelisted venues. The session key cannot withdraw, cannot upgrade the account, and cannot change the rules. See Session keys.
Layer 3: Cross-chain settlement
When a route requires moving USDC from one chain to another, the executor uses Circle Gateway. Gateway gives Compass a unified USDC balance across supported chains, so cross-chain moves settle in under a second. Two properties of Gateway matter for the architecture:BurnIntentis a signed message, not a transaction. The intent can be retried after indexer lag, re-broadcast, or replayed without re-signing. This is why the deterministic loop’s retry behavior is safe.- Same address across chains. Your Diamond is deployed on Arc when you first set up the account. On every other supported chain, the Diamond is lazy-deployed the first time you stake there — at the same address, via CREATE2 with a matching deployer salt. USDC that lands on the target chain is always owned by the same address that signed on Arc.
How the layers interact
A single route, traced through all three layers:- User → chat agent (layer 1). User types something like
move 5 USDC to the best lending venue on an L2. - Chat agent → policy engine (layer 1). The LLM emits a plan. The policy engine checks it against the user’s rules.
- Policy engine → session key (layer 1 → layer 2). Approved plan becomes a session-key-signed call.
- Session key → Diamond account (layer 2). The smart account re-validates the call at the contract level and executes.
- Diamond account → Circle Gateway (layer 2 → layer 3). Cross-chain transfer if needed.
- Diamond account on target chain → venue (layer 2). The deposit call is made from the same address.
- Every step → audit trail. Off-chain reasoning, on-chain tx hashes, and Gateway intent IDs all land in the same record.
What’s in each section
The rest of the Architecture group covers each piece in detail:The deterministic loop
What runs on every tick, why it doesn’t use an LLM, and how it stays reproducible.
Policy engine
How rules become checks, and what happens when a plan fails.
Chat agent
The LLM layer, the structured-plan handoff, and the fabrication detector.
Audit trail
Every tick recorded as a structured EvaluatorThought.