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.

Requirements

  • Python 3.11+
  • AgentOS backend running (default: http://localhost:8000)
  • An API token from the AgentOS web app (Settings → API Tokens)

Installation

Basic (chat + pipeline + webhooks)

pip install agentos-sdk

With screenshot collector

pip install "agentos-sdk[screenshot]"

With process collector

pip install "agentos-sdk[process]"

Everything

pip install "agentos-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.0.0.tar.gz (3.1 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.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for devops_bot_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 925e8fa0656795dbc8283010da522abf9bac23424bee7f1484ef8c31f0aa6568
MD5 aa28be6d373efa2c2c60c7702c3e3f13
BLAKE2b-256 2f2439dbdea607d89e0fb2793a8e012e755dd8a95d7947d5172c19dee739f19e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for devops_bot_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc7c093da91bdffdb67d7f95dd7c765cde6589f1f9e080dfb97b4c6971d81c6e
MD5 3056f5fe571e2269c825a556d7c5903c
BLAKE2b-256 9f5ef5c08fbe55d9b9e6b2a340e2b4eeacd3e472a45125723e527d3ec9bcb1f1

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