Skip to main content

Python SDK and CLI for the Celesto AI platform.

Project description

Celesto

PyPI version Python License

Sandboxed cloud computers for AI agents. Spin up isolated computers in seconds, run workflows/commands or long running agents -- all from Python or the CLI.

pip install celesto

Quick Start

from celesto.sdk import CelestoSDK

with CelestoSDK() as client:
    computer = client.computers.create(cpus=2, memory=2048)
    print(f"Computer ready: {computer['name']}")

    result = client.computers.exec(computer["id"], "uname -a")
    print(result["stdout"])

    client.computers.delete(computer["id"])

Or from the command line:

export CELESTO_API_KEY="your-api-key"

celesto computer create --cpus 2 --memory 2048
celesto computer run einstein "ls -la"
celesto computer ssh einstein       # interactive shell
celesto computer delete einstein

Why Celesto?

  • Fast -- computers boot in seconds via Firecracker microVMs
  • Isolated -- every sandbox is a real VM, not a container
  • Simple -- three API calls: create, exec, delete
  • Built for agents -- give your AI full computer access without risking your host

Installation

pip install celesto

Requires Python 3.10+.

Authentication

Get your API key from celesto.ai under Settings > Security.

export CELESTO_API_KEY="your-api-key"

Or pass it directly:

client = CelestoSDK(api_key="your-api-key")

Computers API

Create

computer = client.computers.create(cpus=2, memory=2048)
print(computer["name"])  # e.g., "einstein"

Execute commands

result = client.computers.exec(computer["id"], "apt-get update && apt-get install -y curl")
print(result["stdout"])
print(result["exit_code"])

Lifecycle

client.computers.stop(computer_id)
client.computers.start(computer_id)
client.computers.delete(computer_id)

List

result = client.computers.list()
for vm in result["computers"]:
    print(f"{vm['name']}: {vm['status']}")

CLI

Command Description
celesto computer create [--cpus N] [--memory MB] Create a computer
celesto computer list List all computers
celesto computer run <name> "command" Execute a command
celesto computer ssh <name> Interactive shell
celesto computer stop <name> Stop a computer
celesto computer start <name> Start a stopped computer
celesto computer delete <name> [--force] Delete a computer

JSON output

All commands support --json for machine-readable output:

celesto computer list --json
celesto computer create --cpus 2 --memory 2048 --json
celesto computer run einstein "uname -a" --json

Error Handling

from celesto.sdk.exceptions import (
    CelestoAuthenticationError,  # 401/403
    CelestoNotFoundError,        # 404
    CelestoValidationError,      # 400/422
    CelestoRateLimitError,       # 429 -- has retry_after attribute
    CelestoServerError,          # 5xx
    CelestoNetworkError,         # connection failures
)

Links

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celesto-0.0.3.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

celesto-0.0.3-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file celesto-0.0.3.tar.gz.

File metadata

  • Download URL: celesto-0.0.3.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for celesto-0.0.3.tar.gz
Algorithm Hash digest
SHA256 614c4f1a8ce139b9bd1fa9a86311da864578461b42abbdf5003bffd28d4bfca5
MD5 bdb48ceb7749c90d37f8971759eb4202
BLAKE2b-256 92da31da8d190e55091300af84446373e59f530cec523bf9a584bc05754ff761

See more details on using hashes here.

Provenance

The following attestation bundles were made for celesto-0.0.3.tar.gz:

Publisher: release.yml on CelestoAI/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file celesto-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: celesto-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for celesto-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0840b91b09a31cc6acb322d4eea8ac068fb30cc6c65259e243f196a4c9a252d4
MD5 934e17bf39eaafc53bfab159ffc1176e
BLAKE2b-256 3712a6bc48b9c6031bd4cd164fe95e5a676c161ad5f08ef35bcf3f6162638bee

See more details on using hashes here.

Provenance

The following attestation bundles were made for celesto-0.0.3-py3-none-any.whl:

Publisher: release.yml on CelestoAI/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page