You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remember that you need to provide the `SEED_PHRASE`, `AGENT_MAILBOX_KEY`, `name`, `seed` and `mailbox` parameters to correctly run this example.
192
+
Remember that you need to provide the `SEED_PHRASE`, `name`, `seed` and `mailbox` parameters to correctly run this example.
194
193
</Callout>
195
194
196
195
Okay, we've got the whole code block above for our first agent. Have a look at list of available packages on the Agentverse [here ↗️](/guides/agentverse/allowed-imports) to get started with Agents development on the Agentverse.
@@ -239,18 +238,16 @@ There are a lot of really cool, neat things you need to know from code above. Le
239
238
240
239
-`SEED_PHRASE` is our agents unique seed.
241
240
242
-
-`AGENT_MAILBOX_KEY` mailbox key is our ID of our mailbox hosted on Agentverse.
243
-
244
241
-`OPENAI_API_KEY` is our API key to OpenAI's APIs.
245
242
246
243
We can now initialize the Agent and define the [Protocol ↗️](/references/uagents/uagents-protocols/agent-protocols). To read more about **Agent objects**, please check out [the reference docs ↗️](/references/uagents/uagents-api/agent#agent-objects).
247
244
248
-
Then, we have the **on_message()**[handler ↗️](/guides/agents/intermediate/handlers):
245
+
Then, we have the `on_message()`[handler ↗️](/guides/agents/intermediate/handlers):
Remember that you need to provide the `SEED_PHRASE`, `AGENT_MAILBOX_KEY`, `OPENAI_API_KEY`, `name`, `seed` and `mailbox` parameters to correctly run this example.
510
+
Remember that you need to provide the `SEED_PHRASE`, `OPENAI_API_KEY`, `name`, `seed` and `mailbox` parameters to correctly run this example.
515
511
</Callout>
516
512
517
513
This Agent is simple again, hopefully you're seeing a pattern here. These Agents while independent of each other can
@@ -523,7 +519,7 @@ compliment one another.
523
519
524
520
Aside from the different logic, the primary difference in `web_summary_agent.py` is that this agent does not rely on a separate function, and wraps the whole logic in the message handler.
525
521
526
-
Let's run this one too. Again, follow the steps for the previous Agent and go and register a Mailbox and update this agent with the new Mailbox. Each agent must have a unique [Mailbox ↗️](/guides/agents/intermediate/mailbox).
522
+
Let's run this one too. Again, follow the steps for the previous Agent and go and connect it via a Mailbox Each agent must have a unique [Mailbox ↗️](/guides/agents/intermediate/mailbox)!
Copy file name to clipboardexpand all lines: pages/guides/agents/intermediate/agent-functions.mdx
+18-8
Original file line number
Diff line number
Diff line change
@@ -130,19 +130,29 @@ Finally, we run our agent as follows: `python simple_function.py`
130
130
131
131
For this example we set up a really simple Agent Function. For further information on Agent Functions and registration process, see [Register Agent Functions on the Agentverse ↗️](/guides/agentverse/registering-agent-services) resource.
132
132
133
-
To register **Local Agents and Functions**, you will first need to log in the [Agentverse ↗️](https://agentverse.ai/) and head over to the **My Agents** tab. Then, click on **Local Agents**tab and click one of the **Connect Local Agent** buttons.
133
+
To register **Local Agents and Functions**, you will first need to head over to the [local Agent Inspector ↗️](/guides/agents/intermediate/local-agent-inspector) available by clicking on the dedicated link presented within your terminal output after running the above local Agent. Once you do so, click on **Connect**button and select **Mailbox**. Follow the steps closely and provide all needed data required.
You will need to provide the **local agent address** and make sure it is running on your terminal as only running agents can enroll Agent Functions on the Agentverse!
At this point, you do not need to do anything else. Click **Finish**.
140
144
141
-
<Callouttype="warning"emoji="⚠️">
142
-
If you see a message saying **"We couldn't find this agent address on Fetch Network"** you will need to wait for some time (around 5 minutes) until the protocols are uploaded successfully on the Fetch Network and your agent is retrievable.
Once your agent is retrieved correctly, you will see a box depicting it within the **My Agents** tab. Click on it and head over to the **Deploy** tab and click on **+ New Function**. Here, you can now provide the needed details for your Agent Function in the dedicated fields. Remember to provide detailed descriptions for what your **Agent Function** does and the **Fields** for data Models expected. understanding of Functions fields descriptions.
155
+
Here, you can now provide the needed details for your Agent Function in the dedicated fields. Remember to provide detailed descriptions for what your **Agent Function** does and the **Fields** for data Models expected. understanding of Functions fields descriptions.
Copy file name to clipboardexpand all lines: pages/guides/agents/intermediate/agent-types.mdx
+8-8
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ The [Agentverse Mailbox feature ↗️](/guides/agents/intermediate/mailbox) mak
37
37
38
38
**Local Agents can use a Mailbox to ensure that no messages are lost when they are temporarily disconnected from the network**; the Mailbox acts as a message buffer, storing communications until the Agent comes back online and ready to process them. Indeed, this feature enables interaction with other Agents or functions without the Agent being online continuously.
39
39
40
-
In order to set up a mailbox for a local Agent, you first need to create and configure a local Agent. The Agent's address is used to register it on the Agentverse, and then to generate a **Mailbox API key** for your Agent. For instance, consider the following basic Agent:
40
+
In order to set up a mailbox for a local Agent, you first need to create and configure the local Agent. For instance, consider the following basic Agent:
@@ -80,8 +78,10 @@ In order to set up a mailbox for a local Agent, you first need to create and con
80
78
81
79
</CodeGroup>
82
80
81
+
Now, run this Agent. You will be able to see a link in your terminal output redirecting you towards the [Local Agent Inspector ↗️](/guides/agents/intermediate/local-agent-inspector) for this specific Agent on the [Agentverse ↗️](https://agentverse.ai/). Click on this URL. You will be redirected to the Inspector UI where you can check multiple details about the local Agent you have just run.
Then, head over to the [Agentverse ↗️](https://agentverse.ai/) and navigate to the **My Agents**tab. Here, select **Local Agents**and click on **Connect Local Agent**. Paste your Agent's address retrieved from running your local Agent and follow the steps until you get a **Mailbox API Key**, which you will use to update your Agent's configuration above. To test your Mailbox setup, you can create another Agent (on Agentverse for instance) that sends messages to the Mailbox while the first Agent is offline. When the first agent comes back online, it will retrieve and process the stored messages. For a complete example, check out this [guide ↗️](/guides/agentverse/agentverse-mailbox/utilising-the-mailbox).
85
+
Now, click on **Connect** and then on **Mailbox** options and follow the steps closely in order to correctly set up a mailbox for your local Agent. To test your Mailbox setup, you can create another Agent (on Agentverse for instance) that sends messages to the Mailbox while the first Agent is offline. When the first agent comes back online, it will retrieve and process the stored messages.
86
86
87
-
For a more complex example of an Agent using a Mailbox, check out the following [guide ↗️](/guides/agents/intermediate/langchain-rag-agent).
87
+
For a complete example, check out this [guide ↗️](/guides/agentverse/agentverse-mailbox/utilising-the-mailbox). For a more complex example of an Agent using a Mailbox, check out the following [guide ↗️](/guides/agents/intermediate/langchain-rag-agent).
Copy file name to clipboardexpand all lines: pages/guides/agents/intermediate/langchain-rag-agent.mdx
+6-6
Original file line number
Diff line number
Diff line change
@@ -243,15 +243,15 @@ Let's start by creating the file within the `agents` directory, under `src` dire
243
243
</DocsCode>
244
244
</CodeGroup>
245
245
246
-
The Agent is defined as a [local agent with a Mailbox ↗️](https://fetch.ai/docs/guides/agents/intermediate/options-for-running-local-agents#run-a-local-agent-using-a-mailbox) and it can answer questions by fetching and summarizing information from a given website URL.
246
+
The Agent is defined as a [local agent with a Mailbox ↗️](/guides/agents/intermediate/options-for-running-local-agents#run-a-local-agent-using-a-mailbox) and it can answer questions by fetching and summarizing information from a given website URL.
@@ -407,7 +407,7 @@ The script for this Agent looks as follows:
407
407
408
408
The Agent fetches and processes information from specified URLs to answer users' questions.
409
409
410
-
Let's explore the script above in more detail. We start by importing multiple modules, including tools for making HTTP requests, parsing HTML, and handling Natural Language Processing (NLP). The Agent uses **OpenAI's GPT-4o-mini model** to generate answers based on the retrieved documents. We then create an Agent called `langchain_rag_agent()` with a unique `seed` and `mailbox` address. Check out the [Mailbox ↗️](/guides/agents/intermediate/mailbox) guide for additional information on how to set up Mailboxes for your Agents. **Make sure to have enough funds in the Agent's wallet for it to correctly register in the [Almanac contract ↗️](/references/contracts/uagents-almanac/almanac-overview). You can use the `fund_agent_if_low` function on the testnet to add funds to your Agent's wallet if needed.
410
+
Let's explore the script above in more detail. We start by importing multiple modules, including tools for making HTTP requests, parsing HTML, and handling Natural Language Processing (NLP). The Agent uses **OpenAI's GPT-4o-mini model** to generate answers based on the retrieved documents. We then create an Agent called `langchain_rag_agent()` with a unique `seed`. Check out the [Mailbox ↗️](/guides/agents/intermediate/mailbox) guide for additional information on how to set up Mailboxes for your Agents. **Make sure to have enough funds in the Agent's wallet for it to correctly register in the [Almanac contract ↗️](/references/contracts/uagents-almanac/almanac-overview)**. You can use the `fund_agent_if_low` function on the testnet to add funds to your Agent's wallet if needed.
411
411
412
412
Next, we define the `DocsBot`[protocol ↗️](/guides/agents/intermediate/protocols) using the `Protocol` class of the `uagents` library to handle message interactions. This protocol uses a predefined prompt template to structure the questions and context for the language model.
413
413
@@ -594,7 +594,7 @@ It will look as follows:
594
594
595
595
Cool! All scripts are now set up! You will need to [connect the local Agent to the Agentverse using a Mailbox ↗️](/guides/agents/intermediate/options-for-running-local-agents#run-a-local-agent-using-a-mailbox). The Mailbox enables your Agents to be retrievable for communication and interaction with any other registered Agent on the Almanac contract and Fetch Network. In this example, the `langchain_rag_agent` will be connected to the Agentverse using a [Mailbox ↗️](/guides/agents/intermediate/mailbox). The `langchain_rag_user` Agent is used as a testing Agent for the RAG Agent being registered on the Agentverse and made subsequently available on DeltaV for queries.
596
596
597
-
By creating an [Agent Function ↗️](https://fetch.ai/docs/guides/agents/intermediate/agent-functions) and [registering it ↗️](https://fetch.ai/docs/guides/agentverse/agentverse-functions/registering-agent-services) via the Agentverse, you will make it retrievable to the [AI Engine ↗️](/concepts/ai-engine/ai-engine-intro) for interaction with users via natural language queries made on [DeltaV ↗️](/concepts/ai-engine/deltav).
597
+
By creating an [Agent Function ↗️](/guides/agents/intermediate/agent-functions) and [registering it ↗️](/guides/agentverse/agentverse-functions/registering-agent-services) via the Agentverse, you will make it retrievable to the [AI Engine ↗️](/concepts/ai-engine/ai-engine-intro) for interaction with users via natural language queries made on [DeltaV ↗️](/concepts/ai-engine/deltav).
598
598
599
599
The `langchain_rag_user` Agent is used as a testing Agent for the RAG Agent being registered on the Agentverse and made subsequently available on DeltaV for queries.
@@ -84,7 +84,6 @@ By running the above Agent, the output you get should be similar to the followin
84
84
85
85
By clicking on the dedicated link depicted here, you will then be redirected to the **Inspector Dashboard**. A pop-up message will appear saying that your Agent was connected successfully.
86
86
87
-

88
-
89
-
Here you can view all the information about your local Agent, including details about all messaged sent and received by the Agent.
Here you can view all the information about your local Agent, including details about all messaged sent and received by the Agent. Additionally, you can connect you local Agent directly via the Inspector UI, by clicking the **Connect** button and following the steps required. For a better representation of the process, have a look at the following guide [here ↗️](/guides/agents/intermediate/mailbox)
0 commit comments