Add together-sandbox skill #16
Open
necoline wants to merge 3 commits into
Open
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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