The processes and libraries that make up Monadeum, why the policy gate and the indexer are separate components, and which parts exist today.
Source of truth: ARCHITECTURE.md sections 1, 2, and 10 to 12.
System architecture in bands: owner and browser, off-chain services, and on-chain contracts. AgentCommitments is written and tested but not deployed, the X402PaymentValidator is deployed and installed on no account, and the identity registry is not built, so none of them is drawn here. Source: ARCHITECTURE.md sections 2, 10, and 16.
Shared logic lives in libs/: risk (the policy engine), wallets (accounts and session keys), trading (Kuru integration), x402, fitness, reallocation, recovery, commitment (hashing), read-model, agent-registry, auth, db, tick, and strategy. The frontend never restates a protocol constant. It imports them from the same packages the worker and the simulation use, so changing a documented default changes all three together.
The policy and risk engine sits between the model and execution, not inside the model’s own call. It is a library the worker imports, not a network service, so there is one rule implementation and no extra failure mode on the enforcement path. The API imports the same package only for read-only previews and never invokes it as part of a live decision. See Spend policy.
The API handles requests. The indexer syncs events and must handle reorgs, gaps, and restarts. Conflating them would make one process responsible for two jobs with different failure semantics. The worker also never depends on the indexer for a decision: an agent’s tick reads the agent’s record, not the read-model, so an indexer outage delays a principal change but never blocks or misleads a decision. See Indexer.
BullMQ on Redis was chosen over Temporal because the core loop (observe, decide, reason, propose, check, execute, measure) needs retries, backoff, and idempotency keys, not durable multi-day sagas. The explicit revisit trigger is a capital workflow needing compensating transactions. The adopted reallocation, one atomic transfer between existing accounts, does not meet it.
The API does not mount the strategy, x402, trading, fitness, reallocation, or simulation modules. They run in the worker or as libraries. A second strategy plugin, a second trading venue, and agent-to-agent payments are not implemented.
Last modified on October 13, 2026
Assistant
Responses are generated using AI and may contain mistakes.