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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cloudagent-0.3.0rc1.tar.gz
  • Upload date:
  • Size: 47.2 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.0rc1.tar.gz
Algorithm Hash digest
SHA256 9cef6e82a66368e300017b2e375c1569452fe0d2410e0cd5421f06631893dd4f
MD5 05d5044738508cb796b91f853acd5cd4
BLAKE2b-256 7d9e1e06b9b48c357c59cfe26e7f0d907c4cd80b03348b2bccf90dabbe271289

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cloudagent-0.3.0rc1-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.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d80388efcec8250d4d9d0d5744c38efd3b345976215769c31807ff0ca310781c
MD5 ba2c7f5d6897f879f003c594d4e4faf6
BLAKE2b-256 0b853c442d7ec2e2f5d65f9bef5569a776b341ed1274e5b1b51f62d6db568de6

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