Metadata-Version: 2.5
Name: dothedev-sandbox
Version: 0.1.0
Summary: Deep agents sandbox backend for DoTheDev Agent Platform sandboxes
Author: shahraiz ali
License-Expression: MIT
License-File: LICENSE
Keywords: agents,deepagents,langchain,langgraph,sandbox
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: deepagents>=0.7.28
Requires-Dist: httpx>=0.28.1
Description-Content-Type: text/markdown

# dothedev-sandbox

A [deep agents](https://docs.langchain.com/oss/python/deepagents/sandboxes) sandbox backend for agents
deployed on the DoTheDev Agent Platform. The platform runs each sandbox in a locked-down container (no
secrets, no network unless the template allows it) and gives deployed agents `DOTHEDEV_SANDBOX_URL` and
`DOTHEDEV_SANDBOX_TOKEN`. The token stays in the agent server; only commands and files reach the sandbox.

```bash
pip install dothedev-sandbox
```

```python
from deepagents import create_deep_agent
from dothedev_sandbox import ThreadSandbox

# One sandbox per conversation, kept across turns
agent = create_deep_agent(
    model="openai:gpt-4o-mini",
    backend=ThreadSandbox(),
)
```

`ThreadSandbox` sends each command and file call to the sandbox of the run's `configurable.thread_id`,
created on first use. Pass `template=` to pick one of the templates the platform offers.

A sandbox shared by every thread instead:

```python
from dothedev_sandbox import SandboxClient

shared = SandboxClient().get_or_create("shared:research")
agent = create_deep_agent(model=..., backend=shared)
```

Locally, point it at a platform API and a deployment's token:

```bash
export DOTHEDEV_SANDBOX_URL=http://localhost:8100
export DOTHEDEV_SANDBOX_TOKEN=sbx_...
```

## License

MIT
