Together AI Sandboxes Skill for Claude Code
Skill that teaches Claude Code Together AI's sandbox API. Execute Python code in managed remote sandboxes with stateful sessions, file I/O, and isolated environments.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install 5086f64d-852f-4737-81ec-0018d6118a06 --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
This is a Claude Code skill that teaches the agent how to use Together AI's sandbox API. It enables Claude Code to execute Python code in managed remote sandboxes with stateful sessions, file I/O, and isolated environments. Instead of running code on your local machine, the agent sends code to a Together AI sandbox and gets results back.
This skill is for developers who want Claude Code to run computations, data analysis, or experiments in isolated environments without affecting their local setup. It is especially useful for data science workflows and untrusted code execution.
How it saves time or tokens
Remote sandboxes eliminate the risk of local side effects from AI-generated code. The agent can install packages, process data, and run experiments in an isolated environment. Stateful sessions mean context persists across multiple code executions within the same session. The estimated token cost is around 2,400 tokens per session.
How to use
- Add the Together AI Sandboxes skill to your Claude Code configuration.
- Set your Together AI API key.
- Ask Claude Code to run Python code in a sandbox.
- The agent creates a sandbox session and executes code remotely.
# Set Together AI API key
export TOGETHER_API_KEY='your-api-key'
# In Claude Code, the agent can now run:
# 'Run this data analysis in a sandbox'
# 'Execute this Python script in a remote environment'
Example
How the skill works in practice:
# The agent calls the Together AI sandbox API
import requests
api_url = 'https://api.together.xyz/v1/code/sandbox'
headers = {'Authorization': 'Bearer YOUR_API_KEY'}
# Create a sandbox session
session = requests.post(f'{api_url}/sessions', headers=headers).json()
# Execute code in the sandbox
result = requests.post(
f'{api_url}/sessions/{session["id"]}/execute',
headers=headers,
json={
'code': '''
import pandas as pd
import numpy as np
data = pd.DataFrame({
'revenue': np.random.normal(1000, 200, 100),
'costs': np.random.normal(600, 100, 100)
})
data['profit'] = data['revenue'] - data['costs']
print(data.describe())
'''
}
).json()
print(result['output'])
Related on TokRepo
- AI coding tools — More AI-assisted development tools
- Automation tools — Compute and execution automation
Common pitfalls
- Together AI sandbox API requires an API key and may have usage costs. Check pricing before heavy use.
- Sandbox sessions have resource limits (memory, CPU time). Large computations may be throttled or terminated.
- File I/O within the sandbox is isolated. Files created in one session may not persist across sessions unless explicitly saved.
- Network access from sandboxes may be restricted. Do not rely on sandboxes for web scraping or external API calls.
- The skill teaches Claude Code the API patterns. If Together AI updates their API, the skill may need updating.
常见问题
A Together AI sandbox is a managed remote Python execution environment. Code runs in isolation with its own filesystem, installed packages, and resource limits. It is designed for safe code execution without local side effects.
Yes. Variables, imported packages, and files created in one execution persist within the same session. This allows multi-step workflows where each code block builds on the previous one.
Common data science packages (pandas, numpy, matplotlib, scikit-learn) are pre-installed. Additional packages can be installed with pip within the sandbox session.
Together AI may charge for sandbox compute usage. Check their current pricing page for sandbox API costs. The skill itself is free to add to Claude Code.
Sandboxes are designed for development, experimentation, and analysis rather than production workloads. For production compute, use dedicated infrastructure.
引用来源 (3)
- Together AI Documentation— Together AI sandbox API for remote code execution
- Anthropic Claude Code Docs— Claude Code skills and agent configuration
- Together AI Platform— Sandboxed code execution for AI agents
来源与感谢
togethercomputer/skills — MIT
讨论
相关资产
Together AI Audio TTS/STT Skill for Claude Code
Skill that teaches Claude Code Together AI's audio API. Covers text-to-speech (REST and WebSocket streaming), speech-to-text transcription, and realtime voice interaction.
Together AI Dedicated Containers Skill for Agents
Skill that teaches Claude Code Together AI's container deployment API. Run custom Docker inference workers on managed GPU infrastructure with full environment control.
Together AI Embeddings & Reranking Skill for Agents
Skill that teaches Claude Code Together AI's embeddings and reranking API. Covers dense vector generation, semantic search, RAG pipelines, and result reranking patterns.
Together AI Dedicated Endpoints Skill for Agents
Skill that teaches Claude Code Together AI's dedicated endpoints API. Deploy single-tenant GPU inference with autoscaling, no rate limits, and custom model configurations.