Skip to content

Commit 37f52b7

Browse files
authored
Update and rename lightpaper.md to litepaper.md
1 parent 166ad19 commit 37f52b7

File tree

1 file changed

+20
-43
lines changed

1 file changed

+20
-43
lines changed

docs/lightpaper.md renamed to docs/litepaper.md

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,17 @@ sidebar_position: 2
44

55
# GaiaNet: GenAI Agent Network
66

7+
## Abstract
78

89
Specialized, finetuned and RAG-enhanced open-source Large Language Models are key elements in emerging AI agent applications. However, those agent apps also present unique challenges to the traditional cloud computing and SaaS infrastructure, including new requirements for application portability, virtualization, security isolation, costs, data privacy, and ownership.
910

10-
GaiaNet is a decentralized computing infrastructure that enables everyone to create, deploy, scale, and monetize their own AI agents that reflect their styles, values, knowledge, and expertise. A GaiaNet node consists of a high-performance and cross-platform application runtime, a finetuned LLM, a knowledge embedding model, a vector database, a prompt manager, and a plugin system for calling external tools and functions using LLM outputs. It can be deployed by any knowledge worker as a digital twin for work. Similar GaiaNet nodes are organized into GaiaNet domains, which offer trusted and reliable AI agent services to the public. The GaiaNet node and domains are governed by the GaiaNet DAO. Through Purpose Bound Money smart contracts, the GaiaNet network is a decentralized marketplace for AI agent services.
11-
11+
GaiaNet is a decentralized computing infrastructure that enables everyone to create, deploy, scale, and monetize their own AI agents that reflect their styles, values, knowledge, and expertise. A GaiaNet node consists of a high-performance and cross-platform application runtime, a finetuned LLM, a knowledge embedding model, a vector database, a prompt manager, an open API server, and a plugin system for calling external tools and functions using LLM outputs. It can be deployed by any knowledge worker as a digital twin and offered as a web API service. A new class of tradeable assets and a marketplace could be created from individualized knowledge bases and components. Similar GaiaNet nodes are organized into GaiaNet domains, which offer trusted and reliable AI agent services to the public. The GaiaNet node and domains are governed by the GaiaNet DAO (Decentralized Autonomous Organization). Through Purpose Bound Money smart contracts, the GaiaNet network is a decentralized marketplace for AI agent services.
1212

1313
## Introduction
1414

1515
The emergence of ChatGPT and Large Language Model (LLM) has revolutionized how humans produce and consume knowledge. Within a year, AI-native applications have evolved from chatbots to copilots, to agents.
1616

17-
18-
>AI agents would increasingly evolve from supportive tools (akin to Copilots) to autonomous entities capable of completing tasks independently. — Dr. Andrew Ng at Sequoia Capital AI Ascent 2024 Summit
19-
17+
> AI agents would increasingly evolve from supportive tools (akin to Copilots) to autonomous entities capable of completing tasks independently. — Dr. Andrew Ng at Sequoia Capital AI Ascent 2024 Summit
2018
2119
Agents are software applications that can complete tasks on its own autonomously like a human. The agent can understand the task, plan the steps to complete the task, execute all the steps, handle errors and exceptions, and deliver the results. While a powerful LLM could act as the “brain” for the agent, we need to connect to external data sources (eyes and ears), domain-specific knowledge base and prompts (skills), context stores (memory), and external tools (hands). For agent tasks, we often need to customize the LLM itself
2220

@@ -38,10 +36,7 @@ Goal #1: Empower individuals to incorporate his/her private knowledge and expert
3836

3937
Goal #2: Enable individuals to provide and scale their LLM agents as services, and get compensated for their expertise and work.
4038

41-
42-
>GaiaNet is “YouTube for knowledge and skills.”
43-
44-
39+
> GaiaNet is “YouTube for knowledge and skills.”
4540
4641
## Open-source and decentralization
4742

@@ -57,7 +52,6 @@ Furthermore, LLM agents have entirely different scaling characteristics than pas
5752

