
Agent Forge
Putting an Agent in control of a foundry project to create foundry scripts that can execute complex defi actions.
About
The problem it solves This project aims to simplify interacting with defi protocols by letting an agent figure out what complex actions you are looking for. If you're trying to borrow some eth on aave, the agent should generate solidity to approve tokens, lend some usdc, and then borrow eth. User Interaction and Data Flow Tell the agent what complex defi action youre trying to perform. The agent will install required dependencies, generate a solidity script to execute them, and finally return the transactions for you to execute as it prompts your wallet to sign them. The project architecture and development process Project is made of a rust backend server for the agent, which creates foundry projects in temporary directories. The LLM has guidelines for each protocol it has to interact with. The frontend is a simple react app which listens to the rust backend for anything the agent does in the foundry project. Key differentiators and uniqueness of the project Instead of having predefined actions for agents, generating foundry scripts allow for much more complex defi actions, all in one prompt. Trade-offs and shortcuts while building Unfortunately, the agent may not follow the guidelines precisely, and work needs to be done on ensuring the llm does better.