Introducing Infinibranch
Infinibranch is a new distributed cloud computer runtime that fundamentally reimagines cloud infrastructure for the age of AI. By solving the core challenge of separating storage and compute for entire VMs, we've created an environment that offers:
- <250 ms startup times
- Fully OCI Compatible, run any docker container (and any docker-in-docker workload) on MorphVMs
- Instantaneous snapshot, branching, and restore
- Instantaneous deployment of applications to custom DNSes
- A built-in remote desktop that can be used through a browser or embedded in web apps to observe, interact with, or debug your agentic application.
How is Infinibranch Different?
Traditional VM Infrastructure:
- Startup Times: 2-3 minutes for typical VMs
- Copying: Full clone required, consuming equal resources
- Branching: Not natively supported
- State Management: Manual snapshots and restores
Infinibranch:
- Startup Times: <250ms
- Copying: Near-zero overhead branching
- Branching: Native support for unlimited parallel branches
- State Management: Instant snapshots and restores at any point
- Remote Desktop: Built-in browser-based access
Security Built for Branching
Infinibranch introduces branch-level security - a method for securing branched environments inspired by row-level security in modern databases. This allows granular access control and isolation at the branch level, ensuring that even in massive parallel executions, each branch — and the agents permissioned on them — maintains strict security boundaries.
Simple, Usage-Based Pricing
We believe pricing should be as straightforward as our API. Infinibranch follows a simple usage-based model - you only pay for the compute and storage you use, whether it's on a single instance or across thousands of branches created with near-zero storage overhead. API and Client Libraries
MorphVMs are accessible through our API at cloud.morph.so for Morph Cloud customers. We also provide Python and Typescript libraries.
Getting Started
morphcloud
Python PackageMORPH_API_KEY
set in your environment
A small example
from morphcloud import Runtime
Initialize a runtime with a Python base image
runtime = Runtime.create(
docker_image="python:3.11-slim"
)
Create a simple number guessing game that we'll use to demonstrate branching
runtime.exec("""
cat <<EOF > example.py
import random
secret_number = random.randint(1, 16)
guess = int(input("Guess a number between 1 and 16: "))
if guess == secret_number:
print("Win")
else:
print("Lose")
""")
# Run the initial script to set up the game
runtime.exec("python3 example.py")
# Create 16 parallel branches to try all possible numbers simultaneously
clones = runtime.clone(16)
answer = None
# Try each number in parallel across all branches
for i in range(1, 16):
output = clones.exec(f"{i}")
if "Win" in output:
print(f"The secret number is {i}")
answer = i
# Verify our answer in the original runtime
output = runtime.exec(f"{answer}")
print(output)
Instant Code Interpreter Let’s start by doing something really simple, running a python code interpreter Running a Python Shell
from morphcloud import Runtime
runtme = Runtime.create(
docker_image="python:3.11-slim"
)
shell = runtime.runc_shell()
shell.exec('print("hello world!")')
Installing packages
runtime.exec("pip install -y numpy")
# Save this for later
snapshot_id = runtime.snapshot(
name="numpy-py-3.11"
)
Starting from a Snapshot
runtime = Runtime.create(
snapshot_name="numpy-py-3.11"
) # 150 ms startup time
Branching Web Service
The first thing we’re going to do is start a morphvm runtime using the python library and expose a webserver.
from morphcloud import Runtime
runtme = Runtime.create(
docker_image="nginx"
ports=[{
"name": "web",
"port": "80"
}]
)
# server is available at:
# web.morphvm-1234.cloud.morph.so
Now that we have our basic web server up and running, let's explore how we can customize the content. We'll use the runtime.exec() method to modify the HTML file directly on the server. This allows us to make quick changes without needing to rebuild or redeploy our container.
runtime.exec("""
cat << 'EOF' > /usr/share/nginx/html/index.html
<!DOCTYPE html>
<html>
<head>
<title>Morph Page</title>
</head>
<body>
<div class="container">
<h1>Hello world!</h1>
</div>
</body>
</html>
EOF""")
Cloning this service
Now that we've created our initial service, let's explore how to clone it. Cloning a service in Morph Cloud allows you to create an exact copy of an existing runtime, including all its configurations and data. This feature is particularly useful when you want to create multiple instances of a service, test modifications without affecting the original, or quickly scale your application.
clone = runtime.clone()
clone.exec("""
cat << 'EOF' > /usr/share/nginx/html/index.html
<!DOCTYPE html>
<html>
<head>
<title>Morph Page</title>
</head>
<body>
<div class="container">
<h1>Hello worlds!</h1>
</div>
</body>
</html>
EOF""")
# new server is available at:
# web.morphvm-5678.cloud.morph.so
Restoring the service Morph Cloud allows you to easily restore a runtime to a previous state. This feature is particularly useful for debugging, testing different configurations, or quickly reverting changes. To restore a runtime, you can use the following code snippet:
Assuming runtime
is your existing Runtime object
snapshot = runtime.snapshot() # Create a snapshot of the current state
# Make some changes to the runtime...
# Restore to the previous state
runtime.restore(snapshot)
Early Access Preview
Get access by signing up here: !LINK!