praisonai managed command group lists and reclaims managed sandboxes across every provider (docker, e2b, modal, daytona, flyio, tenki) and manages Anthropic-hosted sessions, agents, and environments from the terminal.
praisonai managed commands to create, inspect, and tear down hosted agents and sessions from the terminal.
Quick Start
1
Set API Key
Export your Anthropic API key:
2
List Sessions
View sessions for an agent:
3
Delete with Confirmation
Clean up resources safely:
How It Works
Commands
Sessions
Manage Anthropic-hosted agent sessions:Agents
Manage your Anthropic-hosted agents:Environments
Manage sandbox environments for code execution:--packages: Comma-separated pip packages (whitespace is trimmed, empty entries filtered)--networking: Eitherfullorlimited(case-sensitive)
Sandbox Lifecycle: ps / stop
List and reclaim running agent sandboxes across every provider.
Sandboxes normally self-destruct when a run ends. A crashed or killed run leaves one behind, and
ps / stop are the way to see and reclaim it.
- Providers that are not installed or not configured (no E2B key, Docker daemon down, etc.) are skipped silently — absence of credentials is a normal state, not an error.
- An explicit
--provider foofor an uninstalled or unknown provider is surfaced as an error (exit code 1) — you asked for it, so silence would mislead. - Available providers whose lookup fails are surfaced under
errors:in the JSON output and printed at the bottom of the text output; the exit code is 1 in that case, sops/stopnever report a clean sweep when some providers could not be queried. - Docker containers are discovered cross-process via the
praisonai=managedlabel andpraisonai_<id>naming convention, so containers started by an earlier CLI or a crashed script are still visible from a fresh CLI invocation. psandstopscandocker,e2b,modal,daytona,flyio, andtenki.localis excluded — it runs on this machine, so there is nothing to reclaim.- Uptime is formatted as
Nsunder a minute,Nmunder an hour,NhMMmunder a day, andNdHHhbeyond that.
IDs Helper
Save and restore Anthropic-assigned resource IDs locally: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:Recover Stray Sandboxes
Find sandboxes left behind by a crashed run and reclaim them: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
Hosted Agent
Python SDK for Anthropic-hosted agents
HostedAgent + DB persistence
Library-level persistence with database backends
Sessions
Advanced session management concepts
Shared Sandbox
Share one sandbox across a team or workflow with
run_on=
