A rule based agent framework: LLMs propose, deterministic rules validate, adapters execute.
RB Agent Protocol separates intent understanding from execution authority for onchain agents. The framework takes a natural language goal and uses an LLM to generate a structured plan. However, the model is not trusted with execution. Instead, the plan and external evidence (like Uniswap quotes) are passed through a deterministic rule engine. These policies evaluate constraints such as slippage limits, allowed tokens, and simulation success. If the rules pass, the plan is handed to an execution adapter for settlement. This approach guarantees that agents can only operate within strict, verifiable boundaries, preventing unintended actions caused by neural variance or hallucinations.
The framework is built as a TypeScript monorepo consisting of a core rule engine, a React frontend, a Hono backend, and infrastructure adapters. Gemini is used for intent parsing, converting user requests into Zod-validated JSON plans. The Uniswap API serves as an evidence provider, supplying routing and gas data before rules are evaluated. For execution, KeeperHub is integrated to handle onchain settlement and provide an additional layer of local risk assessment. Finally, every transaction trace—including the plan, rule verdicts, and quote evidence—is hashed and formatted for upload to 0G Storage to maintain a permanent audit trail. The system design ensures external dependencies are isolated behind narrow interfaces, allowing for fallback modes like local simulation when remote services are unconfigured.