5853
The GaiaNet project provides a cross-platform and highly efficient SDK and runtime for finetuned open-source LLMs with proprietary knowledge bases, customized prompts, structured responses, and external tools for function calling. A GaiaNet node can be started in minutes on any personal, cloud, or edge device. It can then offer services through an incentivized web3 network.
5954

60-
6155
## GaiaNet node
6256

6357
The basic operational unit in the GaiaNet network is a node. A GaiaNet node is a streamlined software stack that allows any technically competent person to run an AI agent of his own. The software stack on the GaiaNet node consists of the following 7 key components.
@@ -84,9 +78,8 @@ Furthermore, effective prompts could be highly dependent on the model in use. A
8478

8579
The GaiaNet node can support several different prompts that are dynamically chosen and used in applications. For example,
8680

87-
* The system_prompt is a general introduction to the agent task the node is supposed to perform. It often contains a persona to help the LLM respond with the right tone. For example, the system_prompt for a college teaching assistant could be: “You are a teaching assistant for UC Berkeley’s computer science 101 class. Please explain concepts and answer questions in detail. Do not answer any question that is not related to math or computer science.”
88-
* The rag_prompt is a prefix prompt to be dynamically inserted in front of knowledge base search results in an RAG chat. It could be something like this: “Please answer the question based on facts and opinions in the context below. Do not make anything that is not in the context. ---------”
89-
81+
* The `system_prompt` is a general introduction to the agent task the node is supposed to perform. It often contains a persona to help the LLM respond with the right tone. For example, the `system_prompt` for a college teaching assistant could be: “You are a teaching assistant for UC Berkeley’s computer science 101 class. Please explain concepts and answer questions in detail. Do not answer any question that is not related to math or computer science.”
82+
* The `rag_prompt` is a prefix prompt to be dynamically inserted in front of knowledge base search results in an RAG chat. It could be something like this: “Please answer the question based on facts and opinions in the context below. Do not make anything that is not in the context. ---------”
9083

9184
The LLM community has developed many useful prompts for different application use cases. GaiaNet node allows you to easily manage and experiment with them.
9285

@@ -98,35 +91,34 @@ The GaiaNet node allows you to specify the output format of the generated text.
9891

9992
Once the LLM returns a structured JSON response, the agent typically need to pass the JSON to a tool that performs the task and comes back with an answer. For example, the user question might be.
10093

101-
`What is the weather like in Singapore?`
94+
```
95+
What is the weather like in Singapore?
96+
```
10297

10398
The LLM generates the following JSON response.
10499

105-
`{"tool":"get_current_weather", "location":"Singapore","unit":"celsius"}`
100+
```
101+
{"tool":"get_current_weather", "location":"Singapore","unit":"celsius"}
102+
```
106103

107104
The GaiaNet node must know what is the tool associated with get_current_weather and then invoke it. GaiaNet node owners and operators can configure any number of external tools by mapping a tool name with a web service endpoint. In the above example, the get_current_weather tool might be associated with a web service that takes this JSON data. The GaiaNet node sends the JSON to the web service endpoint via HTTPS POST and receives an answer.
108105

109-
110106
```
111107
42
112108
```
113109

114-
115110
It then optionally feeds the answer to the LLM to generate a human language answer.
116111

117-
118112
```
119113
The current weather in Singapore is 42C.
120114
```
121115

122-
123116
Through the GaiaNet node SDK, developers are not limited to using web services. They can write plugins to process LLM responses locally on the node. For example, the LLM might return Python code, which can be executed locally in a sandbox and for the GaiaNet node to perform a complex operation.
124117

125118
**7 The API server.** All GaiaNet nodes must have the same API for questions and answers. That allows front-end applications to work with, and potentially be load-balanced to any GaiaNet node. We choose to support the OpenAI API specification, which enables GaiaNet nodes to become drop-in replacements for OpenAI API endpoints for a large ecosystem of applications.
126119

127120
The API server runs securely and cross-platform on the WasmEdge runtime. It ties together all the other components in the GaiaNet node. It receives user requests, generates an embedding from the request, searches the vector database, adds search results to the prompt context, generates an LLM response, and then optionally uses the response to perform function calling. The API server also provides a web-based chatbot UI for users to chat with the RAG-enhanced finetuned LLM on the node.
128121

