Learning resourcesReviewed · E2B

Muse Code in E2B sandboxes

This guide shows developers how to run Meta's Muse Code coding agent in E2B sandboxes, but its automated examples skip approval prompts while internet access is enabled by default. It covers interactive use, unattended execution, repository edits and custom templates through CLI, JavaScript/TypeScript and Python examples.

Researched 25 Nov 2026

In short.

This guide helps developers automate code changes with Muse Code inside E2B sandboxes, but its unattended examples give the agent broad control inside an environment with internet access enabled by default. E2B supplies a pre-built muse template containing Meta's terminal and CI coding agent, which the page describes as built on Muse Spark. The guide documents API-key authentication, interactive and headless execution, JSONL event output, model-step limits, repository editing and custom templates. Pricing, licensing, exact installed versions and runtime performance are not established, and none of the examples were executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete selected page at [https://docs.e2b.dev/agents/muse.md], including its CLI and SDK examples, approval and sandbox behavior, internet-access and credential notices, repository workflow, custom-template examples and related-guide references. The documentation index and linked Meta, CLI, networking, Secrets, persistence and SSH pages are excluded. No commands were executed; output quality, compatibility, isolation effectiveness and runtime behavior remain untested.

The overview

Identity

The resource is E2B's Muse Code integration guide at [https://docs.e2b.dev/agents/muse.md]. It teaches how to launch and control Muse Code inside an E2B sandbox using the pre-built muse template.

The page identifies Muse Code as Meta's coding agent for terminal and CI use, built on Muse Spark. The selected resource is the integration guide; it does not supply the agent's implementation or model documentation.

Assessment

The guide provides a concrete starting point for developers who want a coding agent to work in an E2B environment with filesystem, terminal and git access. It includes commands, complete sandbox lifecycle examples and a repository-editing sequence.

Its main tradeoff is the documented use of --yolo, which removes approval prompts and disables Muse Code's own operating-system sandbox. The page presents E2B as the isolation boundary, but supplies no independent security validation, execution results or code-quality measurements.

Users

The examples suit developers building automated coding jobs, CI integrations or interactive remote coding sessions. JavaScript/TypeScript and Python users receive equivalent examples for creating sandboxes, running commands, reading output and ending the sandbox.

Beginners can follow the command sequence, but the page assumes familiarity with terminals, environment variables, API keys and git. Teams needing detailed installation, credential management or deployment guidance will need information beyond this page.

Capabilities

The guide documents interactive Muse Code sessions and non-interactive execution through muse exec. It describes --json for machine-readable JSONL events and --max-model-steps for limiting the number of model steps.

The repository examples show cloning a repository, requesting edits, streaming standard output and retrieving git diff. Custom-template examples show deriving an environment from muse to add dependencies or configuration. These are documented capabilities; their behavior and reliability were not tested.

Using it

Requirements

