Skip to main content

CLI Reference

Complete reference for the Aegis Memory command-line interface.

Installation

pip install aegis-memory

Configuration

aegis config init

Interactive first-run setup.
aegis config init          # Interactive
aegis config init -y       # Use defaults (non-interactive)

aegis config show

Display current configuration.
aegis config show

aegis config set

Set a configuration value.
aegis config set output.format json
aegis config set profiles.local.api_url http://localhost:8000

Server Status

aegis status

Check server health and connection.
aegis status           # Pretty output
aegis status -j        # JSON output
aegis status -q        # Quiet (exit code only)
Exit codes:
  • 0 - Server healthy
  • 1 - Server unhealthy
  • 2 - Connection failed

aegis stats

Show namespace statistics.
aegis stats                    # Default namespace
aegis stats -n production      # Specific namespace
aegis stats -a executor        # Filter by agent

Memory Operations

aegis add

Add a memory.
aegis add "Memory content"                    # Basic
aegis add "Strategy" -t strategy -s global    # Strategy with global scope
aegis add -f ./insight.txt -t reflection      # From file
echo "Piped" | aegis add                      # From stdin
Options:
FlagShortDescription
--agent-aAgent ID
--user-uUser ID
--namespace-nNamespace
--scope-sScope: agent-private, agent-shared, global
--type-tType: standard, strategy, reflection
--share-withAgent IDs to share with
--metadata-mJSON metadata

aegis query

Semantic search for memories.
aegis query "search text"                     # Basic search
aegis query "patterns" -t strategy -k 5       # Filter by type
aegis query "task" -x planner,coordinator     # Cross-agent query
aegis query "test" --ids-only                 # IDs only for scripting
Options:
FlagShortDescription
--top-k-kNumber of results (default: 10)
--min-scoreMinimum similarity score
--type-tFilter by memory type
--cross-agent-xQuery across these agents
--fullShow full content

aegis get

Get a single memory by ID.
aegis get 7f3a8b2c1d4e                        # Pretty output
aegis get 7f3a8b2c1d4e -j                     # JSON output
aegis get 7f3a8b2c1d4e --content-only         # Content only

aegis delete

Delete a memory.
aegis delete 7f3a8b2c1d4e                     # With confirmation
aegis delete 7f3a8b2c1d4e -f                  # Force (no confirmation)

Voting

aegis vote

Vote on memory usefulness.
aegis vote <id> helpful                       # Vote helpful
aegis vote <id> harmful -c "Caused bug"       # Vote harmful with context
Options:
FlagShortDescription
--voter-vVoting agent ID
--context-cWhy this vote
--task-tRelated task/feature ID

Playbook

aegis playbook

Query proven strategies and reflections.
aegis playbook "error handling"               # Search playbook
aegis playbook "API" -t strategy -e 0.5       # Only high-rated strategies
Options:
FlagShortDescription
--top-k-kNumber of results (default: 20)
--min-effectiveness-eMinimum effectiveness score
--type-tstrategy, reflection, or both

Session Progress

aegis progress create

Create a new session.
aegis progress create build-api -a executor
aegis progress create feature-x -s "Building feature X" -t 5

aegis progress update

Update session progress.
aegis progress update build-api -c auth -c routing
aegis progress update build-api -i api-client
aegis progress update build-api -b "payments:Waiting for API keys"

aegis progress show

Show session details.
aegis progress show build-dashboard

Feature Tracking

aegis features create

Create a feature.
aegis features create user-auth \
    -d "User authentication with JWT" \
    -c auth \
    -t "Can login" \
    -t "Can logout"

aegis features verify

Mark feature as passing.
aegis features verify user-auth --by qa-agent

aegis features fail

Mark feature as failed.
aegis features fail 2fa-totp -r "TOTP validation fails"

Data Management

aegis export

Export memories to file.
aegis export > backup.jsonl                   # To stdout
aegis export -o backup.jsonl                  # To file
aegis export -n prod -f json -o prod.json     # JSON format

aegis import

Import memories from file.
aegis import backup.jsonl                     # Import from file
aegis import backup.jsonl -n staging          # Override namespace
aegis import backup.jsonl --dry-run           # Validate only

Environment Variables

VariableDescription
AEGIS_API_KEYAPI key (highest priority)
AEGIS_API_URLServer URL
AEGIS_PROFILEActive profile
AEGIS_NAMESPACEDefault namespace
AEGIS_AGENT_IDDefault agent ID

Exit Codes

CodeMeaning
0Success
1General error
2Connection error
3Authentication error
4Not found
5Validation error