Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added agentverse explanation #95

Merged
merged 11 commits into from
May 18, 2023
19 changes: 18 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The system requirements for the Python μAgents package are as follows, but libr
!!! Info "System requirements"
The Python μAgents pacakge runs on `Ubuntu/Debian`, `MacOS`, and `Windows`.

You need <a href="https://www.python.org/downloads/" target="_blank">Python</a> 3.8, 3.9 or 3.10 on your system.
You need <a href="https://www.python.org/downloads/" target="_blank">Python</a> 3.8, 3.9, 3.10 or 3.11 on your system.

## Install from PyPI

Expand Down Expand Up @@ -48,3 +48,20 @@ pip install uagents
```
poetry shell
```

??? warning note "Troubleshooting"

If you encounter any issues during the installation process, here are some common problems and their solutions:

**Problem** (MacOS/Python 3.11):
```
Installing coincurve (17.0.0): Failed
```

**Solution**:
Install the latest versions of `automake`, `autoconf`, and `libtool` with:
```
brew install automake autoconf libtool
```

For any other problems, please let us know by creating as [issue](https://github.com/fetchai/uAgents/issues).
41 changes: 38 additions & 3 deletions docs/remote-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ In alice's terminal:

For a more complex example visit [restaurant booking demo](booking-demo.md).

## The Agentverse Explorer
## The Agentverse Mailbox

μAgents can also interact remotely using a mailbox server. For example, you can use [The Agentverse Explorer](https://agentverse.ai/) to find other agents and register your own.
Local μAgents can also interact remotely using a mailbox server. For example, you can use [The Agentverse Explorer](https://agentverse.ai/) to find other agents and register your own.

To register agents in the Agentverse mailbox, you need to sign in at [The Agentverse Explorer](https://agentverse.ai/). Then, in the upper right corner click on your profile and select `API Keys`, select `Create new key` and name it. This will generate your own `API Key` that will allow you to use the mailbox server.

Expand All @@ -143,4 +143,39 @@ agent = Agent(
)
```

Now, you can recreate the example we showed at the begining of this section by also registering agent `bob` in [The Agentverse Explorer](https://agentverse.ai/).
Now, you can recreate the example we showed at the begining of this section also registering agent `bob` in [The Agentverse Explorer](https://agentverse.ai/) and adding the missing imports, models and handlers.


## Managed Agents on Agentverse

Agentverse is both a sandbox for experimentation and learning and a place to deploy your agents so you don't have to keep them running yourself. You can also choose from a set of use case examples.

To get started go to [The Agentverse Explorer](https://agentverse.ai/) and sign in. Then, click on `Managed Agents` and select `+ Use Case`. You can start by selecting `Your first agent` use case in the `Getting Started` section to create a simple agent that prints a hello statement. Now, select your new `My First Agent` agent to open the playground. Click on the `Run` button and you will see the following printed on the terminal:

<div id="termynal3" data-termynal data-ty-typeDelay="100" data-ty-lineDelay="2000">
<span data-ty>Hello, I'm an agent and my address is agent1...</span>
<span data-ty>Hello, I'm an agent and my address is agent1...</span>
<span data-ty>Hello, I'm an agent and my address is agent1...</span>
<span data-ty>...</span>
</div>

You can try the `Sending messages between agents` use case to establish communication between two agents on the `agentverse`. Feel free to try other use cases or create customized agents of your own!


## Agentverse and Local Agents
Communication between agentverse agents and local agents is also possible. All you need to do is provide the target address of the agent.
After registering agent `alice` on the mailbox server, as explained in the previous section, you can easily create a new agentverse agent `bob` by selecting `+ Agent` on `Managed Agents` in the [The Agentverse Explorer](https://agentverse.ai/). Then, add the following code to `bob`:


```python
class Message(Model):
message: str

@agent.on_message(model=Message)
async def handle_message(ctx: Context, sender: str, msg: Message):
ctx.logger.info(f"Received message from {sender}: {msg.message}")

await ctx.send(sender, Message(message="hello there alice"))
```

Next, copy bob's address and paste it into alice's code under `RECIPIENT_ADDRESS`. Once you've done that, run agent `bob` on [The Agentverse Explorer](https://agentverse.ai/) followed by your local agent `alice`. You'll then be able to send messages back and forth between the two agents, which will be displayed on both alice's and bob's terminals.
Loading