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

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