mayros session
Manage session state with checkpoints, forks, and rewinds. Session state is backed by AIngle Cortex for persistence.
Global options
--cortex-host <host>— Cortex host (default:127.0.0.1or from config)--cortex-port <port>— Cortex port (default:8080or from config)--cortex-token <token>— Cortex auth token (or setCORTEX_AUTH_TOKEN)
Subcommands
session checkpoint
Create a checkpoint of the current session state. Checkpoints capture the event count and last event ID at that point in time.
Options:
| Flag | Description |
|---|---|
--session <key> | Session key (default: default) |
--format <fmt> | Output: terminal, json (default: terminal) |
session fork
Fork the current session into a new independent session. The new session starts with a copy of all events up to the fork point.
Options:
| Flag | Description |
|---|---|
--session <key> | Source session key (default: default) |
--name <newKey> | Name for the forked session (auto-generated if omitted) |
--format <fmt> | Output: terminal, json (default: terminal) |
session rewind
Rewind a session to a specific point in time. Events after the timestamp are removed; events before are retained.
Options:
| Flag | Description |
|---|---|
--to <timestamp> | (required) ISO 8601 timestamp to rewind to |
--session <key> | Session key (default: default) |
--format <fmt> | Output: terminal, json (default: terminal) |
session forks
List fork and rewind history showing session relationships, statuses, and checkpoint counts.
Options:
| Flag | Description |
|---|---|
--session <key> | Filter by session key |
--format <fmt> | Output: terminal, json (default: terminal) |
Examples
bashmayros session checkpoint mayros session checkpoint --session agent:ops:main mayros session fork --name experiment-1 mayros session fork --session agent:ops:main --name ops-backup mayros session rewind --to 2025-01-15T10:30:00Z mayros session rewind --to 2025-01-15T10:30:00Z --session experiment-1 mayros session forks mayros session forks --session agent:main:default --format json