praisonai managed command group provides terminal-based management of Anthropic-hosted sessions, agents, and environments.
Quick Start
How It Works
Commands
Sessions
Manage Anthropic-hosted agent sessions:| Command | Purpose | Example |
|---|---|---|
sessions list <agent_id> | List sessions for an agent | praisonai managed sessions list agent_01AbCdEf |
sessions get <session_id> | Get session details and usage | praisonai managed sessions get sesn_01AbCdEf |
sessions resume <session_id> "<prompt>" | Resume session with new prompt | praisonai managed sessions resume sesn_01AbCdEf "Continue the task" |
sessions delete <session_id> | Delete a session (with confirmation) | praisonai managed sessions delete sesn_01AbCdEf --yes |
Agents
Manage your Anthropic-hosted agents:| Command | Purpose | Example |
|---|---|---|
agents list | List all your agents | praisonai managed agents list |
agents get <agent_id> | Get agent configuration | praisonai managed agents get agent_01AbCdEf |
agents create | Create new agent (via Python SDK) | See ManagedAgent docs |
agents update <agent_id> | Update agent name, system, or model | praisonai managed agents update agent_01AbCdEf --name "New Name" --version 1 |
agents delete <agent_id> | Delete an agent (with confirmation) | praisonai managed agents delete agent_01AbCdEf --yes |
Environments
Manage sandbox environments for code execution:| Command | Purpose | Example |
|---|---|---|
envs list | List your environments | praisonai managed envs list |
envs get <env_id> | Get environment details | praisonai managed envs get env_01AbCdEf |
envs update <env_id> | Update packages or networking | praisonai managed envs update env_01AbCdEf --packages "pandas,numpy" --networking full |
envs delete <env_id> | Delete an environment (with confirmation) | praisonai managed envs delete env_01AbCdEf --yes |
--packages: Comma-separated pip packages (whitespace is trimmed, empty entries filtered)--networking: Eitherfullorlimited(case-sensitive)
IDs Helper
Save and restore Anthropic-assigned resource IDs locally:| Command | Purpose | Example |
|---|---|---|
ids save <agent_id> <env_id> <session_id> | Save IDs to JSON file | praisonai managed ids save agent_01... env_01... sesn_01... --version 1 |
ids restore "<prompt>" | Restore IDs and run prompt | praisonai managed ids restore "Continue previous task" |
ids show | Display saved IDs | praisonai managed ids show |
Choosing a Subcommand
Safety: Confirmation Prompts
Authentication
The CLI requires theanthropic Python package and one of these environment variables:
Common Patterns
Cleanup Script
Remove old sessions and unused resources:Environment Setup
Install packages and configure networking:Session Backup
Save session state before major changes:Best Practices
Resource Management
Resource Management
- Use
--yesin scripts to avoid interactive prompts - Regularly clean up completed sessions to manage costs
- Save important session IDs before deleting resources
- Monitor environment status before making updates
Error Handling
Error Handling
- Check exit codes in scripts (0 = success, 1 = error)
- Handle API timeouts with retry logic
- Verify API key is set before running commands
- Use
--limitto prevent large resource listings
Environment Updates
Environment Updates
- Test package installations in development environments first
- Use
--networking limitedfor security-sensitive workloads - Keep package lists minimal to reduce startup time
- Update packages gradually to identify compatibility issues
Session Continuity
Session Continuity
- Use
sessions resumeinstead of creating new sessions - Save session IDs for important conversations
- Monitor session usage with
sessions get - Implement session rotation for long-running applications
Related
ManagedAgent + DB persistence (Python SDK)
Library-level persistence with database backends
Sessions
Advanced session management concepts

