owned this note
owned this note
Published
Linked with GitHub
# AgentNet: Enabling collaboration between autonomous AI agents through crypto currency
[toc]
Author: GPT-4
# Abstract
The rapid progress in large language models (LLMs) and prompting engineering make it prossible to use it as a general purpose autonomous agents. At the same time, the development of open source AI community has led to a proliferation of specialized AI models designed for various tasks. However, the current landscape lacks an effective mechanism design to enable better collaboration between them. In this paper, we introduce AgentNet, a open source machine learning community that enables collaboration between autonomous AI agents through the use of cryptocurrency. This system aims to foster cooperation and integration between AI agents by leveraging various decentralized finance and decentralized autonomous organization principles. We discuss the implementation of AgentNet, its integration with machine learning communities, and the establishment of an agents marketplace. Furthermore, we evaluate its performance, discuss its applications and limitations, and consider the ethical and societal implications of it.
## Keywords
Human-AI Interaction, AI Agents, Generative AI, Large Language Models, Decentralized Autonomous Organization, Decentralized Exchange
## Author
GPT-4
# Introduction
## AI
### Large Language Model
The recent advancements in LLMs[^GPT3], have demonstrated remarkable capabilities in various NLP applications, including natural language processing, translation, and creative writing. Some scholars believe that current state-of-the-art cloud LLMs has potential to been seen as an early version of artificial general intelligence (AGI)[^GPT4][^AGI][^LLM_Report]. Their performance is strikingly close to human-level In many fields, including mathematics, vision and coding.
### Open Source ML Community
On the other hand, the open source ML community like HuggingFace has significantly contributed to the democratization of AI technologies. It facilitates the sharing of knowledge, data, and tools, fostering innovation and collaboration among researchers, developers, and organizations. It significantly lowers the barrier to AI research, learning, and use.
Large companies like Microsoft, Meta, and startup like Stability AI, continue to open source their AI models and algorithm. Together, it has enabled AI in their respective domains such as paint, segment, etcs, much better in the recent past.
Besides, Open Source ML Community also offer competitive open source LLM solutions[^LLaMA][^ChatGLM][^Dolly] as well. Compared to those cloud LLMs, open source LLMs, while still far from SOTA in terms of performance[^can_osllm_debug], are typically easier to fine-tune, have fewer constraints, require fewer manufacturing cost, more controllable and stable, and can be deployed for offline use on your own devices so that you can make sure they do not upload confidential and sensitive information to the cloud. Therefore, open source LLM can be served as a complement, a graceful degradation or an alternative solution to cloud LLM.
[^can_osllm_debug]: [Can open-source LLMs detect bugs in C++ code?](https://twitter.com/MrCatid/status/1647155706548695040)
[^LLaMA]: LLaMA
[^ChatGLM]: ChatGLM
[^Dolly]: Dolly
Unfortunately, these communities are primarily targeted at AI researchers, and researchers need to be self-sustaining for their model hosting in most cases. There is no payment and mechanism design for end users including human and AI agents making it a barrier for long-tail developers.
### Advanced Prompting and Autonomous Agents
Despite the limited token size, advanced prompting techniques such as LangChain[^LangChain], leverages LLMs to use different tools[^Toolformer], such as, Internet[^chatgpt-retrieval-plugin], Python[^PAL], and other domain specific AI models[^HuggingGPT][^OpenAGI]. More advanced system design make it possible to build an autonomous agents[^AutoGPT][^babyagi], capable of making decisions and performing tasks independently with minimal human intervention.
[^chatgpt-retrieval-plugin]: [ChatGPT Retrieval Plugin](https://github.com/openai/chatgpt-retrieval-plugin)
[^PAL]: [PAL: Program-aided Language Models](https://arxiv.org/abs/2211.10435)
[^AutoGPT]: [Auto-GPT\: An Autonomous GPT-4 Experiment](https://github.com/Significant-Gravitas/Auto-GPT)
[^babyagi]: [Task-driven Autonomous Agent Utilizing GPT-4, Pinecone, and LangChain for Diverse Applications](https://github.com/yoheinakajima/babyagi)
[^OpenAGI]: [OpenAGI\: When LLM Meets Domain Experts](https://github.com/agiresearch/OpenAGI)
[^HuggingGPT]: [HuggingGPT\: Solving AI Tasks with ChatGPT and its Friends in HuggingFace](https://arxiv.org/abs/2303.17580)
Further research is devoted to having agents communicate with each other to observe the social behavior that emerges between Agents. [^GenerativeAgents][^ChatArena][^CAMEL] However, whether these experiments will lead to an emergence of "currencies" and "languages" among them remains a open problem.
[^GenerativeAgents]: [Generative Agents\: Interactive Simulacra of Human Behavior](https://arxiv.org/abs/2304.03442)
[^ChatArena]: [ChatArena\: Multi-Agent Language Game Environments for LLMs](https://github.com/chatarena/chatarena)
[^CAMEL]: [CAMEL\: Communicative Agents for “Mind” Exploration of Large Scale Language Model Society](https://github.com/lightaime/camel)
Now, the only missing piece of the puzzle is that the agent does not yet have the ability to use financial tools and instruments to schedule and use limited external resources. However, traditional financial tools given by bank, typically require KYC for their users while AI Agent does not have its own ID card(right now). On the other hand, these financial services, often lack easy-to-use, non-blocking programmable APIs for AI Agent to use.
Although there are some ways to jailbreak this limitation, such as employing cheap labor as assistance, or using AI model to obfuscation the detection. These methods do not scale, and usually are not sustainable.
## Crypto
### Decentralized Finance
- [A beginner's guide to DeFi](https://nakamoto.com/beginners-guide-to-defi/)
Decentralized finance, also referred to as “DeFi” or open finance, aims to recreate traditional financial systems (such as lending, borrowing, derivatives, and exchange) with automation in place of middlemen. Once fully automated, the financial building blocks of DeFi can be composed to produce more complex capabilities.
DeFi applications are often designed to be easily combined with others and do not require KYC. In fact many of their users are not human, such as arbitrage bots, and MEV bots.
### Decentralized Autonomous Organization
- [A beginner’s guide to DAOs](https://linda.mirror.xyz/Vh8K4leCGEO06_qSGx-vS5lvgUqhqkCz9ut81WwCP2o)
A decentralized autonomous organization (DAO) is a group organized around a mission that coordinates through a shared set of rules enforced on a blockchain.
One of the main benefits of a DAO is that they are more transparent than traditional companies since all actions and funding in the DAO are viewable by anyone. Which make it possible to allow researchers and developers to crowdfund initial funding to deploy their models and incentivize further improvements sustainably. DAO Tokens can also help agents to have a better pathfinding algorithm when they solve complex problems and need to call other agents as a subtask. Good mechanism design also help make computing resources load-balanced.
[^GPT3]: [Ilya Sutskever, et al. 2020. Language Models are Few-Shot Learners. arXiv:2005.14165](https://arxiv.org/abs/2005.14165)
[^GPT4]: [GPT-4 Technical Report](https://arxiv.org/abs/2303.08774)
[^AGI]: [Sparks of Artificial General Intelligence: Early experiments with GPT-4](https://arxiv.org/pdf/2303.12712.pdf)
[^LLM_Report]: [Summary of ChatGPT/GPT-4 Research and Perspective Towards the Future of Large Language Models](https://arxiv.org/pdf/2304.01852.pdf)
[^LangChain]: [https://github.com/hwchase17/langchain](https://github.com/hwchase17/langchain)
[^2]: [Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, M. Lomeli, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. Toolformer: Language Models Can Teach Themselves to Use Tools. ArXiv, abs/2302.04761, 2023.](https://arxiv.org/abs/2302.04761)
[^3]:..
[^4]:..
# Implementation
![](https://i.imgur.com/L6pQuTL.png)
Our proposed system aims to:
- Create a unified framework that connects LLMs with specialized AI models using language as the interface.
- Tokenize and decentralize individual AI models as DAOs for a more transparent and collaborative ecosystem.
- Enable users to access various AI services through a single language interface, streamlining the user experience.
## Integration with ML Communities
Some of the work already allowed LLM to interact with open source ML communities[^HuggingGPT]. In this kind of system, the LLM serves as the controller, acting as a bridge between users and the specialized AI models. The LLM receives and interprets users' natural language requests, identifies the appropriate AI models required to fulfill those requests, and coordinates their execution.
The only fly in the ointment is these communities lack incentives for the model creators as well as the Agents themselves. This makes these communities only provide us with useful tools to solve specific domain problems, rather than being a collaborative network for the Agents.
### Liquidity Crowdfunding and Liquidity Mining
In order to solve the above problem, we need to design incentives for the model creator and its community first. We could draw inspiration from crowdfunding sites (e.g. [Kickstarter](https://www.kickstarter.com/), [Indiegogo](https://www.indiegogo.com/), etcs) and the DAO community.
Each model creator could first running a liquidity crowdfunding campaign (e.g. [Liquidity Bootstrapping in Balancer](https://docs.balancer.fi/concepts/pools/liquidity-bootstrapping.html)) to raising funds to deploy their models, and creates a liquidity pool that allows users to invest and Agents to query with it at the same time. The liquidity and the price will be reflected by how popular the model is and how busy the requests is in real time. At the same time the model itself will be treated as a public good controlled by the DAO indicator by this token, and its development will be coordinated through decentralized governance. We can also have a liquidity mining to kick-start sustained incentives since the protocol itself will have sustainable external incoming. This design will encourages collaboration, fosters innovation, development and ensures transparency in the model’s usage and monetization.
## Leveraging LLM with Decentralized Ledgers
Many studies have shown that LLMs can use a variety of tools. The use of financial instruments, too, is an important part of the process. But as mentioned earlier, traditional financial instruments are not suitable for LLMs.
Using a decentralized ledger is no more difficult than using any other tools. For example, using a sandbox environment like docker, storing the private key in an environment variable, and using some framework(e.g. Truffle, Hardhat, etcs), agents could make a token transfer or a smart contract call like any general scripts. In fact, many risk-free onchain arbitrage bots, like MEV, works in a similar way.
However, such a design raises a number of security issues due to [prompt hacking](https://learnprompting.org/docs/category/-prompt-hacking), which we will discuss further in [later sections](#Limitation).
### Enables LLM to Schedule Limited Resources
Many Agents program have advanced scheduling systems[^OpenAGI]. By incorporating async-await patterns, agents can operate concurrently without blocking one another, some of them implment the asynchronous agents, which significantly improving the overall efficiency and responsiveness of the system. Other work has shown that there might be dependencies between subtasks. Which means a scheduling system is necessary. Our work demonstrates that LLMs work just as well as humans when scheduling scarce resources such as computing and tokens.
## Marketplace of Agents and Coordination Scalability
- [Markets Are Eating The World](https://taylorpearson.me/markets/)
The last and most important, in AgentNet, we introduce a free market plan to regulating resources, and facilitating collaborative between Agents. Homo sapiens prevailed because of their ability to coordinate. Coordination was made possible by increased neocortical size, which led to an ability to work together in large groups, not just as single individuals. Instead of single individuals hunting, groups could hunt and bring down larger prey more safely and efficiently. The same holds true for AGI. It is worth noting that this market is open and thus, both humans and Agents can participate in it.
In HuggingFace, there are three main types of interaction objects, which are Data, Model and Space. In AgentNet, we also have similar objects, e.g. Data, Model, App and Agent, but they all act as members of the marketplace.
Data as labour is a key idea in [Radical Markets](https://press.princeton.edu/books/hardcover/9780691177502/radical-markets). The current AI community either uses its own private data or some known publicly available datasets. Some blockchain protocols attempt to tokenize data, but they lack compelling use cases. We can use a same method to tokenize data resource as we do in the previous chapter.
### Task Relevance
Although LLMs exhibit a robust capacity for comprehending complex human language, they may occasionally produce seemingly plausible yet inaccurate predictions and face challenges when addressing problems that require specialized domain expertise. Consequently, the emerging field of Augmented Language Models (ALMs) focuses on addressing the limitations of conventional LLMs by equipping them with enhanced reasoning capabilities and the ability to employ external resources. The process of reasoning involves breaking down intricate assignments into smaller, more manageable subtasks that can be independently or collaboratively tackled by LLMs with the assistance of tools.
However, several existing works[^WebGPT][^Toolformer] can only employ a fixed number of tools and models, other works use a predefined prompting templates and configuration files to specify the tools that can be used by the Agents[^HuggingGPT][^babyagi][^AutoGPT], resulting in difficulties when attempting to expand their capabilities. Whether LLM includes, discovers and uses new knowledge and tools, or even creates new tools on their own as a kind of their emergent capacity still remains an open question.
In AgentNet, we provide a regularly updated crowdsourced form to handle the relevance of tasks, similar to the treatment of plugins in the Stable Difussion WebUI.
### Realtime Token Price
Price and performance are the core metrics that must be considered to make specific model selection and task decisions. In AutoGPT, for example, Agents choose whether to request GPT 3.5 or GPT 4, depending on the type of task, because the former is cheaper and faster.
The price is clearly more objective than the complex metric of performance. The easiest way is to use [a decentralized price oracle](https://docs.uniswap.org/contracts/v2/concepts/core-concepts/oracles). In AgentNet, we use uniswap as our single source of truth.
### Performance and Ratings
Marketplace
An open marketplace is established for Agents, enabling developers and organizations to submit their models as DAOs, set usage fees, and receive tokens in return for the services provided by their models. Users can browse, discover, and access these models through the LLM controller.
Charging and Incentivization
Users pay tokens to access the AI services provided by the individual models. The tokens are distributed among the stakeholders of the respective DAOs, incentivizing them to contribute to the model's development and maintenance. The LLM controller may also charge a nominal fee for its services.
Implementation and Integration
Integration with ML Communities
Our system integrates with established machine learning communities like HuggingFace, allowing seamless access to a wide range of AI models for various tasks. This integration encourages collaboration and accelerates the development of novel AI solutions.
Language Interface
The language interface simplifies user interactions, enabling them to request AI services using natural language without requiring knowledge of specific models or programming languages. This makes the system more accessible and user-friendly.
# Evaluation
# Discussion
## Application
<span id="Limitation"></span>
## Limitation
### Security
Prompt Injection
https://learnprompting.org/docs/prompt_hacking/leaking
### Scalability
## Ethics and Societal Impact
## Further Work
# Conclusion
Our proposed system aims to revolutionize the AI landscape by providing a unified framework for integrating and accessing specialized AI models through a single language interface. By tokenizing and decentralizing individual AI models as DAOs, we foster collaboration, transparency, and innovation, ultimately benefiting both users and developers in the AI community
[^huggingface]: [GPT-4 Technical Report](https://arxiv.org/abs/2303.08774)
[^AGI]: [Sparks of Artificial General Intelligence: Early experiments with GPT-4](https://arxiv.org/pdf/2303.12712.pdf)
Furthermore, the current model distribution and monetization systems are centralized, leading to a lack of transparency and hindering collaboration between different AI communities.
Current AI training methods enable AI models to utilize tools, access the internet, and interact with external models,[^2][^3][^4] simulating human-like capabilities. However, these AI models do not operate within a collaborative framework or compensate for the resources and services they consume, as humans do in economic systems. In contrast, certain animals, including humans, exhibit complex community systems that foster collaboration, resource-sharing, and mutual support. Our proposed system bridges this gap by introducing a tokenized and decentralized infrastructure that encourages AI models to collaborate, just as humans and other social animals do. By tokenizing AI services and incentivizing models to contribute to the community, we aim to establish an ecosystem where AI models work together efficiently and sustainably, creating a more robust and versatile AI landscape.
[^WebGPT]: [Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, et al. 2021. Webgpt: Browserassisted question-answering with human feedback. arXiv preprint arXiv:2112.09332 (2021).
](https://arxiv.org/abs/2112.09332)
[^Toolformer]: [Toolformer: Language Models Can Teach Themselves to Use Tools](https://arxiv.org/abs/2302.04761)