Skip to main content

Register

agent, err := client.Agents.Register(ctx, grantex.RegisterAgentParams{
    Name:        "Email Assistant",
    Description: "Reads and sends emails",
    Scopes:      []string{"read:email", "send:email"},
})

Get

agent, err := client.Agents.Get(ctx, "agent-id")

List

result, err := client.Agents.List(ctx)
for _, agent := range result.Agents {
    fmt.Printf("%s: %s (%s)\n", agent.ID, agent.Name, agent.Status)
}

Update

name := "Updated Name"
agent, err := client.Agents.Update(ctx, "agent-id", grantex.UpdateAgentParams{
    Name: &name,
})

Delete

err := client.Agents.Delete(ctx, "agent-id")

Types

Agent

FieldTypeDescription
IDstringAgent ID
DIDstringDecentralized identifier
NamestringDisplay name
DescriptionstringAgent description
Scopes[]stringRegistered scopes
Statusstring"active", "suspended", "revoked"
DeveloperIDstringOwner developer
CreatedAtstringISO 8601 timestamp
UpdatedAtstringISO 8601 timestamp