Metadata-Version: 2.5
Name: h-sandbox-deepagents
Version: 0.1.0rc1
Summary: Harakiri sandbox backends for Python Deep Agents
Project-URL: Documentation, https://sb.harakiri.io/#docs/deepagents-python
Project-URL: Repository, https://github.com/nabilblk/h-sandbox
Project-URL: Issues, https://github.com/nabilblk/h-sandbox/issues
Author: Harakiri contributors
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: anyio<5,>=4.9
Requires-Dist: deepagents==0.7.21
Requires-Dist: h-sandbox==0.1.0rc1
Description-Content-Type: text/markdown

# Deep Agents on Harakiri

An optional backend for the real Python `deepagents` framework. Developer
preview `0.1.0rc1` targets Deep Agents `0.7.21` and Python SDK `0.1.0rc1`
exactly, on Python 3.11 or newer. See the
[release record](https://github.com/nabilblk/h-sandbox/blob/main/docs/release-notes/python-agents-preview.md)
for publication status, exact artifacts and native qualification evidence.

Version-pinned PyPI installation, including the exact SDK and framework
dependencies:

```sh
python -m pip install "h-sandbox-deepagents==0.1.0rc1"
```

```python
from deepagents import create_deep_agent
from harakiri import HarakiriClient
from harakiri_deepagents import HarakiriSandboxBackend

with HarakiriClient.from_env() as client:
    with client.sandboxes.task(template="your-installed-template") as sandbox:
        backend = HarakiriSandboxBackend(sandbox)
        agent = create_deep_agent(model=model, backend=backend)
        result = agent.invoke({"messages": [{"role": "user", "content": prompt}]})
```

Configure `model` and `prompt` in your application; complete examples live in
`examples/python-first-task`. The model and agent loop stay in the application.
The sandbox runs shell and file tools. Neither model nor API credentials are
forwarded into it. A backend always borrows the supplied sandbox.

Use `AsyncHarakiriSandboxBackend` with `AsyncHarakiriClient` and `agent.ainvoke()`
for native async I/O. Use a borrowed sandbox, not a disposable `task` context,
when the graph pauses for human approval. Checkpoints do not extend runtime TTL.

The [complete integration guide](https://github.com/nabilblk/h-sandbox/blob/main/docs/integrations/deepagents-python.md)
covers model setup, installation, template utilities, partial transfers,
truncation, observed command recovery and current qualification status. Standard
output is bounded to 64 KiB by default; abnormal termination remains visible to
the actual framework tools. No distributed exactly-once recovery is claimed.
