Universal API for automatic coding agents in sandboxes. Supports Claude Code, Codex, OpenCode, and Amp. Enables developers to interact with multiple coding agents using a single interface. Integrates with existing workflows for automated code generation and testing.
git clone https://github.com/rivet-dev/sandbox-agent.gitUniversal API for automatic coding agents in sandboxes. Supports Claude Code, Codex, OpenCode, and Amp. Enables developers to interact with multiple coding agents using a single interface. Integrates with existing workflows for automated code generation and testing.
[{"step":"Define your task and constraints.","action":"Specify the coding task (e.g., 'Build a Flask API for user authentication'), the agent type (e.g., 'OpenCode'), and the sandbox environment (e.g., 'Debian 11'). Include dependencies (e.g., 'Flask 2.3+') and constraints (e.g., 'No SQLite').","tip":"Be as specific as possible to reduce ambiguity. For example, instead of 'Build a web scraper,' use 'Build a web scraper for Amazon product pages using BeautifulSoup and requests, with rate limiting to 1 request per 5 seconds.'"},{"step":"Execute the task via the sandbox-agent API.","action":"Use the provided prompt template to generate the code. For example, in Claude Code, run: `sandbox-agent --task \"[TASK]\" --agent \"[AGENT]\" --sandbox \"[SANDBOX]\" --dependencies \"[DEPENDENCIES]\"`.","tip":"Check the sandbox-agent API documentation for supported flags (e.g., `--timeout`, `--memory`). Adjust these based on your task complexity."},{"step":"Review and refine the output.","action":"Examine the generated code and explanations. Test the code in your local environment to ensure it meets requirements. Modify the prompt if the output is off-target.","tip":"Use the sandbox-agent API to iterate on the task. For example, refine the prompt with: 'Update the script to include error handling for HTTP 429 responses.'"},{"step":"Integrate into your workflow.","action":"Deploy the generated code into your project. For example, add the script to a GitHub Actions workflow or a Docker container for automated testing.","tip":"Use the sandbox-agent API to generate unit tests or documentation alongside the code. For example, add '--include-tests' to the command to auto-generate pytest cases."},{"step":"Monitor and optimize.","action":"Track the performance of the integrated code. Use the sandbox-agent API to re-run tasks periodically (e.g., weekly) to ensure compatibility with updated dependencies.","tip":"Set up alerts for dependency updates (e.g., using Dependabot) and use the sandbox-agent API to test new versions in a sandbox before deploying."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/rivet-dev/sandbox-agentCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the sandbox-agent API to [TASK: e.g., 'generate a Python script for [FUNCTION]'] in a sandbox environment. Specify the agent type as [AGENT: e.g., 'Claude Code'] and the sandbox as [SANDBOX: e.g., 'Ubuntu 22.04']. Include any dependencies or constraints like [DEPENDENCIES: e.g., 'Pandas 2.0+'] or [CONSTRAINTS: e.g., 'No external API calls']. Return the generated code and a brief explanation of the approach.
Here’s the generated Python script for a **real-time stock price analyzer** using the sandbox-agent API with **Claude Code** in an **Ubuntu 22.04** sandbox. Dependencies: `yfinance 0.2.33`, `pandas 2.0.3`, and `matplotlib 3.7.2`. Constraints: No external API calls beyond Yahoo Finance.
```python
import yfinance as yf
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
def fetch_stock_data(ticker, days=30):
"""Fetch historical stock data for a given ticker."""
end_date = datetime.now()
start_date = end_date - timedelta(days=days)
data = yf.download(ticker, start=start_date, end=end_date)
return data
def analyze_moving_averages(data, short_window=5, long_window=20):
"""Calculate and plot short-term and long-term moving averages."""
data['SMA_5'] = data['Close'].rolling(window=short_window).mean()
data['SMA_20'] = data['Close'].rolling(window=long_window).mean()
plt.figure(figsize=(12, 6))
plt.plot(data['Close'], label='Closing Price', alpha=0.5)
plt.plot(data['SMA_5'], label='5-Day SMA', color='orange')
plt.plot(data['SMA_20'], label='20-Day SMA', color='green')
plt.title(f'{ticker} Stock Analysis')
plt.legend()
plt.savefig('stock_analysis.png')
return data
# Example usage
ticker = 'AAPL'
stock_data = fetch_stock_data(ticker)
analysis = analyze_moving_averages(stock_data)
print("Analysis complete. Plot saved as 'stock_analysis.png'.")
```
**Explanation:**
The script fetches 30 days of historical data for Apple (AAPL) using the `yfinance` library, calculates 5-day and 20-day simple moving averages (SMAs), and generates a visualization. The moving averages help identify short-term trends (e.g., bullish/bearish crossovers). The sandbox-agent API executed this in an isolated Ubuntu environment, ensuring reproducibility and security. The output includes the generated plot (`stock_analysis.png`) and a Pandas DataFrame with the analyzed data.
**Next Steps:**
1. Deploy this script in a CI/CD pipeline to automate daily stock analysis.
2. Extend the script to compare multiple tickers or add technical indicators (e.g., RSI).
3. Use the sandbox-agent API to test the script across different Python versions or OS environments.Your one-stop shop for church and ministry supplies.
AI assistant built for thoughtful, nuanced conversation
Automate your browser workflows effortlessly
IronCalc is a spreadsheet engine and ecosystem
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan