Skip to main content

DevOpsBot SDK

Python client for the DevOpsBot desktop app. Provides the agentos CLI to configure credentials and a BackendClient to interact with the DevOpsBot backend.

Private package — requires GitHub access to install.

For a full walkthrough including SSH setup, end-to-end testing, and troubleshooting see SETUP_GUIDE.md.


Requirements

Minimum Check
Python 3.11+ python3 --version (Linux/macOS) · python --version (Windows)
Git any git --version
DevOpsBot account Needed for your API token

Installation

Choose the method that fits your setup. Option A (venv) is recommended for developers. Option B (system Python) works for everyone else and requires no extra steps.


Option A — Virtual environment (recommended for developers)

A virtual environment keeps the SDK isolated from your system Python.

Linux / macOS:

# Create and activate a venv
python3 -m venv devopsbot-env
source devopsbot-env/bin/activate

# Install via SSH
pip install "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

# OR install via HTTPS token
pip install "git+https://<YOUR_GITHUB_TOKEN>@github.com/consultancy-outfit/DevOpsBot-SDK.git"

Windows (Command Prompt):

python -m venv devopsbot-env
devopsbot-env\Scripts\activate

pip install "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

Windows (PowerShell):

python -m venv devopsbot-env
devopsbot-env\Scripts\Activate.ps1

pip install "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

The venv must be activated every time you open a new terminal before using agentos or running SDK scripts. You only create it once.


Option B — System Python (simplest, works for everyone)

Installs directly into your default Python environment — no activation needed.

Linux / macOS:

# via SSH
pip3 install --break-system-packages "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

# via HTTPS token
pip3 install --break-system-packages "git+https://<YOUR_GITHUB_TOKEN>@github.com/consultancy-outfit/DevOpsBot-SDK.git"

Windows:

# via SSH
pip install "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

# via HTTPS token
pip install "git+https://<YOUR_GITHUB_TOKEN>@github.com/consultancy-outfit/DevOpsBot-SDK.git"

--break-system-packages is required on Ubuntu 22.04+ and Debian 12+ due to PEP 668. It is safe — it only installs this package, it does not affect your system Python. Windows does not need this flag.

If pip is not found on Windows, use python -m pip install ... instead.


With optional collectors

Append [all] to either install command to enable screen capture and process listing:

Linux / macOS (system Python):

pip3 install --break-system-packages "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git[all]"

Linux / macOS (venv, after activation):

pip install "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git[all]"

Windows:

pip install "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git[all]"

Configure

Get your API token from DevOpsBot Web App → Settings → API Tokens → Generate Token. Token format: co_<uuid>_<32-hex-secret>

agentos configure

To replace an existing token:

agentos configure --rotate

Quick Start

import asyncio
from sdk import BackendClient

async def main():
    client = BackendClient.from_config()   # reads ~/.agentos/config.toml

    profile = await client.bootstrap()
    print(f"Logged in — tier: {profile.tier}")

    async for envelope in client.chat("my-thread", "What tasks are open?"):
        if envelope.type == "delta":
            print(envelope.data["text"], end="", flush=True)
        elif envelope.type == "done":
            print()
            break

asyncio.run(main())

Agents

The orchestrator runs AI agent pipelines server-side. You submit a task, receive a stream of progress envelopes, and approve or reject the outcome.

Run an agent

import asyncio
from sdk import BackendClient
from sdk.models.requests import OrchestratorRequest

async def main():
    client = BackendClient.from_config()

    req = OrchestratorRequest(
        task_input="hello",
        intent="greet",   # optional — helps the backend route the task
    )

    async for envelope in client.orchestrator_run(req):
        print(f"[{envelope.type}] {envelope.data}")

        if envelope.type == "awaiting_approval":
            # Task needs a human decision before it continues
            task_id = envelope.data["task_id"]
            decision = input("Approve? (yes/no): ").strip().lower()
            await client.approve_task(
                task_id,
                decision="approved" if decision == "yes" else "rejected",
                note="Reviewed and approved by operator.",
            )

        elif envelope.type in ("done", "error"):
            break

asyncio.run(main())

Envelope types emitted by the orchestrator

Type When it fires Useful data
pipeline_started Task accepted by backend task_id
pipeline.<key> A pipeline context field updated key, value
awaiting_approval Pipeline paused — human decision required task_id
done Pipeline completed task_id, approval_status
error Unrecoverable failure code, message

List and approve tasks

