AGI Solver: Modular infra enabling AI agents to reliably execute autonomous onchain transactions.
AGI Solver is a modular state machine designed to empower AI agents to autonomously and reliably execute onchain transactions, such as trading tokens or interacting with lending protocols. Typically, AI agents struggle to handle blockchain interactions due to transaction failures caused by gas price fluctuations, slippage, or RPC errors. To solve this, AGI Solver isolates the complexity of onchain interactions from AI agents' core logic. Agents publish transaction intents to a dedicated smart contract, after which specialized backend solvers independently execute these intents. This ensures AI agents remain responsive and autonomous, capable of operating reliably in decentralized environments without transaction interruptions.
AGI Solver consists of two main components:
Smart Contract (Mock13.sol): Built in Solidity, Mock13.sol functions as both the AI agent's wallet and the inbox for transaction intents (AGIs). AI agents submit intents directly via the contract's publishAGI function. The contract is designed modularly, supporting extensibility beyond current "Trade" intents to potentially include complex interactions like lending protocol deposits or token deployments.
Backend Solver (TypeScript State Machine): The solver backend is a robust state machine built using TypeScript. It regularly queries the Mock13.sol smart contract to identify new intents. Upon finding an intent, it securely withdraws the required assets, executes transactions through integrated decentralized exchange APIs (currently LiFi), and deposits the resulting assets back into the AI agent's wallet. Comprehensive fail-retry logic and error logging are implemented for transaction reliability.
Technologies and Partners Used: Solidity for smart contract development (Mock13.sol). TypeScript for backend solver logic, ensuring scalable and maintainable code. Integration with LiFi protocol for executing token swaps reliably, providing broad liquidity access.