{"id":51867295,"url":"https://github.com/apify/actor-ai-code-sandbox","last_synced_at":"2026-07-24T18:01:00.212Z","repository":{"id":328354472,"uuid":"1111834355","full_name":"apify/actor-ai-code-sandbox","owner":"apify","description":"Open-source Actor that provides a sandbox for secure execution of AI generated code. Supports Node.js, Python. Provides pre-configured Claude Code, Codex CLI, and OpenCode. 📦","archived":false,"fork":false,"pushed_at":"2026-06-15T14:28:21.000Z","size":748,"stargazers_count":5,"open_issues_count":12,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-15T16:08:37.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://apify.com/apify/ai-code-sandbox","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-07T18:08:16.000Z","updated_at":"2026-06-15T14:29:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/apify/actor-ai-code-sandbox","commit_stats":null,"previous_names":["apify/actor-sandbox","apify/actor-code-sandbox","apify/actor-ai-sandbox","apify/actor-ai-code-sandbox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apify/actor-ai-code-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-ai-code-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-ai-code-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-ai-code-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-ai-code-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apify","download_url":"https://codeload.github.com/apify/actor-ai-code-sandbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-ai-code-sandbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35850518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-24T02:00:07.870Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-24T18:00:59.390Z","updated_at":"2026-07-24T18:01:00.196Z","avatar_url":"https://github.com/apify.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧪 Apify AI Code Sandbox\n\nA suite of Apify Actors providing secure, containerized environments for AI coding agents.\n\n[![Apify Actors](https://img.shields.io/badge/Apify-Actors-blue)](https://apify.com)\n[![Node.js 24](https://img.shields.io/badge/Node.js-24-green)](https://nodejs.org)\n[![Python 3](https://img.shields.io/badge/Python-3-blue)](https://python.org)\n\n## Overview\n\nThis monorepo contains four Apify Actors designed for AI-powered coding workflows:\n\n| Actor | Description | Use Case |\n|-------|-------------|----------|\n| **[AI Sandbox](./sandbox)** | Core containerized environment with REST API, MCP server, and interactive shell | General AI agent development, sandboxed code execution |\n| **[Claude Code](./claude-code)** | One-click access to Anthropic's Claude Code | Instant Claude Code sessions on Apify |\n| **[OpenCode](./opencode)** | One-click access to open-source OpenCode | Free/open-source AI coding with multiple AI models support |\n| **[OpenClaw](./openclaw)** | Clears your inbox, sends emails, manages your calendar, checks you in for flights | All from Apify platform |\n\n## Architecture\n\nThe **AI Sandbox** is the core Actor that provides the full execution environment:\n\n- Debian Trixie container with Node.js 24 and Python 3\n- RESTful filesystem API for file operations\n- MCP (Model Context Protocol) server for AI agent integration\n- Interactive browser-based terminal (ttyd)\n- Dependency management for npm and pip packages\n\nThe **Claude Code** and **OpenCode** Actors are lightweight proxies that [metamorph](https://docs.apify.com/platform/actors/development/programming-interface/metamorph) into the AI Sandbox, automatically launching their respective CLI tools in the terminal.\n\n## Quick Start\n\n### Use on Apify Platform\n\n1. **AI Sandbox**: [Run on Apify](https://apify.com/apify/ai-sandbox) - Full sandbox with API access\n2. **Claude Code**: [Run on Apify](https://apify.com/apify/claude-code) - Auto-opens Claude Code CLI\n3. **OpenCode**: [Run on Apify](https://apify.com/apify/opencode) - Auto-opens OpenCode CLI\n\n### Connect to a Running Sandbox\n\nOnce running, connect via:\n\n- **MCP Client**: `https://\u003cRUN-ID\u003e.runs.apify.net/mcp`\n- **REST API**: `POST /exec`, `GET/PUT/DELETE /fs/*`\n- **Interactive Shell**: `https://\u003cRUN-ID\u003e.runs.apify.net/shell/`\n\n## Features\n\n- **🔒 Secure Isolation**: Execute untrusted code safely in containerized environments\n- **🤖 AI Agent Ready**: MCP server with tools for file operations and code execution\n- **📦 Multi-Language**: JavaScript, TypeScript, Python, and shell command support\n- **🖥️ Interactive Shell**: Browser-based terminal for real-time debugging\n- **🔗 Actor Orchestration**: Agents can use the Apify token to run other Actors\n- **📂 Filesystem API**: RESTful endpoints for file upload, download, and management\n- **🔀 Dynamic Proxy**: Expose local services running in the container to external paths\n- **⚡ Auto-Shutdown**: Configurable idle timeout for cost efficiency\n\n## Repository Structure\n\n```\n├── sandbox/                 # Core AI Sandbox Actor\n│   ├── src/                 # Express server, MCP, file operations\n│   ├── artifacts/           # Configuration files (AGENTS.md, opencode.json)\n│   └── README.md            # Full API documentation\n│\n├── claude-code/             # Claude Code proxy Actor\n│   ├── src/main.ts          # Metamorph into sandbox\n│   └── README.md            # Claude Code specific docs\n│\n├── opencode/                # OpenCode proxy Actor\n│   ├── src/main.ts          # Metamorph into sandbox\n│   └── README.md            # OpenCode specific docs\n│\n└── openclaw/                # OpenClaw proxy Actor\n    ├── src/main.ts          # Metamorph into sandbox with OpenClaw init\n    └── README.md            # OpenClaw specific docs\n```\n\n## Development\n\n### Prerequisites\n\n- Node.js 24+\n- Docker (for local builds)\n\n### Build\n\n```bash\n# Build all Actors\ncd sandbox \u0026\u0026 npm install \u0026\u0026 npm run build\ncd ../claude-code \u0026\u0026 npm install \u0026\u0026 npm run build\ncd ../opencode \u0026\u0026 npm install \u0026\u0026 npm run build\ncd ../openclaw \u0026\u0026 npm install \u0026\u0026 npm run build\n```\n\n### Deploy\n\n```bash\n# Deploy using Apify CLI\ncd sandbox \u0026\u0026 apify push\ncd ../claude-code \u0026\u0026 apify push\ncd ../opencode \u0026\u0026 apify push\ncd ../openclaw \u0026\u0026 apify push\n```\n\n## Documentation\n\n- [AI Sandbox README](./sandbox/README.md) - Full API reference and usage examples\n- [Claude Code README](./claude-code/README.md) - Claude Code integration details\n- [OpenCode README](./opencode/README.md) - OpenCode integration details\n- [OpenClaw README](./openclaw/README.md) - OpenClaw integration details\n\n## Links\n\n- [Apify Platform](https://apify.com)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [Claude Code](https://code.claude.com)\n- [OpenCode](https://opencode.ai)\n- [OpenClaw](https://openclaw.ai/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapify%2Factor-ai-code-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapify%2Factor-ai-code-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapify%2Factor-ai-code-sandbox/lists"}