Skip to main content

Agent Commands

Manage agents using the MEMANTO CLI.

memanto agent create

Create a new agent.
memanto agent create NAME [OPTIONS]
Arguments:
  • NAME - Unique agent identifier (required)
Options:
  • -d, --description TEXT - Optional description
Examples: Simple creation:
memanto agent create customer-support
With description:
memanto agent create customer-support --description "Handles customer inquiries"
Output:
✓ Agent 'customer-support' created successfully
Agent ID:   customer-support
Namespace:  memanto_agent_customer-support
Created At: 2025-03-30 16:30:00 UTC
Notes:
  • Agent names must be unique
  • Use lowercase, hyphens, underscores only
  • No spaces in agent names

memanto agent list

List all created agents.
memanto agent list [OPTIONS]
Options:
  • --limit INTEGER - Max agents to show (default: 10)
  • --sort TEXT - Sort by: created, name, recent (default: created)
Examples: List all agents:
memanto agent list
Limit to 5:
memanto agent list --limit 5
Sort by most recently active:
memanto agent list --sort recent
Output:
Available Agents

1. customer-support
   Created:    2025-03-20 10:30:00 UTC
   Status:     Inactive
   Memories:   42
   Last Used:  2025-03-28 14:22:00 UTC

2. project-manager
   Created:    2025-03-15 09:15:00 UTC
   Status:     Inactive
   Memories:   18
   Last Used:  2025-03-25 11:45:00 UTC

3. billing-bot
   Created:    2025-03-10 08:00:00 UTC
   Status:     Inactive
   Memories:   7
   Last Used:  2025-03-22 16:30:00 UTC

memanto agent activate

Start a new session for an agent. Required before storing/recalling memories.
memanto agent activate NAME [OPTIONS]
Arguments:
  • NAME - Agent name (required)
Options:
  • --extend-hours INTEGER - Extend session (default: 6)
Examples: Activate with default 6-hour session:
memanto agent activate customer-support
Activate and extend immediately:
memanto agent activate customer-support --extend-hours 12
Output:
✓ Session activated for agent 'customer-support'
Session ID:     session_abc123xyz
Session Token:  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Created At:     2025-03-30 16:30:00 UTC
Expires At:     2025-03-31 22:30:00 UTC
Expires In:     6h 0m
Notes:
  • Session token saved automatically
  • Only one active session per agent
  • Session lasts 6 hours by default
  • Can be extended multiple times

memanto agent deactivate

End the current session for the active agent.
memanto agent deactivate [OPTIONS]
Options:
  • -f, --force - Skip confirmation
Examples: Deactivate with confirmation:
memanto agent deactivate
Force deactivate:
memanto agent deactivate --force
Output:
✓ Session deactivated for agent 'customer-support'
Session Summary:
- Duration: 2h 15m
- Memories Stored: 12
- Memories Retrieved: 8
Notes:
  • Memories persist after deactivation
  • Agent can be reactivated anytime
  • Requires new activation to use again

memanto agent bootstrap

View detailed metadata and statistics for an agent.
memanto agent bootstrap NAME [OPTIONS]
Arguments:
  • NAME - Agent name (required)
Options:
  • --limit INTEGER - Limit sample memories (default: 5)
Examples: View agent metadata:
memanto agent bootstrap customer-support
View with 10 sample memories:
memanto agent bootstrap customer-support --limit 10
Output:
Agent Metadata: customer-support

Created:        2025-03-25 10:30:00 UTC
Total Memories: 42

Memory Breakdown:
├── facts: 15
├── preferences: 8
├── events: 12
├── commitments: 4
└── decisions: 2

Last Session:   2025-03-30 14:22:00 UTC
Last Memory:    2025-03-30 14:45:00 UTC (event)

Sample Memories:
1. Customer Alice Johnson (fact)
   Created: 2025-03-25 10:45:00
   Confidence: 1.0

2. Alice prefers email contact (preference)
   Created: 2025-03-26 09:00:00
   Confidence: 0.95

3. Ticket #12345 resolved (event)
   Created: 2025-03-28 15:30:00
   Confidence: 1.0

(2 more memories...)
Notes:
  • Shows memory type breakdown
  • Displays sample memories
  • Indicates last activity
  • Useful for agent assessment

Workflow: Create and Activate

Complete workflow:
# 1. Create agent
memanto agent create my-support-bot
# Output: Agent created

# 2. List agents
memanto agent list
# Output: Shows your new agent

# 3. Activate session
memanto agent activate my-support-bot
# Output: Session token

# 4. Check bootstrap
memanto agent bootstrap my-support-bot
# Output: Agent metadata (0 memories initially)

# 5. Now ready to store memories
memanto remember "My first memory" --type fact

Multi-Agent Management

Create Multiple Agents

# Create agents for different purposes
memanto agent create customer-support
memanto agent create technical-support
memanto agent create billing-support

# List all
memanto agent list

Switch Between Agents

# Currently using: customer-support
memanto agent deactivate

# Switch to: technical-support
memanto agent activate technical-support

Monitor Agents

# Check all agents and their memory counts
memanto agent list --sort recent

# Get detailed stats on specific agent
memanto agent bootstrap customer-support

Tips & Best Practices

Naming Conventions

Use clear, descriptive names:
# Good
memanto agent create customer-support-v2
memanto agent create project-tracker
memanto agent create financial-advisor

# Avoid
memanto agent create bot1
memanto agent create test
memanto agent create xyz

Organization Strategy

# By function
memanto agent create support-agent
memanto agent create sales-agent
memanto agent create technical-agent

# By environment
memanto agent create customer-support-prod
memanto agent create customer-support-staging
memanto agent create customer-support-dev

Regular Assessment

# Weekly check
memanto agent list --limit 20

# Detailed review of active agent
memanto agent bootstrap $(memanto status | grep "Active Agent")

Troubleshooting

”Agent not found"

# List to find correct name
memanto agent list

# Verify spelling
memanto agent activate correct-name

"Session already active"

# Deactivate current session first
memanto agent deactivate

# Then activate new agent
memanto agent activate other-agent

"No memories” after creating agent

This is normal—agents start with zero memories. Store some:
memanto remember "First memory" --type fact

Next Steps