Conversation
Wires declaw as an optional sandbox backend for the Agents SDK,
matching the file layout and install shape already used by the other
third-party extensions in this repo. All adapter code lives in the
declaw PyPI package; this PR is a thin re-export + pip extra + docs
row + smoke test.
Users pick the backend with one command:
pip install "openai-agents[declaw]"
And import the flat shape consistent with the other extensions:
from agents.extensions.sandbox import (
DeclawSandboxClient,
DeclawSandboxClientOptions,
)
Changes:
- src/agents/extensions/sandbox/declaw/__init__.py (new, thin re-export)
- src/agents/extensions/sandbox/__init__.py (+_HAS_DECLAW block + __all__ extension)
- pyproject.toml (new [project.optional-dependencies] entry: declaw>=1.0.4)
- tests/extensions/test_sandbox_declaw.py (new, re-export / discriminator smoke)
- examples/sandbox/extensions/declaw_runner.py (new, minimal runnable example)
- docs/sandbox/clients.md (+ one table row pointing at docs.declaw.ai)
CI: the declaw test only imports when the `[declaw]` extra is
installed; declaw is pinned >=1.0.4 (already on PyPI) so the
existing extras-matrix job resolves it cleanly.
Maintenance: the adapter source lives in the declaw package under
declaw/openai/. Any breaking change on the declaw side bumps the
minimum pin in this file. Reviewers only need to keep the re-export
plumbing green — no declaw-specific logic in this repo.
|
HI, thanks for sending this patch! It seems your own module already enables developers to use your sandbox along with this SDK. Please encourage using it for your users for now. |
Thanks for taking a look! Our SDK does cover the direct path, and we'll keep pointing users there for now. The reason for this PR is just consistency: every other hosted backend in The PR is ~30 lines of re-export wiring + 7 smoke tests — all the adapter logic stays in the If this merges, we'll deprecate the Happy to follow whatever process you prefer here — is there a design doc / proposal you'd like us to open first, or a specific reviewer who owns this extension surface? If you'd rather keep new entries Thanks! |
|
Summary
Wires declaw as an optional sandbox backend for the Agents SDK, matching the file layout and install shape already used by the other third-party extensions in this repo.
What declaw is: a security-first sandbox platform for AI agents. Every bash / file / PTY tool call the agent makes is dispatched through an isolated sandbox with an edge proxy that applies configurable guardrails on outbound traffic — PII redaction (with rehydration), prompt-injection detection, invisible-text stripping, per-sandbox domain allowlists, regex-based transformation rules, and audit logging. Templates cover common runtimes (python, node, code-interpreter, ai-agent, devops) so agents don't cold-start a shell with nothing installed.
Learn more: https://declaw.ai · Docs: https://docs.declaw.ai
All adapter code lives in the
declawPyPI package; this PR is a thin re-export + pip extra + docs row + smoke test.Users pick the backend with one command:
pip install "openai-agents[declaw]"And import the flat shape consistent with the other extensions:
Changes
src/agents/extensions/sandbox/declaw/__init__.py(new) — thin re-export ofdeclaw.openai.src/agents/extensions/sandbox/__init__.py—_HAS_DECLAWblock +__all__extension matching the existing shape.pyproject.toml—declaw = ["declaw>=1.0.4"]under[project.optional-dependencies].tests/extensions/test_sandbox_declaw.py(new) — 7 re-export / discriminator smoke tests.examples/sandbox/extensions/declaw_runner.py(new) — minimal runnable example.docs/sandbox/clients.md— one table row pointing at docs.declaw.ai.Test plan
make format— 4 files formatted, no diff after.make lint— ruff clean.uv run mypy src/agents/extensions/sandbox/declaw/ tests/extensions/test_sandbox_declaw.py examples/sandbox/extensions/declaw_runner.py— Success.uv run pytest tests/extensions/test_sandbox_declaw.py— 7 passed.uv run pytest tests/extensions/— 706 passed (unrelated runloop failures only).pip install "openai-agents[declaw]"→ imports resolve fromagents.extensions.sandbox.Issue number
N/A — new third-party extension, following the pattern of existing
[project.optional-dependencies]entries.Checks
make lintandmake formatMaintenance contract
The adapter source lives in the declaw package under
declaw/openai/. Any breaking change on the declaw side bumps the minimum pin in this file. Reviewers only need to keep the re-export plumbing green — no declaw-specific logic in this repo.