Skip to main content

Coding agents

Prime Agent

Run Prime Intellect's Prime Agent in an E2B sandbox. It has no approval prompts, so the model-generated Python and commands it runs stay off your machine.

Maintained by
E2B
How it works
Prebuilt prime template
Template
prime
Language
TypeScript, Python

Set it up

Get started

Paste the prompt into your coding agent, or follow the steps yourself.

Paste this into your coding agent

Run Prime Agent in an E2B sandbox from this project.

  1. 1.Install the e2b package using the project's package manager.
  2. 2.The SDK needs the E2B_API_KEY environment variable. If it isn't set, ask me for my API key from https://console.e2b.dev/?tab=keys. Never hardcode it.
  3. 3.Follow the Prime Agent guide at https://docs.e2b.dev/agents/prime: create a sandbox from the prime template, pass my model provider key as a sandbox env, and run prime-agent -p with a task.
  4. 4.Run it once, show me the output that came from the sandbox, then kill the sandbox.

Or set it up yourself

  1. 1. Install the E2B SDK

    pip install e2b
  2. 2. Set your API keys

    export E2B_API_KEY="e2b_..."
    export ANTHROPIC_API_KEY="..."
  3. 3. Run Prime Agent headless

    import os
    from e2b import Sandbox
    
    sandbox = Sandbox.create("prime", envs={
        "ANTHROPIC_API_KEY": os.environ["ANTHROPIC_API_KEY"],
    })
    
    result = sandbox.commands.run(
        'prime-agent -p "Create a hello world HTTP server in Go"',
    )
    
    print(result.stdout)
    sandbox.kill()
  4. 4. Or open it interactively

    e2b sbx create prime
    prime-agent

Security

What runs in the sandbox

Prime Agent runs with the permissions of its user, so it runs in a sandbox instead of on your machine.

  • CodeModel-generated Python and project commands, run without approval prompts inside the sandbox.
  • StateSessions are saved to disk behind a background daemon. -⁠c continues the latest one and -⁠r resumes a specific one.
  • SecretsProvider keys such as ANTHROPIC_API_KEY go in as sandbox envs. Your host files and credentials stay out of reach.
  • NetworkSandboxes reach the internet by default. Restrict outbound traffic with allow and deny rules by CIDR or hostname.

3B+ sandboxes started

Give every agent a machine