Python SDK and CLI for the Celesto AI platform.
Project description
Celesto
Celesto gives AI agents their own isolated computer. Your agent can run commands, create files, and use tools without touching your machine.
pip install celesto # Python SDK + CLI
npm install @celestoai/sdk # JavaScript/TypeScript SDK
Quick Start
Python:
from celesto import Celesto
client = Celesto()
computer = client.computers.create(template_id="coding-agent")
print(f"Computer ready: {computer['name']}")
result = client.computers.exec(computer["id"], "uname -a")
print(result["stdout"])
client.computers.delete(computer["id"])
JavaScript / TypeScript:
import { Celesto } from "@celestoai/sdk";
const celesto = new Celesto({ token: process.env.CELESTO_API_KEY });
const computer = await celesto.computers.create({ templateId: "coding-agent" });
console.log(`Computer ready: ${computer.name}`);
const result = await celesto.computers.exec(computer.id, "uname -a");
console.log(result.stdout);
await celesto.computers.delete(computer.id);
CLI:
export CELESTO_API_KEY="your-api-key"
celesto computer create --template coding-agent
celesto computer run einstein "ls -la"
celesto computer ssh einstein # interactive shell
celesto computer delete einstein
Why Celesto?
- Fast -- computers boot in seconds
- Isolated -- each computer is separated from your machine
- Simple -- three API calls: create, exec, delete
- Built for agents -- give your AI a computer it can safely use
Installation
pip install celesto
Requires Python 3.10+.
Authentication
Get your API key from celesto.ai under Settings > Security.
For CLI commands, save it once:
celesto auth login
The CLI stores the key in your operating system's secure credential store and uses it for future commands.
export CELESTO_API_KEY="your-api-key"
Or pass it directly:
client = Celesto(api_key="your-api-key")
OpenAI Agents SDK sandboxes
OpenAI agents can use Celesto as their working computer. This lets the agent read files, run commands, and create artifacts in an isolated place.
OpenAI calls this a SandboxAgent: an agent that has a separate computer for
its work. Celesto supports two options:
- Hosted Celesto computers for cloud runs.
- Local SmolVM sandboxes for work on your own machine.
pip install "celesto[openai-agents]"
from agents import Runner
from agents.run import RunConfig
from agents.sandbox import SandboxAgent, SandboxRunConfig
from celesto.integrations.openai_agents import (
CelestoSandboxClient,
CelestoSandboxClientOptions,
)
agent = SandboxAgent(
name="Workspace analyst",
instructions="Inspect the sandbox workspace before answering.",
)
client = CelestoSandboxClient()
session = await client.create(
options=CelestoSandboxClientOptions(template_id="coding-agent")
)
try:
async with session:
result = await Runner.run(
agent,
"Run `uname -a` in the sandbox and summarize the result.",
run_config=RunConfig(sandbox=SandboxRunConfig(session=session)),
)
print(result.final_output)
finally:
await client.delete(session)
Use SmolVMSandboxClient and SmolVMSandboxClientOptions from the same module
when you want the same agent flow to run on a local SmolVM sandbox.
Computers API
Templates are ready-made computer setups. Choose one when you want a computer that already has the tools your agent needs.
Create
computer = client.computers.create(
template_id="coding-agent",
cpus=2,
memory=2048,
disk_size_mb=15360,
)
print(computer["name"]) # e.g., "einstein"
Omit CPU, memory, or disk fields to use the selected template defaults.
templates = client.computers.list_templates()
for template in templates:
print(template["id"], template["default_ram_mb"])
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 auth login |
Save your API key |
celesto auth status |
Check whether an API key is saved |
celesto auth logout |
Remove your saved API key |
celesto computer create [--template ID] [--cpus N] [--memory MB] [--disk-size-mb MB] |
Create a computer |
celesto computer templates |
List computer templates |
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 templates --json
celesto computer create --template coding-agent --disk-size-mb 15360 --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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file celesto-0.0.5.tar.gz.
File metadata
- Download URL: celesto-0.0.5.tar.gz
- Upload date:
- Size: 77.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d62ed30986ad16bf9aedebd708320e4d496eac21b3c2631af01b78935d41af87
|
|
| MD5 |
9bb9dbb85df8bcc4e05fe76604b00b45
|
|
| BLAKE2b-256 |
072ca136a91d436b6e0b6536b4086e0d1074b888a910fae8ee9cb97fd385809c
|
Provenance
The following attestation bundles were made for celesto-0.0.5.tar.gz:
Publisher:
release.yml on CelestoAI/sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
celesto-0.0.5.tar.gz -
Subject digest:
d62ed30986ad16bf9aedebd708320e4d496eac21b3c2631af01b78935d41af87 - Sigstore transparency entry: 1747215103
- Sigstore integration time:
-
Permalink:
CelestoAI/sdk@67ede99d0c67e4928ef40c6117b7cd26c4465988 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/CelestoAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@67ede99d0c67e4928ef40c6117b7cd26c4465988 -
Trigger Event:
push
-
Statement type:
File details
Details for the file celesto-0.0.5-py3-none-any.whl.
File metadata
- Download URL: celesto-0.0.5-py3-none-any.whl
- Upload date:
- Size: 38.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8732535d9dbc2403d65fee391e795c8a4b4bb56e54b4f310b8e48f9da4d15060
|
|
| MD5 |
4d8d542e3e5af88858a9e6fe9cd9eeb6
|
|
| BLAKE2b-256 |
e4685cce70d853de0c7477300d5aa8e0794b9218f17f9e977ad715e3038eb515
|
Provenance
The following attestation bundles were made for celesto-0.0.5-py3-none-any.whl:
Publisher:
release.yml on CelestoAI/sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
celesto-0.0.5-py3-none-any.whl -
Subject digest:
8732535d9dbc2403d65fee391e795c8a4b4bb56e54b4f310b8e48f9da4d15060 - Sigstore transparency entry: 1747215293
- Sigstore integration time:
-
Permalink:
CelestoAI/sdk@67ede99d0c67e4928ef40c6117b7cd26c4465988 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/CelestoAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@67ede99d0c67e4928ef40c6117b7cd26c4465988 -
Trigger Event:
push
-
Statement type: