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

# 13 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.4.0.tar.gz (55.5 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.4.0-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cloudagent-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8bd7fdadc8328fe2c39be59340a7a67c12faf8268e3e550c45b0292721f95f5e
MD5 a2eb051a30d0df2c82433a2d17381b91
BLAKE2b-256 8f84e4affeecebe39a70a6979bf5bbddbb1bfb20fd007395ece1d97d43d2488d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cloudagent-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb832e24493531837ee3bc77675093f46b482715924e3d793473e2bc82825ef5
MD5 02a01a30c40e45ca4e0d68b78e7408df
BLAKE2b-256 dff17e8cfebb9495e2c6a0b0ceaabb9eac68810a0cbe84ded1d3ddcfa6528830

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