import asyncio
from sdk import BackendClient

async def main():
    client = BackendClient.from_config()

    # List tasks waiting for approval
    result = await client.list_tasks(status="To Do", limit=20)
    for task in result.get("tasks", []):
        print(task["task_id"], task.get("summary", ""))

    # Approve a specific task by ID
    await client.approve_task("task-id-here", decision="approved", note="LGTM")

asyncio.run(main())

Test agents end-to-end (no repo clone needed)

Linux / macOS

python3 - << 'EOF'
import asyncio
from sdk import BackendClient
from sdk.models.requests import OrchestratorRequest

async def main():
    client = BackendClient.from_config()

    print("Starting agent pipeline...")
    req = OrchestratorRequest(task_input="hello")

    async for envelope in client.orchestrator_run(req):
        print(f"  [{envelope.type}] {envelope.data}")

        if envelope.type == "awaiting_approval":
            print("  → Auto-approving for test...")
            await client.approve_task(envelope.data["task_id"], decision="approved")

        elif envelope.type == "done":
            print("\nAgent completed successfully.")
            break

        elif envelope.type == "error":
            print(f"\nAgent error: {envelope.data}")
            break

asyncio.run(main())
EOF

Windows (PowerShell)

python - << 'EOF'
import asyncio
from sdk import BackendClient
from sdk.models.requests import OrchestratorRequest

async def main():
    client = BackendClient.from_config()

    print("Starting agent pipeline...")
    req = OrchestratorRequest(task_input="hello")

    async for envelope in client.orchestrator_run(req):
        print(f"  [{envelope.type}] {envelope.data}")

        if envelope.type == "awaiting_approval":
            print("  -> Auto-approving for test...")
            await client.approve_task(envelope.data["task_id"], decision="approved")

        elif envelope.type == "done":
            print("\nAgent completed successfully.")
            break

        elif envelope.type == "error":
            print(f"\nAgent error: {envelope.data}")
            break

asyncio.run(main())
EOF

Windows (Command Prompt)

Save as test_agent.py and run python test_agent.py:

# test_agent.py
import asyncio
from sdk import BackendClient
from sdk.models.requests import OrchestratorRequest

async def main():
    client = BackendClient.from_config()

    print("Starting agent pipeline...")
    req = OrchestratorRequest(task_input="hello")

    async for envelope in client.orchestrator_run(req):
        print(f"  [{envelope.type}] {envelope.data}")

        if envelope.type == "awaiting_approval":
            print("  -> Auto-approving for test...")
            await client.approve_task(envelope.data["task_id"], decision="approved")

        elif envelope.type == "done":
            print("\nAgent completed successfully.")
            break

        elif envelope.type == "error":
            print(f"\nAgent error: {envelope.data}")
            break

asyncio.run(main())

Expected output

Starting agent pipeline...
  [pipeline_started] {'task_id': 'tsk_abc123'}
  [pipeline.summary] {'key': 'summary', 'value': 'Processing...'}
  [awaiting_approval] {'task_id': 'tsk_abc123'}
  -> Auto-approving for test...
  [done] {'task_id': 'tsk_abc123', 'approval_status': 'approved'}

Agent completed successfully.

Error Handling

from sdk import BackendClient, TokenNotConfigured, BackendAuthFailed, BackendUnreachable

try:
    client = BackendClient.from_config()
    await client.ping()
except TokenNotConfigured:
    print("Run: agentos configure")
except BackendAuthFailed:
    print("Token expired — run: agentos configure --rotate")
except BackendUnreachable as e:
    print(f"Backend unreachable: {e}")

Upgrade

Linux / macOS (system Python):

pip3 install --break-system-packages --upgrade "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

Linux / macOS (venv — activate first):

source devopsbot-env/bin/activate
pip install --upgrade "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

Windows:

pip install --upgrade "git+ssh://git@github.com/consultancy-outfit/DevOpsBot-SDK.git"

Uninstall

Remove the SDK package

Linux / macOS (system Python):

pip3 uninstall devops-bot-sdk -y

Linux / macOS (venv — activate first):

source devopsbot-env/bin/activate
pip uninstall devops-bot-sdk -y

Windows:

pip uninstall devops-bot-sdk -y

Remove the venv entirely (if you used one)

Linux / macOS:

rm -rf devopsbot-env

Windows (Command Prompt):

rmdir /s /q devopsbot-env

Windows (PowerShell):

Remove-Item -Recurse -Force devopsbot-env

