v0.2.0 maps agentId to Agent.ID, omits unset registration fields,
and supports status changes and explicit scope clearing.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Register and manage AI agents
v0.2.0 maps agentId to Agent.ID, omits unset registration fields,
and supports status changes and explicit scope clearing.
agent, err := client.Agents.Register(ctx, grantex.RegisterAgentParams{
Name: "Email Assistant",
Description: "Reads and sends emails",
Scopes: []string{"read:email", "send:email"},
})
agent, err := client.Agents.Get(ctx, "agent-id")
result, err := client.Agents.List(ctx)
for _, agent := range result.Agents {
fmt.Printf("%s: %s (%s)\n", agent.ID, agent.Name, agent.Status)
}
name := "Updated Name"
agent, err := client.Agents.Update(ctx, "agent-id", grantex.UpdateAgentParams{
Name: &name,
})
err := client.Agents.Delete(ctx, "agent-id")
Agent| Field | Type | Description |
|---|---|---|
ID | string | Agent ID |
DID | string | Decentralized identifier |
Name | string | Display name |
Description | string | Agent description |
Scopes | []string | Registered scopes |
Status | string | "active", "suspended", "revoked" |
DeveloperID | string | Owner developer |
CreatedAt | string | ISO 8601 timestamp |
UpdatedAt | string | ISO 8601 timestamp |