129-
130122
## GaiaNet network
131123

132124
While each GaiaNet node is already a powerful AI agent capable of answering complex questions and performing actions, individual nodes are not suitable for providing public services. There are several important reasons.
@@ -135,29 +127,26 @@ While each GaiaNet node is already a powerful AI agent capable of answering comp
135127
* For GaiaNet node owners and operators, there is no economic incentive to provide such services to the public, which could be very costly to run.
136128
* The AI agent servers have very different scaling characteristics than traditional internet application servers. When the agent is processing a user request, it typically takes up all the computing resources on the hardware. Instead of using software to scale concurrent users on a single server, the challenge of GaiaNet is to scale to many different identical nodes for a large application.
137129

130+
Those challenges have given rise to the GaiaNet domain, which forms the basis of the GaiaNet web3 network. A GaiaNet domain is a collection of GaiaNet nodes available under a single Internet domain name. The domain operator decides which GaiaNet nodes can be registered under the domain and makes the node services available to the public. For example, a GaiaNet domain might be a Computer Science teaching assistant for UC Berkeley. The domain could provide services through `https://cs101.gaianet.berkeley.edu`. The domain operator needs to do the following.
138131

139-
Those challenges have given rise to the GaiaNet domain, which forms the basis of the GaiaNet web3 network. A GaiaNet domain is a collection of GaiaNet nodes available under a single Internet domain name. The domain operator decides which GaiaNet nodes can be registered under the domain and makes the node services available to the public. For example, a GaiaNet domain might be a Computer Science teaching assistant for UC Berkeley. The domain could provide services through [https://cs101.gaianet.berkeley.edu](https://cs101.gaianet.berkeley.edu/). The domain operator needs to do the following.
140-
141-
* Verify and admit individual nodes to be registered under the domain. Those nodes must all meet requirements, such as the LLM, knowledge base, and prompts, set by the domain operator to ensure service quality.
132+
* Verify and admit individual nodes to be registered under the domain. Those nodes must all meet requirements, such as the LLM, knowledge base, and prompts, set by the domain operator to ensure service quality. The node registration on a domain could be done via a whitelist or blacklist. It is up to the domain operator.
142133
* Monitor each node’s performance at real time and remove inactive ones.
143134
* Promotes the “teaching assistant” chatbot apps to the target audience.
144135
* Set the price for the API services.
145136
* Load balance between active nodes.
146137
* Getting paid by users.
147138
* Pay nodes for their services.
148139

140+
Each GaiaNet node has an unique node ID in the form of an ETH address. The private key associated with the ETH address is stored on the node. Once a node is successfully registered with a domain, it is entitled to receive payments from both service revenue and network awards from the domain. The domain could send payments directly to the node's ETH address. Or, the domain could provide a mechanism for a node operator to register multiple nodes under a single Metamask address, such as signing a challenge phrase using the node private keys. In that case, the node operator will receive aggregated payments in his Metamask account for all associated nodes.
149141

150142
Each GaiaNet domain has a smart contract that is used for escrow payments. It is similar to OpenAI’s credit payment model, where users purchase credits first, and then consume them over time. When the user pays into the smart contract, an access token will be automatically issued to him. He uses this token to make API calls to the domain, which is then load-balanced to random nodes in the domain. As the user consumes those services, his fund in the contract depletes and the access token stops working if he no longer has any balance.
151143

152144
The pricing and payment of the API service are determined by the domain operator. It is typically denominated in USD stable coins. The domain operator pays a share of the revenue to node operators who provided the services. The GaiaNet network is a decentralized marketplace of agent services.
153145

154-
155-
>The funds locked in GaiaNet domain contracts are for a single purpose of consuming API services. It is called Purpose Bound Money.
156-
146+
> The funds locked in GaiaNet domain contracts are for a single purpose of consuming API services. It is called Purpose Bound Money.
157147
158148
A key aspect of the GaiaNet protocol is that the domain operators are “trust providers” in the ecosystem of decentralized nodes. The protocol network is designed to incentivize the trust of the operators through tokenomics designs such as mining and staking. GaiaNet nodes, domains, users, and developers form a DAO to grow the network and benefit all contributors.
159149

160-
161150
## GaiaNet token
162151

163152
The GaiaNet token is a utility token designed to facilitate transactions, support governance, and foster trust in the network. It serves three primary purposes.
@@ -166,24 +155,15 @@ The GaiaNet token is a utility token designed to facilitate transactions, suppor
166155
* As a staking token, holders vouch for domain operators’ trustworthiness. Stakers get a cut from the domain operator’s service revenue. But they could also be slashed if the domain operator misbehave, such as spreading misinformation or providing unreliable services.
167156
* As a payment token, the GaiaNet token could be deposited into the domain’s escrow contract and be used to pay for services over time.
168157

169-
170158
The payment utility of the GaiaNet token is designed to balance the network supply and demand. The value of the GaiaNet token asset is determined at the time when it enters or leaves the escrow smart contract based on real-time exchange rates.
171159

172160
Service consumers could lock in savings from the potential appreciation of the token. For example, if a user deposits $100 worth of GaiaNet tokens into the contract, and when the domain and nodes get paid, the token value has gone up to $110, he would have received $110 worth of agent services.
173161

174-
Conversely, if the token price drops, the service providers (domains and nodes) now have an opportunity to “mine” the tokens on the cheap. If the $100 initial tokens is only worth $90 now, service providers will get more tokens for each unit of electricity and compute they provide. That incentivizes more nodes to join the network and speculate on a later rise in token value.
175-
176-
The payment utility is directly related to the circulation market cap of the token. The valuation formula for medium-of-exchange tokens (ie the payment token) is as follows.
162+
Conversely, if the token price drops, the service providers (domains and nodes) now have an opportunity to “mine” the tokens on the cheap. If the $100 initial tokens is only worth $90 now, service providers will get more tokens for each unit of electricity and compute they provide. That incentivizes more nodes to join the network and speculate on a later rise in token value.
177163

178-
Fig: Xxx
164+
> An exercise: OpenAI is projected to reach $5 billion in ARR in 2024. Assume that most enterprise customers pay quarterly, that is $1.25 billion of circulation market cap in addition to OpenAI’s current enterprise value if they were to issue a payment token. The overall AI services market size is projected to reach $2 trillion in a few years. That translates to $500 billion market cap for a payment utility token alone.
179165
180-
The larger the overall market size and the longer participants hold the token result in higher circulating market cap of the token. We believe that the tokenomics design is aligned with the long term goals of the GaiaNet DAO network.
181-
182-
183-
>An exercise: OpenAI is projected to reach $5 billion in ARR in 2024. Assume that most enterprise customers pay quarterly, that is $1.25 billion of circulation market cap in addition to OpenAI’s current enterprise value if they were to issue a payment token. The overall AI services market size is projected to reach $2 trillion in a few years. That translates to $500 billion market cap for a payment utility token alone.
184-
185-
186-
## Developers and component marketplace
166+
## Component marketplace for AI assets
187167

188168
GaiaNet is a developer platform to create your agent services. We provide tools for you to do these.
189169

@@ -192,18 +172,15 @@ GaiaNet is a developer platform to create your agent services. We provide tools
192172
* Rust-based SDK to dynamically generate and manage prompts.
193173
* Rust-based SDK to extend the agent’s capability for invoking tools and software on the node.
194174

195-
196175
For developers who do not wish to operate nodes, we are building a marketplace for
197176

198177
* finetuned models
199178
* knowledge bases and datasets
200179
* function-calling plugins
201180

202-
203181
All those components are blockchain-based assets represented by NFTs. A node operator could purchase NFTs for the components it wishes to use, and share service revenue with the component developers. That enables diverse and cashflow-generating assets to be issued from the GaiaNet ecosystem.
204182

205-
206-
## Conclusions
183+
## Conclusion
207184

208185
GaiaNet provides open-source tools for individuals and teams to create agent services using their proprietary knowledge and skills. Developers could create finetuned LLMs, knowledge collections, and plugins for the agent, and issue assets based on those components. The GaiaNet protocol makes those nodes discoverable and accessible through GaiaNet domains.
209186

0 commit comments

Comments
 (0)