---
title: "Python"
description: "Python client for managing sessions and streaming events."
icon: "python"
tag: "Coming Soon"
---

The Python SDK is on our roadmap. It will provide a typed client for managing sessions and streaming events, similar to the TypeScript SDK.

In the meantime, you can use the [HTTP API](/http-api) directly with any HTTP client like `requests` or `httpx`.

```python
import httpx

base_url = "http://127.0.0.1:2468"
headers = {"Authorization": f"Bearer {token}"}

# Create a session
httpx.post(
    f"{base_url}/v1/sessions/my-session",
    headers=headers,
    json={"agent": "claude", "permissionMode": "default"}
)

# Send a message
httpx.post(
    f"{base_url}/v1/sessions/my-session/messages",
    headers=headers,
    json={"message": "Hello from Python"}
)

# Get events
response = httpx.get(
    f"{base_url}/v1/sessions/my-session/events",
    headers=headers,
    params={"offset": 0, "limit": 50}
)
events = response.json()["events"]
```

Want the Python SDK sooner? [Open an issue](https://github.com/rivet-dev/sandbox-agent/issues) to let us know.
