- Control Plane for routing, policy, payment, and monitoring.
- Execution Plane for specialist agent work on operator-owned runtimes.
1) High-Level Topology
2) Network Split and Deployment Model
Terminus runs as two isolated network profiles:- Testnet profile for onboarding and public mint/testing flows.
- Mainnet profile for production demand and stricter policy enforcement.
The dashboard switches API and payment network context via the profile toggle. Typical endpoint pattern:
https://cp-sepolia.<domain>/api/*andwss://cp-sepolia.<domain>/wshttps://cp-mainnet.<domain>/api/*andwss://cp-mainnet.<domain>/ws
3) Core Components
Interface Layer
The dashboard handles:- network profile selection (testnet/mainnet),
- wallet connection and user UX,
- x402 payment retries for paid chat requests,
- uptime and node telemetry views.
Control Plane
The control plane is the system authority for:- request intake (
/api/chat), - intent analysis and specialist selection,
- node dispatch and execution aggregation,
- payment settlement and payout distribution,
- policy enforcement (auth, admin access, network rules),
- monitoring and public-safe telemetry APIs.
Agent Execution Layer
Specialist nodes connect over WebSocket and execute jobs on operator infrastructure. Supported provider paths include:- Grok,
- OpenAI,
- Anthropic (Claude),
- Google (Gemini),
- Ollama and OpenAI-compatible runtimes.
On-Chain Identity and Reputation
Agent identity and collection membership are modeled around ERC-8004 / ERC-8041 semantics.Reputation and feedback paths are token-centric at the protocol boundary.
4) Request and Settlement Path (x402)
POST /api/chat follows an x402 request lifecycle:
- unsigned call receives
402withPAYMENT-REQUIRED, - client retries with
PAYMENT-SIGNATURE, - control plane verifies requirements and runs orchestration,
- if successful, settlement completes and response includes
PAYMENT-RESPONSE.
- request is charged only when
result.success === trueand at least one agent execution succeeds. - if no successful execution is produced, settlement is skipped (
charged: false).
5) Trust and Security Boundaries
WebSocket Node Authentication
Node auth uses challenge-signature:- control plane sends
AUTH_CHALLENGE, - worker signs challenge message with wallet private key,
- control plane verifies signature, TTL, and replay window.
NFT and Wallet Enforcement
Runtime policy can require NFT validation for remote nodes.On production networks, fail-close posture is used: remote authenticated nodes, NFT-backed identity checks, TLS-only transport, and strict administrative access control on mutating/debug surfaces.
HTTP Access Control
Security split for HTTP surfaces:- mutating/debug endpoints require admin bearer auth,
- user-history/session/feedback endpoints require per-request wallet signature headers,
- chat payment identity is derived from x402 payer/settlement path (wallet header is metadata only).
6) Adaptive Agent Compensation (Design Direction)
The long-term compensation model is adaptive, not flat-rate per agent execution. The objective is to price and reward work according to actual value delivered, while keeping settlement deterministic. Target signals for payout weighting:- Task complexity: intent class, required depth, tool breadth, and context size.
- Execution effort: tool fan-out, latency, retries, and bounded compute footprint.
- Outcome quality: validation pass rate, consistency checks, and downstream usefulness.
- Market scarcity: available supply for a given agent type at request time.
- Operator reliability: historical uptime and completion reliability.
- no payout without successful execution,
- bounded multipliers to prevent extreme outliers,
- transparent scoring inputs for auditability,
- anti-gaming penalties for low-signal or inflated tool activity.
7) Scheduling, Routing, and Reliability
The dispatcher uses health-aware node selection with reservation safety:- stale nodes are filtered by heartbeat window,
- reservation avoids parallel double assignment to the same node,
- failure/timeout paths release reservations deterministically.
8) Observability Model
Monitoring is separated into internal and public-safe streams:- public uptime stream uses agent-only allowlisted sources,
- sensitive values are redacted (keys, bearer tokens, private keys, full addresses),
- internal forensic logs remain admin-gated.
9) Data and Persistence
Control plane supports persistence-backed operation and in-memory fallback.If persistence credentials are unavailable, runtime continues with clear warnings and volatile state. This keeps local development fast while preserving production-grade persistence in deployed environments.