> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grantex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents

> Register and manage AI agents

Go SDK `v0.2.0` maps `agentId` to `Agent.ID`, omits unset registration fields,
and supports status changes and explicit scope clearing.

## Register

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

## Get

```go theme={null}
agent, err := client.Agents.Get(ctx, "agent-id")
```

## List

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

## Update

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

## Delete

```go theme={null}
err := client.Agents.Delete(ctx, "agent-id")
```

## Types

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

## Ownership

Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: [sanjeev@orchestrum.in](mailto:sanjeev@orchestrum.in) or [mishra.sanjeev@gmail.com](mailto:mishra.sanjeev@gmail.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.