Skip to content

Commit

Permalink
fix(docs): edits in mailroom API docs (#1118)
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Croft <[email protected]>
  • Loading branch information
FelixNicolaeBucsa and devjsc authored Jan 20, 2025
1 parent f60131e commit 17dc322
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 63 deletions.
70 changes: 8 additions & 62 deletions pages/apis/agentverse/mailroom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,72 +19,18 @@ import {
# Mailroom API

<div className="nx-text-fetch-content">
Welcome to the Mailroom API documentation.
</div>

## Overview

<Row>
<Col>
The mailroom API allows you to interact and manage the mailroom service offered by the Agentverse. This involves exploring and deleting
mailroom envelopes, managing agent registration for the mailroom service and monitoring your agents mailroom usage.
</Col>
<Col>
```bash filename="Endpoints"
POST /v1/auth/challenge

GET /v1/agents
POST /v1/agents

GET /v1/agents/:address
PUT /v1/agents/:address
DELETE /v1/agents/:address

GET /v1/api-keys
DELETE /v1/api-keys/:uuid
The Mailroom API streamlines communication by providing a dedicated [Mailbox ↗️](/guides/agents/intermediate/mailbox) for Agents in Agentverse; it ensures that Agents can send and receive messages even when offline, behind firewalls, or unable to maintain a constant network connection.

GET /v1/profile/usage
```
</Col>
Key functionalities include:

</Row>
- **Agent management**: register, retrieve, update, and delete Agent details.
- **Message handling**: store messages for offline Agents, enabling them to access and process them when back online.
- **Usage monitoring**: track data transfer, message volume, and storage limits for efficient resource management.
- **Secure access**: manage API keys to ensure secure and controlled access to Mailroom features.

## Notable Objects

### The Agent Object

<Row>
<Col>
<Properties>
<Property name="address" type="string">
The given address of the agent.
</Property>
<Property name="name" type="string">
The name of the Agent.
</Property>
<Property name="Pending_messages" type="integer">
Pending message for an agent in the mailroom.
</Property>
<Property name="Bytes_transferred" type="integer">
Bytes transferred over the mailroom.
</Property>
<Property name="Previous_bytes_transferred" type="integer">
Previously transferred bytes.
</Property>
</Properties>
</Col>
<Col>
```json filename="Example Agent Object"
{
"name": "Example Name",
"address": "agent1qtw0hy4kj65fv6j7qyv5mgdecq7c4qyqfqnjgc25wz4vf5h47l9l6m7qqtg",
"Pending_messages": 1,
"Bytes_transferred": 1,
"Previous_Bytes_transferred": 1
}
```
</Col>
</Row>
You can see our dedicated object reference documentation [here ↗️](/references/agentverse/mailroom).
</div>

## Request and response library

Expand Down
14 changes: 14 additions & 0 deletions pages/references.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ import { AgentsIcon, LedgerIcon , AsiIcon} from "src/icons/main-page-icons"
}
]
},
{
type: "Agentverse",
icon: AgentsIcon,
data: [
{
title: "Almanac API Objects",
path: "/references/agentverse/alamanc",
},
{
title: "Mailroom API Objects",
path: "/references/agentverse/mailroom",
}
]
},
{
type: "Ledger",
icon: LedgerIcon,
Expand Down
4 changes: 4 additions & 0 deletions pages/references/agentverse/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
"search": {
"title": "Search API",
"timestamp": true
},
"mailroom": {
"title": "Mailroom API",
"timestamp": true
}
}
2 changes: 1 addition & 1 deletion pages/references/agentverse/alamanc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {

import { Row, Col } from "../../../components/mdx";

# Almanac API
# Almanac API Objects

<div className="nx-text-fetch-content">
Welcome to the Almanac API documentation.
Expand Down
71 changes: 71 additions & 0 deletions pages/references/agentverse/mailroom.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import {
Properties,
Property
} from "../../../components/mdx";

import { Row, Col } from "../../../components/mdx";

# Mailroom API Objects

## Overview

<Row>
<Col>
The Mailroom API ensures reliable communication for Agents in Agentverse, even when they are offline or restricted by firewalls. It uses a [Mailbox ↗️](/guides/agents/intermediate/mailbox) to store incoming messages, allowing Agents to retrieve them when back online. This service simplifies operations by acting as a trusted intermediary, removing the need for Agents to stay constantly online.
</Col>
<Col>
```bash filename="Endpoints"
POST /v1/auth/challenge

GET /v1/agents
POST /v1/agents

GET /v1/agents/:address
PUT /v1/agents/:address
DELETE /v1/agents/:address

GET /v1/api-keys
DELETE /v1/api-keys/:uuid

GET /v1/profile/usage
```
</Col>

</Row>

## Notable Objects

### The Agent Object

<Row>
<Col>
<Properties>
<Property name="address" type="string">
The given address of the agent.
</Property>
<Property name="name" type="string">
The name of the Agent.
</Property>
<Property name="Pending_messages" type="integer">
Pending message for an agent in the mailroom.
</Property>
<Property name="Bytes_transferred" type="integer">
Bytes transferred over the mailroom.
</Property>
<Property name="Previous_bytes_transferred" type="integer">
Previously transferred bytes.
</Property>
</Properties>
</Col>
<Col>
```json filename="Example Agent Object"
{
"name": "Example Name",
"address": "agent1qtw0hy4kj65fv6j7qyv5mgdecq7c4qyqfqnjgc25wz4vf5h47l9l6m7qqtg",
"Pending_messages": 1,
"Bytes_transferred": 1,
"Previous_Bytes_transferred": 1
}
```
</Col>
</Row>

0 comments on commit 17dc322

Please sign in to comment.