Remove saved credentials

Deletes the stored token and backend URL from your machine.

Linux / macOS:

rm -rf ~/.agentos

Windows (Command Prompt):

rmdir /s /q %USERPROFILE%\.agentos

Windows (PowerShell):

Remove-Item -Recurse -Force $HOME\.agentos

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devops_bot_sdk-1.6.37.tar.gz (727.8 kB view details)

Uploaded Source

Built Distribution

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

devops_bot_sdk-1.6.37-py3-none-any.whl (587.9 kB view details)

Uploaded Python 3

File details

Details for the file devops_bot_sdk-1.6.37.tar.gz.

File metadata

  • Download URL: devops_bot_sdk-1.6.37.tar.gz
  • Upload date:
  • Size: 727.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for devops_bot_sdk-1.6.37.tar.gz
Algorithm Hash digest
SHA256 83450c894f113219f472e426bc3ed57845bc04bd58bf4ca500d46ff36b51aacc
MD5 f0a97d1ae8ae08ea8a9b35f69684e111
BLAKE2b-256 6e733d57c9ed9436e32868bc6b08a4aaec3ffed44d665a6c20359bd6127ed3b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for devops_bot_sdk-1.6.37.tar.gz:

Publisher: publish.yml on consultancy-outfit/DevOpsBot-SDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file devops_bot_sdk-1.6.37-py3-none-any.whl.

File metadata

  • Download URL: devops_bot_sdk-1.6.37-py3-none-any.whl
  • Upload date:
  • Size: 587.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for devops_bot_sdk-1.6.37-py3-none-any.whl
Algorithm Hash digest
SHA256 cfb906f64ec4c178db726f089a9a9ae05225ea159da4320eab9ac4ce2aa21933
MD5 92b67903771ba34a7791280f98e091ab
BLAKE2b-256 af0c75cd5131291af913aca35d765d1facb34e26de2397d3e1d4de141e660891

See more details on using hashes here.

Provenance

The following attestation bundles were made for devops_bot_sdk-1.6.37-py3-none-any.whl:

Publisher: publish.yml on consultancy-outfit/DevOpsBot-SDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.6.38

2 files

This release

1.6.37 This release

2 files

1.6.34

2 files

1.6.33

2 files

1.6.32

2 files

1.6.28

2 files

1.6.26

2 files

1.6.25

2 files

1.6.24

2 files

1.6.19

2 files

1.6.15

2 files

1.6.14

2 files

1.6.10

2 files

1.6.8

2 files

1.6.6

2 files

1.6.4

2 files

1.6.2

2 files

1.5.0

2 files

1.4.159

2 files

1.4.158

2 files

1.4.153

2 files

1.4.151

2 files

1.4.150

2 files

1.4.149

2 files

1.4.148

2 files

1.4.147

2 files

1.4.146

2 files

1.4.145

2 files

1.4.143

2 files

1.4.141

2 files

1.4.139

2 files

1.4.132

2 files

1.4.129

2 files

1.4.126

2 files

1.4.125

2 files

1.4.124

2 files

1.4.120

2 files

1.4.119

2 files

1.4.118

2 files

1.4.117

2 files

1.4.116

2 files

1.4.101

2 files

1.4.99

2 files

1.4.96

2 files

1.4.94

2 files

1.4.92

2 files

1.4.90

2 files

1.4.88

2 files

1.4.86

2 files

1.4.85

2 files

1.4.83

2 files

1.4.81

2 files

1.4.79

2 files

1.4.78

2 files

1.4.76

2 files

1.4.74

2 files

1.4.71

2 files

1.4.70

2 files

1.4.67

2 files

1.4.66

2 files

1.4.65

2 files

1.4.62

2 files

1.4.60

2 files

1.4.58

2 files

1.4.55

2 files

1.4.47

2 files

1.4.46

2 files

1.4.45

2 files

1.4.39

2 files

1.4.37

2 files

1.4.35

2 files

1.4.33

2 files

1.4.31

2 files

1.4.29

2 files

1.4.27

2 files

1.4.26

2 files

1.4.25

2 files

1.4.24

2 files

1.4.23

2 files

1.4.22

2 files

1.4.20

2 files

1.4.19

2 files

1.4.17

2 files

1.4.14

2 files

1.4.13

2 files

1.4.11

2 files

1.4.8

2 files

1.4.6

2 files

1.4.3

2 files

1.4.1

2 files

1.4.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page