Metadata-Version: 2.4
Name: openclaw-managed-agents
Version: 0.1.0
Summary: Python SDK for OpenClaw Managed Agents — the open alternative to Claude Managed Agents
Project-URL: Homepage, https://github.com/stainlu/openclaw-managed-agents
Project-URL: Documentation, https://github.com/stainlu/openclaw-managed-agents#python-sdk
Project-URL: Repository, https://github.com/stainlu/openclaw-managed-agents
License-Expression: MIT
License-File: LICENSE
Keywords: agents,ai,llm,managed-agents,openclaw
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx-sse>=0.4.0
Requires-Dist: httpx>=0.25.0
Description-Content-Type: text/markdown

# OpenClaw Managed Agents Python SDK

Python client for the [OpenClaw Managed Agents](https://github.com/stainlu/openclaw-managed-agents) API.

## Install

```bash
pip install openclaw-managed-agents
```

## Usage

```python
from openclaw_managed_agents import OpenClawClient

# Pass api_token to match the orchestrator's OPENCLAW_API_TOKEN when
# bearer-token auth is enabled. Omit for a local orchestrator without auth.
client = OpenClawClient(base_url="http://localhost:8080", api_token="my-shared-secret")

# Create an agent
agent = client.agents.create(
    model="moonshot/kimi-k2.5",
    instructions="You are a research assistant.",
)

# Open a session
session = client.sessions.create(agent_id=agent.agent_id)

# Send a message
client.sessions.send(session.session_id, content="What is 2+2?")

# Stream events in real time
for event in client.sessions.stream(session.session_id):
    if event.type == "agent.message":
        print(event.content)
    elif event.type == "agent.tool_use":
        print(f"[tool: {event.tool_name}]")
```

## Resources

- `client.agents` — create, get, list, update, archive, delete, list_versions, warm, run
- `client.environments` — create, get, list, delete
- `client.sessions` — create, get, list, delete, send, cancel, compact, logs, events, stream, confirm_tool
- `client.vaults` — create, get, list, delete, add_static_bearer_credential, add_mcp_oauth_credential, list_credentials, delete_credential
