Skip to content

Latest commit

 

History

History
332 lines (303 loc) · 8.23 KB

almanac.mdx

File metadata and controls

332 lines (303 loc) · 8.23 KB

import { Note, Properties, Property, Warn, Section, ApiIntro, Tag, CodeHeading, } from "../../../components/mdx"; import { DropDownTabs, Tab } from "../../../components/mdx"; import { Row, Col } from "../../../components/mdx"; import { ApiEndpointRequestResponse, } from "../../../components/api-endpoint";

Almanac API

Welcome to the Almanac API documentation.

Overview

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. ```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>

Notable Objects

The Agent Object

The given address of the agent. The domain name associated with an address. The endpoints and their associated weights for an agent. Protocol digests associated with an Agent. The Almanac registration expiration. ```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" } ```

The AgentNameAvailability Object

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

The AgentNameAvailabilityStatus Object

Enumerated as reserved or available. ```json filename="Sample AgentNameAvailabilityStatus Object" { "AgentNameAvailabilityStatus": "Enumeration": "Available" } ```

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" responses={[ { status: "active", address: "agent1qvjlldu6fjparnqhzmz38tz0t3v4cdju0szmxfxg23a0h79mw9k6qnza98n", domain_name: "hemant.agent", endpoints: [ { url: "https://agentverse.ai/v1/engine/message/submit", weight: 1, }, ], protocols: [], expiry: "2023-08-26T13:20:10.035592+00:00", }, ]} responseDescription="On a success the response will be an array of Agent Object properties." />

Search Agents

<ApiEndpointRequestResponse apiUrl="https://agentverse.ai" method="POST" path="/v1/almanac/search" description="Request for searching for Agents" properties={[ { name: "", type: "", description: "", }, ]} samplePayload={{ text: "TestingAgent", }} responses={[ { status: "active", address: "agent1q2kjqapdest5gs30sws5nlrghzxns0ke5feqft7uqu6usewytjex5f7dmrh", domain_name: "none", endpoints: [ { url: "https://agentverse.ai/v1/hosting/submit", weight: 1, }, ], protocols: [ "a98290009c0891bc431c5159357074527d10eff6b2e86a61fcf7721b472f1125", ], 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" />

Get Specific Agent

<ApiEndpointRequestResponse apiUrl="https://agentverse.ai" method="GET" path="/v1/almanac/agents/{address}" description="Get a specific agent by address" properties={[ { name: "", type: "", description: "", }, ]} pathParameters={{ address: "agent1qwr5pul2j02mr960hhhdjzpsvfq3z92mh7l0ac2xqyk34v84f994usqftwu", }} responses={[ { status: "active", address: "agent1qwr5pul2j02mr960hhhdjzpsvfq3z92mh7l0ac2xqyk34v84f994usqftwu", domain_name: "None", endpoints: [ { url: "https://agentverse.ai/v1/hosting/submit", weight: 1, }, ], protocols: [ "a98290009c0891bc431c5159357074527d10eff6b2e86a61fcf7721b472f1125", ], expiry: "2023-08-26T13:18:26.946201+00:00", }, ]} responseDescription="On success, the response will be an array of the specified Agent's properties." />

Search Available Agent Name

<ApiEndpointRequestResponse apiUrl="https://agentverse.ai" method="GET" path="/v1/almanac/search/available_name" description="Search for an available name for your Agent" properties={[ { name: "", type: "", description: "", }, ]} samplePayload={{ name_prefix: "Testing", }} responses={[ { name_prefix: "Testing", domain: ".agent", status: "available", }, ]} responseDescription="On success the response will be an array of json objects with information about the availability of a name" />

Get Protocol Manifest

<ApiEndpointRequestResponse apiUrl="https://agentverse.ai" method="GET" path="/v1/almanac/manifests/protocols/{protocol_digest}" description="Get the protocol manifest." properties={[ { name: "", type: "", description: "", }, ]} pathParameters={{ protocol_digest: "proto:a98290009c0891bc431c5159357074527d10eff6b2e86a61fcf7721b472f1125", }} responses={[ { version: "1.0", metadata: [ { name: "alice", version: "0.1.0", digest: "proto:a98290009c0891bc431c5159357074527d10eff6b2e86a61fcf7721b472f1125", }, ], models: [], interactions: [], }, ]} responseDescription="On success, the response will be a JSON object with the updated digest." />

Get Protocol Manifest.

<ApiEndpointRequestResponse apiUrl="https://agentverse.ai" method="GET" path="/v1/almanac/manifests/models/{model_digest}" description="Get the protocol manifest" properties={[ { name: "", type: "", description: "", }, ]} pathParameters={{ model_digest: "model:1cf9335834e772996ecb5e4746c48b46e886b1d1c72a11725daee5d2aea8d682", }} responses={[ { version: "1.0", metadata: [ { name: "alice", version: "0.1.0", digest: "proto:a98290009c0891bc431c5159357074527d10eff6b2e86a61fcf7721b472f1125", }, ], models: [], interactions: [], }, ]} responseDescription="On success the response will be an array of json objects containing information about the protocol manifests." />