Skip to main content

Overview

The agents sub-client manages the lifecycle of AI agents in your Grantex organization. Each agent receives a unique decentralized identifier (DID) and can request scoped grants from users.

agents.register()

Register a new agent with the Grantex service.

Parameters

string
required
Human-readable name for the agent.
string
required
A description of what the agent does.
string[]
required
The maximum set of scopes this agent can request. Authorization requests must use a subset of these scopes.

Response: Agent

string
Unique agent identifier.
string
Decentralized identifier (DID) for the agent.
string
The agent’s display name.
string
The agent’s description.
string[]
The agent’s registered scopes.
string
Agent status: 'active', 'suspended', or 'revoked'.
string
The developer organization that owns this agent.
string
ISO 8601 creation timestamp.
string
ISO 8601 last-updated timestamp.

agents.get()

Retrieve a single agent by its ID.

Parameters

string
required
The agent ID to retrieve.

Response

Returns an Agent object.

agents.list()

List all agents in your organization.

Response: ListAgentsResponse

Agent[]
Array of agent objects.
number
Total number of agents.
number
Current page number.
number
Number of agents per page.

agents.update()

Update an existing agent’s name, description, or scopes.

Parameters

string
required
The agent ID to update.
string
New display name.
string
New description.
string[]
New set of registered scopes.

Response

Returns the updated Agent object.

agents.delete()

Delete an agent. This revokes the agent’s DID and all active grants.

Parameters

string
required
The agent ID to delete.

Response

Returns void.
Last modified on July 11, 2026