Add together-sandbox skill #16
Conversation
New skill covering the together-sandbox Python SDK for isolated container environments used in RL training, SFT data generation, and coding agent rollouts. Distinct from together-sandboxes (Code Interpreter API). Includes: - SKILL.md with routing, workflow, and high-signal rules - references/api-reference.md (full SDK surface) - references/rl-patterns.md (GRPO training patterns) - scripts/sandbox_lifecycle.py (create, exec, files, shutdown) - scripts/parallel_fanout.py (batch creation for RL) - agents/openai.yaml - trigger-evals (3 positive, 3 negative) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verified all claims against togethercomputer/together-sandbox source code. Fixes: - execs.exec() does not exist; replaced with execs.create() + execs.get() polling pattern throughout all files - Added run_exec() helper to wrap the two-step create+poll flow - HttpError does not exist; replaced with RuntimeError - autostart parameter is actually autorun - user parameter is actually uid/gid (int, not str) - get_output() returns list[ExecStdout] with .output/.exit_code attributes, not a dict with string keys - Snapshot model has no alias field; documented this limitation - SSE stream uses camelCase (exitCode) not snake_case - Documented ExecItem and ExecStdout model fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ran both scripts against live Sandbox API — both pass end-to-end.
Corrections from live testing:
- execs.exec() DOES exist (convenience method wrapping create+stream)
Returns {"exit_code": int, "output": str} — reverted all files
- autostart is correct (not autorun)
- user is str ("1000:1000"), not uid/gid ints
- sandbox.shutdown() is a classmethod — use sdk.sandboxes.shutdown(id)
- sandbox.hibernate() is a classmethod — use sdk.sandboxes.hibernate(id)
- Removed run_exec() helper (unnecessary since exec() exists)
Verified against live API:
- sandbox_lifecycle.py: snapshot create, sandbox start, DNS config,
exec, file write/read, directory list, shutdown, snapshot delete
- parallel_fanout.py: 4 concurrent sandboxes, parallel exec, cleanup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, fix install
Address PR review: stop re-documenting the API surface in the skill and point
to the SDK's own version-matched docs so the skill needs no maintenance as the
SDK evolves.
- Delete references/api-reference.md (307 lines) — it duplicated and had already
drifted from the SDK (stale base_url; the now-deleted file predated current API)
- SKILL.md: replace the API-reference section with an "SDK Reference" section
pointing to docs/{python-sdk,typescript-sdk,cli}.md on GitHub
- Install: together-sandbox is published on PyPI — use `pip install together-sandbox`
(drop the git+https install and the "not yet on PyPI" note); note the TS package
is not yet on npm
- Fix the lifecycle rule: `sandbox.shutdown()` / `sandbox.hibernate()` instance
methods do exist (alongside the `sdk.sandboxes.*` by-id forms)
- Python-primary scope; reference TS/CLI by pointer only
- Regenerate AGENTS.md / README.md skills table (was left for maintainer)
Validated against installed SDK v1.12.0: every symbol used exists, scripts
compile, quick_validate + quality_check + publish.sh --check all pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Updated based on the review (pushed Stopped re-documenting the API surface. Deleted
Install fixed. Language scope trimmed to Python-primary; TS/CLI are referenced by pointer only, not enumerated. Correctness fix. Removed the rule claiming Regenerated Validated against installed SDK v1.12.0: every symbol used exists, scripts compile, and On bundling docs inside the package vs. linking GitHub: went with the canonical GitHub doc URLs for now since they work today with no publish dependency. Happy to switch the skill to point at the in-package |
Summary
together-sandboxskill (singular) for the together-sandbox Python SDK, sandbox environments for RL training, SFT data generation, and coding agent rolloutstogether-sandboxes(plural) skill, which covers the Code Interpreter API for managed Python notebook executionFiles added
skills/together-sandbox/SKILL.mdskills/together-sandbox/agents/openai.yamlskills/together-sandbox/references/api-reference.mdskills/together-sandbox/references/rl-patterns.mdskills/together-sandbox/scripts/sandbox_lifecycle.pyskills/together-sandbox/scripts/parallel_fanout.pyquality/trigger-evals/together-sandbox.jsonTest plan
python3 scripts/quick_validate.py skills/together-sandboxpassespython3 scripts/quality_check.pypasses./scripts/publish.shto regenerate AGENTS.md and README.md (left for maintainer)🤖 Generated with Claude Code