Metadata-Version: 2.4
Name: overseer-pysdk
Version: 0.1.1
Summary: Python client for the Overseer AI orchestration platform
Author-email: Revaycolizer <albinuslucas@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/revaycolizer/overseer
Project-URL: Repository, https://github.com/revaycolizer/overseer
Project-URL: Documentation, https://github.com/revaycolizer/overseer/blob/main/sdks/python/README.md
Keywords: ai,agent,orchestration,client,overseer
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.5.0
Requires-Dist: rich>=13.7.0
Requires-Dist: click>=8.1.0

# Overseer Python SDK

`pip install overseer-pysdk` — Python client for the Overseer AI orchestration platform.

## Quickstart

```python
import asyncio
from overseer import OverseerClient

async def main():
    # Create client (optionally with a token)
    async with OverseerClient("http://localhost:8080", token="...") as client:
        # List conversations
        conversations = await client.conversations.list()
        for conv in conversations:
            print(f"  #{conv.id}: {conv.title}")

        # List agents
        agents = await client.agents.list()
        for agent in agents:
            print(f"  {agent.name}: {agent.description}")

        # Send a message
        msg_id = await client.messages.send(
            conversation_id=1,
            role="user",
            content="Hello, Overseer!",
        )
        print(f"Message sent: #{msg_id}")

        # Check health
        health = await client.system.health()
        print(f"Status: {health.status}")

        # Orchestrate a query
        response = await client.orchestrate(
            conversation_id=1,
            query="What files are in the current directory?",
        )
        print(f"Response: {response}")

asyncio.run(main())
```

## CLI Usage

The package provides an `overseer` CLI command:

```bash
# Login and save token
export OVESEER_TOKEN=$(overseer login --username admin --password secret --json | jq -r '.token')

# List conversations
overseer conversations list

# List agents
overseer agents

# Check health
overseer health

# Send a query
overseer orchestrate --conversation-id 1 --query "Hello"

# JSON output
overseer agents --json
```

## API Coverage

| Module | Methods |
|--------|---------|
| `client.conversations` | `list`, `create`, `update_title`, `delete`, `search` |
| `client.messages` | `list`, `send`, `delete`, `list_attachments`, `add_attachment` |
| `client.agents` | `list`, `list_all`, `create`, `update`, `get_by_domain` |
| `client.tools` | `list`, `create`, `update`, `link_to_agent`, `unlink_from_agent` |
| `client.supervisors` | `list`, `create`, `update`, `delete`, `get_tools`, `get_agents`, `link_agent`, `unlink_agent` |
| `client.workflows` | `list`, `create`, `update`, `delete`, `get_steps`, `add_step`, `update_step`, `delete_step`, `get_runs`, `get_step_runs`, `run`, `publish`, `get_versions`, `restore_version` |
| `client.work_items` | `list`, `create`, `update_status`, `update_runtime`, `log_event`, `get_events` |
| `client.artifacts` | `list`, `create`, `get_by_ids`, `get_by_run` |
| `client.planners` | `list`, `create` |
| `client.supervision` | `get_state`, `approve_action`, `reject_action`, `activate`, `clear_pending`, `list_pending_approvals`, `kernel_approve`, `kernel_reject`, `kernel_emergency_stop` |
| `client.versions` | `publish`, `publish_agent`, `publish_tool`, `rollback`, `get_content`, `get_history` |
| `client.browser` | `create_session`, `get_session`, `close_session`, `navigate`, `screenshot`, `set_policy`, `get_audit_log`, `memory_report`, `start_recording`, `stop_recording`, `get_recording`, `get_recording_events`, `resume_hitl` |
| `client.credentials` | `list`, `create`, `update`, `delete` |
| `client.templates` | `list`, `create`, `install` |
| `client.settings` | `get`, `set`, `get_all` |
| `client.system` | `health`, `load`, `models`, `registry_status`, `refresh_registry` |

## Development

```bash
cd sdks/python
pip install -e .
pytest
```

## Publishing

```bash
cd sdks/python
python -m build
twine upload dist/*
```

## Requirements

- Python 3.10+
- httpx ≥ 0.27
- pydantic ≥ 2.5
- rich ≥ 13.7 (for CLI)
- click ≥ 8.1 (for CLI)
