RFS Apply
Request for Startups

Anima: Multi-Agent Transaction Framework

2024-08-01

Navigating On-Chain Complexity

The world of web3 and decentralized finance is notoriously complex, even for experienced users. For newcomers, the challenge is twofold: not only are the interactions themselves difficult, but understanding which actions are necessary to achieve specific financial goals is equally daunting. Consider a scenario where a new user wants to put their recently acquired ETH to work and earn yield. This seemingly simple goal requires extensive research across multiple protocols, understanding complex concepts like liquidity pools, and executing multiple transactions and approvals. The current user experience around all of this is a significant barrier to entry and adoption in the Web3 space.

For developers, attempts to simplify these interactions have often resulted in cumbersome and inflexible abstractions. These solutions fail to address the core issue: the need for an intuitive, user-friendly interface that can translate simple intentions into complex on-chain actions. The challenge lies in creating a system that can understand natural language inputs, interpret user goals, and execute the necessary transactions without requiring deep technical knowledge from the user.

Introducing Anima

To help mitigate the burdens of on-chain complexity, we’ve prototyped Anima, a framework for leveraging the power of Large Language Models (LLMs) in an agentic system that can operate on the blockchain.

Anima animated

Anima’s Python library helps you easily transform natural language inputs into executable on-chain actions, bridging the gap between user intent and complex crypto interactions. At its core, Anima is a framework for managing a group system of specialized agents, each designed to handle specific aspects around common Web3 tasks. Some examples of these agents include:

  • Researcher Agent: Can research specific tokens, access general trending coins and their volumes, utilize external APIs such as Dexscreener and more.
  • Yield Agent: Ability to work with popular yield protocols (Morpho, Pendle, Ethena, etc.) and seek out realtime information on estimated returns/APY.
  • Lending Agent: Provides integration with popular lending protocols like Aave and Morpho.
  • Swap Agent: Leverages a dex aggregator to generate swap and bridge transactions.

Each of these agents is empowered with sets of discrete tools, activated as necessary via LLM function calling. This layered approach, combining sophisticated prompt engineering with a multi-agent pipeline, enables a remarkably versatile and powerful system.

For users, this means that complex DeFi operations can now be initiated with simple natural language queries. The user experience begins to feel closer to interacting with a search engine or a virtual assistant, as the multi-step process of researching, decision-making, and executing transactions is handled for you behind the scenes. Users can focus on their financial goals without getting bogged down in the technical intricacies of blockchain interactions. For the builders working with on-chain protocols, this framework makes it easy to rapidly create and iterate on application front ends that optimize for user simplicity.

To showcase the potential of Anima, we’ve developed Rick, a Telegram bot that brings the power of this library to a familiar messaging interface. Rick can perform a wide range of actions, from simple token swaps to complex, multi-step DeFi strategies. It even supports scheduling recurring tasks, like Dollar Cost Averaging (DCA), and ad-hoc alert creation, demonstrating the flexibility and power of this agentic approach.

Telegram example of Anima

Looking Forward

We think that exploring the development of frameworks like Anima opens up exciting possibilities for the future of Web3 UX. Integrating language models and agentic systems allows for more organic interfaces to the on-chain world. We can start to build frontends for crypto applications that feel more like they are learning from us and less like you need to have the docs open at your side when trying to use them.

Further developments on both the side of crypto infrastructure and improvements to model capabilities will propel this design space even further. We are excited to see how others can take the capabilities of LLMs to explore new applications built on top of the Ritual ecosystem. There’s a lot of opportunity to experiment with a variety of different agent interactions that we didn’t mention above, such as SocialFi integrations, prediction market analysis or even basic contract auditing. We think that investigating how to potentially leverage multimodality in these agent systems is also a compelling area of research, especially as models for image recognition and voice generation become more advanced. And although we demoed a client integration using Telegram, the array of possible clients to drive unique agent powered application front ends for areas like DeFi are really vast. Ultimately, user experience is such an important area for the Web3 space to improve upon in this critical stage of adoption. The time to experiment is now and we want to see how agents can be used to both improve upon existing experiences, but also to imagine entirely new modes of interaction on-chain.

Interested in building this all the way? Make sure to apply to Altar.