Metadata-Version: 2.4
Name: clawbud
Version: 0.2.0
Summary: Official Python SDK for the ClawBud Agent API — drive your ClawBud agent from your own app.
Author: ClawBud
License: MIT
Project-URL: Homepage, https://clawbud.ai/developers
Project-URL: Repository, https://github.com/Tweezamiza/clawbuddy-web
Keywords: clawbud,agent,ai,sdk,openclaw,llm
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25

# clawbud

**Availability:** Agent API is GA for all authenticated users. Teams methods,
where present, still require the separate Teams entitlement.

Official Python SDK for the [ClawBud](https://clawbud.ai) Agent API. Drive your ClawBud agent from your own app with a couple of lines of code.

> Requires **Python 3.8+**.

## Install

```bash
pip install clawbud
```

## Quickstart

```python
from clawbud import ClawBud

client = ClawBud(api_key="clawbud_live_...")
print(client.send("hi")["reply"])
```

`send()` returns a dict with `agentId`, `reply`, `runId`, and `usage`.

## Multiple agents

```python
agent = client.create_agent(
    "Research",
    model="openai-codex/gpt-5.5",
)["agent"]

print(client.list_agents()["agents"])
reply = client.send(
    "Summarize this market",
    agent_id=agent["id"],
    session="customer-42",
)
```

Named agents have separate identities, workspaces, memory files, and sessions.
They share the account's dedicated VM, gateway, installed tools, and provider
credentials. `main` is the primary agent and cannot be deleted.

## Streaming

```python
from clawbud import ClawBud

client = ClawBud(api_key="clawbud_live_...")
for t in client.stream("write me a haiku"):
    print(t, end="")
```

`stream()` is a generator that yields incremental text chunks as the agent responds.

## Sessions

Pass a `session` to keep a conversation in the same thread:

```python
client.send("remember my name is Ada", agent_id="research", session="sess_123")
client.send("what is my name?", agent_id="research", session="sess_123")
```

## Where do I get a key?

Sign in at [clawbud.ai](https://clawbud.ai), then go to **Settings → Agent API** to create a key. Keys look like `clawbud_live_…` and are shown once.

## Docs

Full API reference: [clawbud.ai/developers](https://clawbud.ai/developers)

## Development

```bash
python3 -m venv .venv
.venv/bin/pip install -e . -r requirements-dev.txt
.venv/bin/pytest
```

## License

MIT
