Skip to content

Commit

Permalink
fix(docs): updating API response descriptions (#1162)
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 Feb 7, 2025
1 parent 40dfa4c commit 9447964
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 270 deletions.
2 changes: 1 addition & 1 deletion pages/apis/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"agentverse": "AgentVerse",
"agentverse": "Agentverse",
"ai-engine": "AI Engine",
"asi-alliance-wallet": "ASI Alliance Wallet"
}
8 changes: 4 additions & 4 deletions pages/apis/agentverse/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"almanac": { "title": "Almanac APIs", "timestamp": true },
"hosting": { "title": "Hosting APIs", "timestamp": true },
"mailroom": { "title": "Mailroom APIs", "timestamp": true },
"search": { "title": "Search APIs", "timestamp": true }
"almanac": { "title": "Almanac API", "timestamp": true },
"hosting": { "title": "Hosting API", "timestamp": true },
"mailroom": { "title": "Mailroom API", "timestamp": true },
"search": { "title": "Search API", "timestamp": true }
}
132 changes: 14 additions & 118 deletions pages/apis/agentverse/almanac.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,125 +16,21 @@ import {

# Almanac API

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

## Overview

<Row>
<Col>
The Almanac API allows you to manage your agents that are hosted by Agentverse. This involves searching for and registering
agents, updating the manifests of existing agents, checking Agent name availability and getting as well as updating Agent manifests.
</Col>
<Col>
```bash filename="Endpoints"
GET /v1/almanac/recent
POST /v1/almanac/search

GET /v1/almanac/agents/:address
GET /v1/almanac/search/available_name

GET /v1/almanac/manifests/protocols/:protocol_digest
GET /v1/almanac/manifests/models/:model_digest
```
</Col>

</Row>

## Notable Objects

### The Agent Object

<Row>
<Col>
<Properties>
<Property name="status" type="string">
The given address of the agent.
</Property>
<Property name="address" type="string">
The domain name associated with an address.
</Property>
<Property name="Endpoints" type="array">
The endpoints and their associated weights for an agent.
</Property>
<Property name="Protocol" type="array">
Protocol digests associated with an Agent.
</Property>
<Property name="Expiry" type="string" format="date-time">
The Almanac registration expiration.
</Property>
</Properties>
</Col>
<Col>
```json filename="Sample Agent Object"
{
"status": "Active",
"address": "agent1qwckmey38jd6xl6al9k5qcelr9faqfgpxh73tev6fa3ruqnzajp6yneg3qw",
"endpoints": [{"url": "https://agentverse.ai/v1/hosting/submit", "weight": 1}],
"protocol": "a98290009c0891bc431c5159357074527d10eff6b2e86a61fcf7721b472f1125",
"expiry": "2023-08-26T03:30:05.568195+00:00"
}
```
</Col>
</Row>
The Almanac API provides tools for managing Agents in Agentverse; this includes functionalities for searching, registering, and updating Agents. The Almanac API allows developers to verify Agents' name availability, retrieve Agents' manifests, and access recently registered Agents on the network. The API is designed to support efficient interactions with Agent-related data through a set of well-defined endpoints.

### The AgentNameAvailability Object

<Row>
<Col>
<Properties>
<Property name="name_prefix" type="string">
The prefix for the Agent's name.
</Property>
<Property name="domain" type="string">
The Agent's domain.
</Property>
<Property name="status" type="string">
The status of the AgentNameAvailability object i.e reserved or available.
</Property>
</Properties>
</Col>
<Col>
```json filename="Sample AgentNameAvailability Object"
{
"name_prefix": "Example Name",
"domain": ".agent",
"Status": "Available"
}
```
</Col>
</Row>

### The AgentNameAvailabilityStatus Object

<Row>
<Col>
<Properties>
<Property name="AgentNameAvailability" type="string">
Enumerated as reserved or available.
</Property>
</Properties>
</Col>
<Col>
```json filename="Sample AgentNameAvailabilityStatus Object"
{
"AgentNameAvailabilityStatus": "Enumeration": "Available"
}
```
</Col>
</Row>
You can see our dedicated objects reference documentation [here ↗️](/references/agentverse/almanac).

## Request and response library

### Get Recently Registered Agents


<ApiEndpointRequestResponse
apiUrl="https://agentverse.ai"
method="GET"
path="/v1/almanac/recent"
description="Request for getting your recently registered Agents"
description="Request for getting your recently registered Agents."
responses={[
{
status: "active",
Expand All @@ -151,7 +47,7 @@ import {
expiry: "2023-08-26T13:20:10.035592+00:00",
},
]}
responseDescription="On a success the response will be an array of Agent Object properties."
responseDescription="An array of [Agent Object ↗️](/references/agentverse/almanac#the-agent-object) properties for your recently registered Agents."
/>

### Search Agents
Expand Down Expand Up @@ -191,7 +87,7 @@ import {
expiry: "2023-08-26T03:30:05.568195+00:00",
},
]}
responseDescription="On success the response will be an array of json objects with the properties of the Agent you've searched"
responseDescription="An array of JSON objects for Agents matching the search criteria and represented as a [Agent Objects ↗️](/references/agentverse/almanac#the-agent-object)."
/>

### Get Specific Agent
Expand All @@ -200,7 +96,7 @@ import {
apiUrl="https://agentverse.ai"
method="GET"
path="/v1/almanac/agents/{address}"
description="Get a specific agent by address"
description="Get a specific Agent by its address."
properties={[
{
name: "address",
Expand Down Expand Up @@ -231,7 +127,7 @@ import {
expiry: "2023-08-26T13:18:26.946201+00:00",
},
]}
responseDescription="On success, the response will be an array of the specified Agent's properties."
responseDescription="An array containing the properties of a specific Agent represented as an [Agent Object ↗️](/references/agentverse/almanac#the-agent-object)."
/>

### Search Available Agent Name
Expand Down Expand Up @@ -259,7 +155,7 @@ import {
status: "available",
},
]}
responseDescription="On success the response will be an array of json objects with information about the availability of a name"
responseDescription="An array of JSON objects containing information about the availability of the requested agent name."
/>

### Get Protocol Manifest
Expand All @@ -268,7 +164,7 @@ import {
apiUrl="https://agentverse.ai"
method="GET"
path="/v1/almanac/manifests/protocols/{protocol_digest}"
description="Get the protocol manifest."
description="Get the protocol's manifest."
properties={[
{
name: "protocol_digest",
Expand Down Expand Up @@ -296,16 +192,16 @@ import {
interactions: [],
},
]}
responseDescription="On success, the response will be a JSON object with the updated digest."
responseDescription="An array of JSON object containing the protocol manifest details, including version, metadata, models, and interactions."
/>

### Get Protocol Manifest.
### Get Model details

<ApiEndpointRequestResponse
apiUrl="https://agentverse.ai"
method="GET"
path="/v1/almanac/manifests/models/{model_digest}"
description="Get the protocol manifest"
description="Get the Model's details."
properties={[
{
name: "model_digest",
Expand Down Expand Up @@ -333,5 +229,5 @@ import {
interactions: [],
},
]}
responseDescription="On success the response will be an array of json objects containing information about the protocol manifests."
/>
responseDescription="An array of JSON objects containing the model's details, including version, metadata, models, and interactions."
/>
Loading

0 comments on commit 9447964

Please sign in to comment.