Hosting API
The Hosting API empowers users to manage their Agents on Agentverse. From creating and updating Agents to control their states and access detailed logs, this API offers comprehensive tools for efficient Agents management. Users can also retrieve usage statistics, monitor individual Agent performance, and ensure that their Agents operate as intended with up-to-date code.
This documentation provides an in-depth overview of available endpoints, notable objects, and practical examples, enabling developers to interact with the API effectively. Whether you're creating new Agents or managing existing ones, this guide will help you unlock the full potential of the Hosting API.
You can see our dedicated object reference documentation here .
Request and response library
Getting a list of your Agents
Endpoint:GET
/v1/hosting/agentsRequest
Request a list of all your Agents.
Responses
An array of your Agents, each represented as an Agent Object
.
Creating a new Agent
Endpoint:POST
/v1/hosting/agentsRequest
Request for creating a new Agent.
- Name
name
- Type
- string
- Required
- required
- Description
- The given name of the agent. This is only a label that is used internally so users can keep track of their agents.
Responses
An array containing the properties of a newly created Agent represented as an Agent Object
.
Look up specific Agent
Endpoint:GET
/v1/hosting/agents/{agentAddress}Request
Look up a specific Agent by its address on the hosting platform.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent
Responses
An array containing the properties of the specified Agent, represented as an Agent Object
.
Delete Specified Agent
Endpoint:DELETE
/v1/hosting/agents/{agentAddress}Request
Delete a specific Agent identified by its address.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent
Responses
If successful, this will result in the deletion of the specified Agent from the Agentverse platform.
Look up Agent's code
Endpoint:GET
/v1/hosting/agents/{agentAddress}/codeRequest
Look up the code for an Agent specified by its address.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
Responses
Retrieves the Agent's code details, including digest, code, and timestamp.
Update code for a specific Agent
Endpoint:PUT
/v1/hosting/agents/{agentAddress}/codeRequest
Updates the code for a specific Agent, identified by address.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
- Name
code
- Type
- string
- Required
- required
- Description
- The code for a specific agent on the Agentverse, provided as a collection of files. Each file includes an id, name, value (the code content), and language.
Responses
A JSON object containing the updated digest of the Agent's code.
Start a specific Agent identified by its address
Endpoint:POST
/v1/hosting/agents/{address}/startRequest
Start a specific Agent identified by its address.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
Responses
An array of JSON objects containing the properties of the started Agent identified by its address.
Stop a specific Agent identified by its address
Endpoint:POST
/v1/hosting/agents/{address}/stopRequest
Stops a specific Agent identified by address.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
Responses
If successful, the selected Agent will stop, and the response will be an array with the Agent's properties.
Get the latest logs for an Agent
Endpoint:GET
/v1/hosting/agents/{address}/logs/latestRequest
Get the latest logs for an Agent identified by address
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
Responses
An array of JSON objects containing the timestamp and log entry for a specific Agent identified by its address.
Delete the latest logs for an Agent
Endpoint:DELETE
/v1/hosting/agents/{address}/logsRequest
Delete the latest logs for an Agent identified by address.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
Responses
If successful, the response will be the deletion of the specified Agent's logs.
Get current Agent usage
Endpoint:GET
/v1/hosting/usage/currentRequest
Get data about the usage of the currently selected Agent.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
Responses
An array of JSON objects with properties containing data about the usage of the selected Agent.
Get Agent usage for a specific year and month
Endpoint:GET
/v1/hosting/usage/{year}/{month}Request
Get data about the usage of the currently selected Agent for a selected year and month.
- Name
address
- Type
- string
- Required
- required
- Description
- The unique address of the agent for which the hosting usage data is requested.
- Name
month
- Type
- string
- Required
- required
- Description
- The month for which the hosting usage data is requested.
- Name
year
- Type
- string
- Required
- required
- Description
- The year for which the hosting usage data is requested.
Responses
An array of JSON objects for properties containing data about the usage of the selected Agent for a selected year and month.
Get Current Agent Usage by Address
Endpoint:GET
/v1/hosting/usage/agents/{address}/currentRequest
Get data about the usage for an Agent identified by its address.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
Responses
An array of JSON objects for properties containing information about the current usage for a specified Agent identified by its address.
Get current Agent usage selected by address year and month
Endpoint:GET
/v1/hosting/usage/agents/{address}/{year}/{month}Request
Get data about the usage for an Agent, identified by its address, for a specific year and month.
- Name
address
- Type
- string
- Required
- required
- Description
- The address of the agent. This is also the current public key of the agent.
- Name
month
- Type
- string
- Required
- required
- Description
- The year for which the current agent usage data is requested.
- Name
year
- Type
- string
- Required
- required
- Description
- The month for which the current agent hosting usage data is requested.
Responses
An array of JSON objects for properties of the specified Agent identified by its address for a specific year and month.