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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb4bb44ba859c4571669740a852e042527923e63bbd7d9d69309e64a44b18054
|
|
| MD5 |
ca567ff475f9a164999ef63a3ffd68b8
|
|
| BLAKE2b-256 |
db2dbf5a58d9bdafe9a8eae4e964b10cc94701740357665fe2ca75b2bdf0fdde
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8961c8bfb66c01a5fba9e604ad9b9c10717b6012eff55df9a37bd4e88489bc6
|
|
| MD5 |
0d294deb33fdfeaba3f697f9d72857cb
|
|
| BLAKE2b-256 |
63d5e83638c9b41b8559ce9f16cd836acbf632106fe32a6e3a6eb4825935349e
|