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

# Create an agent and a session, then send a message
cloudagent agents create --name my-agent --model claude-sonnet-4-6
cloudagent sessions create --agent-id agt_xxx
cloudagent sessions send --session-id ses_xxx --text "hello"

Run cloudagent --help to see all commands.

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.3.0.tar.gz (47.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.3.0-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cloudagent-0.3.0.tar.gz
  • Upload date:
  • Size: 47.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.3.0.tar.gz
Algorithm Hash digest
SHA256 db09a7ecfa0bcf15f327f4813f9ecd73bc5021082b5528418acdf10ed8083868
MD5 05d6ae1b655284b4fc1019ffa4b9b779
BLAKE2b-256 8383550aec0b0b1786948a24f69fc0c033dcca421216cb767c52eea67d4e0ee9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cloudagent-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 35.5 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01afd6fbf1a59370ecef12d8a6c41849b609d0daa385697e7602bc9e484e1b94
MD5 1865f44066c5338d4342182d464cbdbc
BLAKE2b-256 dd31792113aea645563c06ae841e88fd4d241dc7857967172d8ab82cda0e1678

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