ash sessions
Manage conversation history and sessions.
Usage
uv run ash sessions <action> [OPTIONS]Actions
| Action | Description |
|---|---|
list | List recent sessions |
view | View a session with full conversation |
search | Search messages across sessions |
clear | Clear all session history |
Options
| Option | Description |
|---|---|
--query, -q | Search query or session key |
--limit, -n | Maximum entries to show (default: 20) |
--force, -f | Skip confirmation prompts |
--verbose, -v | Show full tool outputs (for view) |
list
List recent sessions:
uv run ash sessions listOptions:
| Option | Default | Description |
|---|---|---|
--limit, -n | 20 | Maximum sessions to show |
Output:
┌────────────────────┬──────────┬───────────────┬──────────┬──────────────────┐│ Key │ Provider │ Chat ID │ Messages │ Created │├────────────────────┼──────────┼───────────────┼──────────┼──────────────────┤│ telegram_-542... │ telegram │ -54212345 │ 24 │ 2024-01-15 10:30 ││ cli_default │ cli │ default │ 156 │ 2024-01-14 09:15 │└────────────────────┴──────────┴───────────────┴──────────┴──────────────────┘view
View a session with full conversation and tool calls:
uv run ash sessions view -q <session-key>The session key can be a partial match:
# View Telegram session (fuzzy match)uv run ash sessions view -q telegram_-542
# Show full tool outputsuv run ash sessions view -q telegram_-542 -vOutput shows:
- Messages with timestamps
- Tool calls with their results
- Context compaction events
- User/assistant roles with formatting
search
Search messages across all sessions:
uv run ash sessions search -q "docker"Options:
| Option | Description |
|---|---|
--query, -q | Search query (required) |
--limit, -n | Maximum results (default: 20) |
Output:
┌───────────────┬──────────────────┬───────────┬────────────────────────────────┐│ Session │ Time │ Role │ Content │├───────────────┼──────────────────┼───────────┼────────────────────────────────┤│ telegram_-542 │ 2024-01-15 10:30 │ user │ How do I run docker commands...││ cli_default │ 2024-01-14 09:15 │ assistant │ To build a docker image... │└───────────────┴──────────────────┴───────────┴────────────────────────────────┘clear
Clear all session history:
uv run ash sessions clearForce clear without confirmation:
uv run ash sessions clear --forceStorage
Sessions are stored as JSONL files in ~/.ash/sessions/:
~/.ash/sessions/├── telegram_-54212345/│ ├── context.jsonl # Full LLM context (messages, tool calls, results)│ └── history.jsonl # Human-readable conversation only├── cli_default/│ ├── context.jsonl│ └── history.jsonl└── ...Each session directory contains:
context.jsonl- Full context including tool calls, results, and compaction eventshistory.jsonl- Just the messages for easy reading
Examples
View recent sessions:
uv run ash sessions list --limit 5Find conversations about Python:
uv run ash sessions search -q "python"View a specific session:
uv run ash sessions view -q cli_defaultSee Also
- Memory - Context and storage settings