from pathlib import Path
from celesto.sdk import CelestoSDK
# Initialize SDK
client = CelestoSDK(api_key="sk-your-api-key")
# === ToolHub Operations ===
# List available tools
tools = client.toolhub.list_tools()
print(f"Available tools: {len(tools['tools'])}")
# Execute weather tool
weather = client.toolhub.run_weather_tool("San Francisco")
print(f"Weather: {weather}")
# Execute Gmail tools (requires Google OAuth setup)
emails = client.toolhub.run_list_google_emails(limit=3)
print(f"Recent emails: {len(emails)}")
client.toolhub.run_send_google_email(
to="[email protected]",
subject="Hello from Agentor",
body="This email was sent via CelestoSDK"
)
# === Deployment Operations ===
# Deploy an agent
deployment = client.deployment.deploy(
folder=Path("./my-weather-agent"),
name="weather-agent-prod",
description="Production weather assistant",
envs={
"OPENAI_API_KEY": "sk-...",
"LOG_LEVEL": "INFO"
}
)
print(f"Deployment ID: {deployment['id']}")
print(f"Status: {deployment['status']}")
# List all deployments
all_deployments = client.deployment.list()
for dep in all_deployments:
print(f"{dep['name']}: {dep['status']} (created: {dep['created_at']})")