The documented routes require E2B CLI or SDK access. Muse Code authenticates using a Meta Model API key supplied through META_API_KEY, obtained from the dashboard at [https://dev.meta.ai]. The repository example also expects GITHUB_TOKEN for its token-authenticated clone command.

The page does not specify tooling installation steps, E2B authentication setup, supported runtime versions or the installed Muse Code version. Its E2B SDK 2.43.0 minimum applies specifically to secret injection outside the sandbox, rather than being stated as a requirement for every example.

Mechanism

E2B creates a sandbox from the muse template, where Muse Code is already installed. The CLI or SDK launches the agent inside that environment, and SDK command calls return output that the surrounding application can inspect.

With --yolo, Muse Code trusts the workspace, skips approval prompts and disables its own operating-system sandbox. The page states that E2B isolates it from the host machine, while internet access remains enabled by default. Outbound controls include allowInternetAccess and hostname or CIDR allow/deny lists; hostname rules cover HTTP(S), while other protocols require CIDR rules.

Setup

For interactive use, the guide gives e2b sbx create muse, followed by muse inside the sandbox. For SDK-driven execution, its examples create a sandbox from muse, pass META_API_KEY through envs, run muse exec --yolo with a task, read standard output and call sandbox.kill().

For a custom environment, the examples derive a template using fromTemplate('muse') in TypeScript or from_template('muse') in Python, then build it as my-muse. The illustrated allocation is two CPUs and 2048 MB of memory; the page does not identify these values as minimum requirements.

Example

The smallest SDK example asks Muse Code to create a hello-world HTTP server in Go. It prints the command's standard output and ends the sandbox, but includes no resulting server code or evidence that the server works.

The repository example creates a sandbox with a ten-minute timeout, clones into /home/user/repo, asks the agent to add error handling to all API endpoints, streams output and prints git diff before cleanup. It does not show a resulting patch, tests, a commit or a push.

Assessment & evidence

Limitations

Host isolation does not make credentials placed inside the sandbox unreadable. The page explicitly states that values passed through envs can be read by any code in the sandbox. Its examples use that mechanism for META_API_KEY.

The page recommends E2B Secrets when a tool's API accepts a key through a request header, with injection occurring outside the sandbox. It does not demonstrate that configuration for Muse Code, so a direct replacement for the environment-variable example is not established.

Default internet access permits outbound requests unless restricted. The page provides no detailed isolation architecture, event schema, failure-handling strategy, code-quality results or assessment of long-running tasks.

Reasoning

The pre-built template is the practical benefit: developers can start with Muse Code installed and derive a custom template when dependencies or configuration differ. The SDK examples also show how a larger application can launch a coding task and collect its output.

For unattended use, the documented approach places isolation responsibility on E2B while giving the agent broad authority inside the sandbox. Its suitability therefore depends on acceptable outbound access, credential exposure and review of generated changes. The page supports this integration approach without establishing production reliability.

Alternatives

Within the guide, interactive CLI use is an alternative to SDK-driven unattended execution. The pre-built muse template provides the documented starting environment, while a derived template accommodates additional dependencies or configuration.

The page does not compare other coding agents, local execution or other sandbox providers. Relative cost, capability, security and setup effort are not assessed.

Evidence

The evidence is the complete E2B documentation page at [https://docs.e2b.dev/agents/muse.md]. It contains CLI instructions, JavaScript/TypeScript and Python examples, credential and network notices, custom-template instructions and related links.

This is provider documentation describing intended use. It contains no execution logs, completed code changes, benchmarks or independent security findings. Linked documentation and Meta product pages are outside the available evidence, and none of the commands or examples were executed.

Access & freshness

Costs

The page supplies no E2B prices, Meta Model API rates, free-tier allowances or worked cost estimates. Total operating cost and any separate template-build charges are unknown.

The example timeout and model-step limit provide execution controls, but the page does not establish a monetary spending cap or explain their billing effects.

Rights

The page includes no licence or commercial-use terms for the documentation, example code, Muse Code or the muse template. Permission to modify or redistribute these materials is not established by the supplied evidence.

The terms governing E2B services and Meta Model API use are also unknown from this page.

Freshness

The available page snapshot was captured on 25 November 2026 at 17:48:54.929 UTC. The page provides no publication date, last-update date, exact Muse Code build or pinned muse template revision.

The stated E2B SDK 2.43.0 threshold concerns external secret injection. It does not establish the current SDK release or confirm compatibility across unspecified versions.

Actions

Start with a small coding task whose changes are easy to review. For unattended execution, configure outbound access deliberately, set an appropriate timeout and model-step limit, and inspect git diff before accepting changes.

Treat environment-variable credentials as readable inside the sandbox. Confirm whether Muse Code supports a credential path compatible with external secret injection before relying on that feature. Preserve required outputs before ending the sandbox, and confirm current versions, service costs and usage terms before adopting the integration.

Evidence for this report

selected-page.txtselected · checked 2026-11-25