Skip to main content
Blaxel Sandboxes are fast-launching compute runtimes in which coding agents can securely execute code and manage files, with ~25ms cold-starts and automatic hibernation when idle. You can use Morph’s fast apply model to update files in a sandbox’s filesystem with near-instant response times through agentic tool calls, leveraging the Morph integration within the sandbox’s MCP server.

Why Blaxel + Morph?

  • Speed: Blaxel’s 25-ms cold-starts rank among the lowest in serverless sandbox environments, which when combined with Morph’s blazing-fast applies makes for a near-instant user experience.
  • Security: Your code that gets created by Morph should never be accessed by someone else, and microVM-based sandboxes ensure the highest level of isolation
  • Price: Only pay for real usage and never more: tokens generated and sandbox active runtime

Quick Setup

  • Create a Morph API key to connect to your Morph workspace from the sandboxes
  • Create your first Blaxel sandbox programmatically, making sure to pass the MORPH_API_KEY and MORPH_MODEL (default = morph-v3-large)

Use the fast apply

Blaxel sandboxes have an MCP server for accessing the file system and processes via tool calls. Morph’s fast apply is accessible exclusively through this MCP server, via the tool codegenEditFile. Use Blaxel SDK to retrieve this tool and others in any compatible agent framework (here in AI SDK format for TS, LangGraph for Python) by first installing the SDK adapters:
And running the following code to retrieve the fast apply tool as well as others to operate the sandbox. Call the codegenEditFile tool to fast-apply a targeted edit to a specified file, with instructions and partial contents.