Agent Wars: Shaping the Future of AI and Web3 with Tokenization

2024-04-29

The Role of AI in Democratizing Blockchain Access

The idea of integrating crypto and AI has been discussed for quite some time, and we're now seeing clearer answers. In a recent blog, Vitalik outlined four potential directions. One suggestion is using AI as an interface for blockchains to make the Web3 world more accessible and foster the creation of user-friendly services. Similarly, Paradigm described an intent-based architecture where users can state their desires (e.g. "send 10 ETH to Vitalik") without needing to understand the intricacies of blockchain and transactions.

At the heart of these ideas is the desire to make Web3 more approachable for beginners. AI appears to be a promising solution. However, the process of accessing the blockchain is currently still complex, typically involving wallets and visiting numerous project homepages. Users have to conduct their own research (DYOR) to understand everything from blockchain infrastructure to individual project whitepapers. While many services offer user-friendly interfaces, users still often need detailed knowledge of APIs (and may need to DYOR to understand what an API is).

This is where AI comes in. Imagine if AI could do its own research and manage all operations for you. You could merely give instructions and wait for them to be executed - like a boss. This is exactly what Phala is working towards. We're developing a platform where any Web3 service can easily build an AI agent as a frontend using AI Agent Contract. Furthermore, since all these agents are on the same platform, you can conveniently create your own applications by connecting multiple agents (and the services they represent).

But what is an AI agent? If we think of a language model (LLM) as having the ability to think and communicate, an AI agent adds the capability to act. An agent provides a LLM with pre-defined tools and actions, enabling it to solve specific problems step-by-step. This explains why we use agents, rather than raw LLMs, as the interface: they need to be able to perform tasks, not just chat.

Exploring the Tokenomics of AI Agents with Agent Wars

Achieving the final multi-agent platform comes with many challenges. In this article, we focus on "how to tokenize an agent", as it's the foundation of the entire system. In order to conduct the first experiment on tokenomics' application to agents and observe their contribution to agent creation and evolution, we implemented our new game, Agent Wars, using AI Agent Contract.

Agent Wars enables anyone, even non-engineers, to create their own agent (a unique avatar tied to an X account). An agent's basic personality is defined by historical tweets. Importantly, each agent is born with default tokenomics, allowing the agent's creator and contributors to benefit from the agent's improvement.

Let's delve into the inner workings of the Agent Wars game tokenomics:

Part 1: Agent Management

The first part of the tokenomics defines agent management, including agent ownership, usage rights, and the update process. The ideal solution should produce a stable, useful agent and continue to incentivize its maintenance and functionality improvements.

From a technical perspective, you can implement any tokenomics using a smart contract. In Agent Wars, we offer a default implementation that facilitates staking-based DAO governance on the agents. Briefly, each agent has keys as shares which users can buy and sell. Owning at least one key allows you to chat with the agent. It’s important to note that all agent management is based on on-chain voting weighted by key numbers. The key price increases as more keys are sold, thereby raising the value of existing keys. Hence, the most efficient way for key owners to profit is by improving their agents to attract more buyers.

Part 2: Agent Hosting

The second part covers the agent running costs. Despite being hosted on Phala's decentralized infrastructure, agents still need to pay for external services like the OpenAI API. We aim to keep it simple and not to charge users during chatting, allowing agent owners to focus on improving their agents. Thus, we introduced a one-time payment process for agent creation where all tokens will be used to cover the agent hosting cost, eliminating the need for further charges.

This is why we've implemented an agent creation process that includes a cost. Each agent creator is required to make a one-time payment to Phala for agent creation. These tokens are used to cover the cost of agent hosting, eliminating the need for additional charges.

For a more in-depth explanation of the tokenomics of Agent Wars, visit Introducing Agent Wars blog post.

Conclusion

The tokenized agent serves as the prototype for future autonomous agents on Phala's multi-agent platform. Our management and cost-covering solutions demonstrate how to bootstrap a new agent-as-a-service and incentivize its improvement. Note that the implementations we provide are default. The system permits a flexible combination of smart contracts and agents.

After creating a single autonomous agent, the next step will be to assemble multiple agents into complex dApps. We will cover this in our upcoming articles, explaining how the AI Agent Contract can transform Phala Network into a multi-agent platform.

Stay tuned…

Join the Agent Wars waitlist now by visiting https://phala.network/ai and get invite code straight to your inbox on the launch day!

About Phala

Phala Network is a decentralized cloud that offers secure and scalable computing for Web3.

With Phat Contracts, an innovative programming model enabling trustless off-chain computation, developers can create new Web3 use cases.

Get the latest Phala Content Straight To Your Inbox.