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

# Session Commands

> List, inspect, compact, reset, rename, and remove agent sessions.

## Session Command Group

```bash theme={null}
opengoat session <command> [options]
```

Defaults:

* agent id: `config.defaultAgent` / `OPENGOAT_DEFAULT_AGENT` / `goat`
* session: `main`

## Commands

```bash theme={null}
opengoat session list [--agent <id>] [--active-minutes <n>] [--json]
opengoat session history [--agent <id>] [--session <key|id>] [--limit <n>] [--include-compaction] [--json]
opengoat session reset [--agent <id>] [--session <key|id>]
opengoat session compact [--agent <id>] [--session <key|id>]
opengoat session rename --title <text> [--agent <id>] [--session <key|id>] [--json]
opengoat session remove [--agent <id>] [--session <key|id>] [--json]
```

## Typical Sequence

```bash theme={null}
opengoat session list --agent cto
opengoat session history --agent cto --session planning --limit 50
opengoat session compact --agent cto --session planning
```
