Skip to main content

DevOps Bot Desktop SDK — thin client for the AgentOS Electron desktop app

Project description

AgentOS SDK

Thin Python client for the AgentOS desktop app (Electron). Wraps the backend /api/v1/* endpoints. No orchestration logic — agents run server-side.

Private package — install from the GitHub repository (requires access).

Requirements

  • Python 3.11+
  • An API token from the AgentOS platform

Installation

Basic (chat + pipeline + webhooks)

pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk"

With screenshot collector

pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[screenshot]"

With process collector

pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[process]"

Everything

pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[all]"

From source (development)

# From the repo root
pip install -e sdk/          # installs sdk/ as editable package
# OR
pip install -e "sdk/[all]"   # with all optional extras

Setup

agentos configure
# Backend URL [http://localhost:8000]: https://your-backend.example.com
# Paste your token (format: aeos_<64-char-hex>): aeos_...
# ✓ Configuration saved to ~/.agentos/config.toml

Replace a token:

agentos configure --rotate

Quick start

import asyncio
from sdk import BackendClient

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

    # Bootstrap — load your persona + active model
    profile = await client.bootstrap()
    print(f"Logged in as tier={profile.tier}")

    # Chat (SSE stream)
    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":
            break

asyncio.run(main())

Run as Electron sidecar

python -m sdk.ipc.electron_bridge

Wire protocol (newline-delimited JSON on stdin/stdout):

# Electron → Python (stdin)
{"channel": "chat:send", "payload": {"thread_id": "t1", "message": "Hello"}}

# Python → Electron (stdout)
{"type": "delta",    "thread_id": "t1", "data": {"text": "Hi there"}}
{"type": "done",     "thread_id": "t1", "data": {"text": "Hi there", "usage": {...}}}

Available channels

Channel Payload What it does
chat:send {thread_id, message, role_slug?, model_id?} Stream chat response
orchestrator:run {task_input, intent?, task_id?} Start pipeline + poll status
collectors:upload {type, token, paths?, project} Upload local data
auth:oauth_start {service} Get OAuth URL (browser opens it)
auth:oauth_complete {service, code} Signal OAuth done
onboarding:step {step, input} Onboarding step

Collectors

All collector data is sent through BackendClient.submit_webhook — no other egress.

from sdk.collectors import files, screenshot, process

# Upload a file
payload = files.build_webhook_payload(token, ["./notes.md"], project="my-project")
await client.submit_webhook("local_files", payload)

# Screenshot
payload = screenshot.build_webhook_payload(token, project="my-project")
await client.submit_webhook("local_screenshot", payload)

# Process snapshot
payload = process.build_webhook_payload(token, project="my-project")
await client.submit_webhook("local_process", payload)

Size limits

Collector Limit
Single file 50 MB
File batch 200 MB
Screenshot 10 MB (auto-recompressed)

Error handling

from sdk import BackendUnreachable, BackendAuthFailed, BackendVersionTooOld, TokenNotConfigured

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

Versioning

The SDK is versioned independently from the backend. Every request carries X-SDK-Version: 1.0.0. The backend may return HTTP 426 if the SDK is too old to safely communicate — upgrade with pip install --upgrade agentos-sdk.

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

devops_bot_sdk-1.1.0.tar.gz (19.7 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.1.0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: devops_bot_sdk-1.1.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for devops_bot_sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 eb4bb44ba859c4571669740a852e042527923e63bbd7d9d69309e64a44b18054
MD5 ca567ff475f9a164999ef63a3ffd68b8
BLAKE2b-256 db2dbf5a58d9bdafe9a8eae4e964b10cc94701740357665fe2ca75b2bdf0fdde

See more details on using hashes here.

File details

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

File metadata

  • Download URL: devops_bot_sdk-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for devops_bot_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8961c8bfb66c01a5fba9e604ad9b9c10717b6012eff55df9a37bd4e88489bc6
MD5 0d294deb33fdfeaba3f697f9d72857cb
BLAKE2b-256 63d5e83638c9b41b8559ce9f16cd836acbf632106fe32a6e3a6eb4825935349e

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