openclaw sessions
Manage conversation sessions.
Usage
bash
openclaw sessions <action> [options]Actions
| Action | Description |
|---|---|
list | List all sessions |
show | Show session details |
clear | Clear sessions |
export | Export session data |
Examples
bash
# List all sessions
openclaw sessions list
# Show specific session
openclaw sessions show <session-id>
# Clear old sessions
openclaw sessions clear --older-than 7d
# Clear all sessions
openclaw sessions clear --all
# Export session
openclaw sessions export <session-id> > session.jsonOptions
| Option | Description |
|---|---|
--older-than | Filter by age (e.g., 7d, 24h) |
--channel | Filter by channel |
--json | Output as JSON |
Session Management
Sessions store conversation context. Managing them helps with:
- Memory usage
- Privacy
- Performance
bash
# View session count
openclaw sessions list --count
# Clear sessions for specific channel
openclaw sessions clear --channel whatsapp
# Export for backup
openclaw sessions export --all > backup.json