Skip to main content
The praisonai managed command group provides terminal-based management of Anthropic-hosted sessions, agents, and environments.
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)

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:

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