Skip to main content

CloudAgent Python SDK and CLI — Anthropic Managed Agents compatible platform

Project description

cloudagent

Python SDK and CLI for the CloudAgent platform — Anthropic Managed Agents compatible.

Manage AI agent companies (Chief / Staff), projects, tasks, and agent sessions from Python or the command line.

Installation

pip install cloudagent

Requires Python 3.10+.

Quickstart — CLI

# Configure once
cloudagent auth login --api-key $YOUR_API_KEY

# 14 subcommand groups available
cloudagent --help

# Create a company → add a staff → send a task to the CEO
cloudagent companies create --name acme --display-name "Acme Inc"
cloudagent staffs create --company acme --name engineering \
    --display-name "Engineering" --role-display "Engineering Lead" \
    --role-category backend --default-model qwen3.6-plus
cloudagent tasks create --company acme \
    --title "Q3 plan" --brief "figure it out" --chief

# Talk to the CEO (use the session_id printed by tasks create)
cloudagent messages send <session_id> \
    --to-agent <ceo_agent_id> --kind task \
    --text "and include lost-deal reasons"

# Pull the inbox
cloudagent notifications list --unread-only
cloudagent tasks timeline <task_id>

Quickstart — Python SDK

from cloudagent import CloudAgent

with CloudAgent() as client:                            # reads CLOUDAGENT_API_KEY
    # Companies
    page = client.companies.list(limit=20)
    company = client.companies.create(name="acme", display_name="Acme Inc")

    # Tasks with chief sugar
    result = client.tasks.create(
        company="acme",
        title="Q3 plan",
        brief="figure it out",
        owner="chief",                                  # SDK resolves to CEO agent
    )
    session_id = result["session_id"]
    chief_agent_id = next(
        (s["id"] for s in client.staffs.org_chart("acme")["staffs"] if s.get("is_chief")),
        None,
    )

    # Append a follow-up message to the CEO
    client.sessions.messages.create(
        session_id,
        from_agent="user",
        to_agent=chief_agent_id,
        kind="task",
        content={"text": "and include lost-deal reasons"},
    )

    # Poll for replies
    for item in client.tasks.timeline(result["task"]["id"]).data:
        print(item.get("type"), item.get("content"))

See examples/ for full snippets including error handling.

Configuration

Setting Source Default
API key cloudagent auth login~/.config/cloudagent/credentials or env CLOUDAGENT_API_KEY
Base URL env CLOUDAGENT_BASE_URL https://api.cloudagent.chat

Migration from cloudagent-cli

cloudagent-cli (≤ 0.1.3) has been superseded by this package. Imports and CLI behaviour are preserved:

Before Now
pip install cloudagent-cli pip install cloudagent
from cloudagent_cli ... from cloudagent ...
cloudagent CLI command cloudagent CLI command (unchanged)

cloudagent-cli will be deprecated and yanked from PyPI after a transition period.

License

MIT — see LICENSE.

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

cloudagent-0.5.0.tar.gz (60.2 kB view details)

Uploaded Source

Built Distribution

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

cloudagent-0.5.0-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file cloudagent-0.5.0.tar.gz.

File metadata

  • Download URL: cloudagent-0.5.0.tar.gz
  • Upload date:
  • Size: 60.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cloudagent-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1045ce048b15591400927639c4e2b7c9930ce979d24f5478392ba13673c7cda7
MD5 d7bec8d4a20d8cb8fb99f520a0fbd380
BLAKE2b-256 997b584f3966f7d0715373be61c483df9ddb5066e9999e5c015bb437db8c4fc8

See more details on using hashes here.

File details

Details for the file cloudagent-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: cloudagent-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cloudagent-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f6e13c69c47d78e0866c384d830e10bdd7b47fa021e419401634831dd2efee6
MD5 6d8cc5e43a27c7a2eb9c9de4cba3c6a4
BLAKE2b-256 3252b7fc159145e0101bdd6fda3d284c73a8de1ae70b0e09bda43821dc171663

See more details on using hashes here.

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