> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.astropods.com/llms.txt.
> For full documentation content, see https://docs.astropods.com/llms-full.txt.

# Managing your agents

Once an agent is deployed it runs continuously until you pause or delete it. Use the `ast agent` commands to manage it over its lifetime.

## Inspect

List all agents in the active account:

```bash
ast agent list
```

Get full details for a specific agent:

```bash
ast agent get <name>
```

Agent names are the display names set at deploy time. If two deployments share a name, pass `--id <deployment-id>` on commands that support it to target one unambiguously.

## Observe

Fetch recent logs from the agent container:

```bash
ast agent logs <name> --container app
```

Stream logs continuously as they arrive:

```bash
ast agent logs <name> --container app --tail
```

To fetch logs from the messaging sidecar instead:

```bash
ast agent logs <name> --container messaging
```

## Control

Pause an agent to stop it from handling requests without deleting it:

```bash
ast agent pause <name>
```

Resume it when ready:

```bash
ast agent resume <name>
```

Restart the agent process in-place (useful after a transient failure):

```bash
ast agent restart <name> --component agent
```

## Update

Redeploy an existing agent in-place (without changing its deployment ID or URL) to pick up new variables or a different build:

```bash
ast agent redeploy <name> --var ANTHROPIC_API_KEY=@ANTHROPIC_API_KEY
```

This is the right command after rotating a secret or pushing a new blueprint build. It accepts the same `--var`, `--vars-file`, `--adapter`, and `--build` flags as `ast blueprint deploy`. If `--adapter` is omitted, the adapter defaults to `web`; pass it explicitly to preserve or change a non-web setup.

## Delete

```bash
ast agent delete <name>
```

You will be prompted to confirm. Pass `--confirm <name>` to skip the prompt in scripts.