Thanks to visit codestin.com
Credit goes to praison.ai

Skip to main content
The 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.
The user runs 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:
Environment Update Options:
  • --packages: Comma-separated pip packages (whitespace is trimmed, empty entries filtered)
  • --networking: Either full or limited (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.
Behaviour:
  • 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 foo for 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, so ps / stop never report a clean sweep when some providers could not be queried.
  • Docker containers are discovered cross-process via the praisonai=managed label and praisonai_<id> naming convention, so containers started by an earlier CLI or a crashed script are still visible from a fresh CLI invocation.
  • ps and stop scan docker, e2b, modal, daytona, flyio, and tenki. local is excluded — it runs on this machine, so there is nothing to reclaim.
  • Uptime is formatted as Ns under a minute, Nm under an hour, NhMMm under a day, and NdHHh beyond that.

IDs Helper

Save and restore Anthropic-assigned resource IDs locally:

Choosing a Subcommand


Safety: Confirmation Prompts

All delete commands prompt for confirmation unless --yes is provided:
Typing anything non-affirmative prints Deletion cancelled. and exits with code 0.

Authentication

The CLI requires the anthropic Python package and one of these environment variables:
Installation:
Without the package or API key, commands exit with code 1 and an error message.

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

  • Use --yes in 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
  • Check exit codes in scripts (0 = success, 1 = error)
  • Handle API timeouts with retry logic
  • Verify API key is set before running commands
  • Use --limit to prevent large resource listings
  • Test package installations in development environments first
  • Use --networking limited for security-sensitive workloads
  • Keep package lists minimal to reduce startup time
  • Update packages gradually to identify compatibility issues
  • Use sessions resume instead of creating new sessions
  • Save session IDs for important conversations
  • Monitor session usage with sessions get
  • Implement session rotation for long-running applications

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=