- Standardization: Define tools, binaries, and configurations your AI agent needs at runtime.
- Consistency: Ensure reproducible AI behavior across Devboxes.
- Efficiency: Reduce Devbox startup time by pre-installing tools.
- Customization: Tailor environments to specific AI-assisted development needs.
When should I use a Blueprint vs. a Snapshot?Snapshots and Blueprints both allow you to run devboxes with customizations. Blueprints are built programmatically and are cacheable using Docker layers, while Snapshots can be created quickly from an existing devbox.Examples:
- Blueprint: You have a coding agent that is performing a task that requires installing a specific tool. Create a Blueprint with set-up steps for the tool. All Devboxes you launch from that Blueprint will have the environment already set up, and will not incur installation or setup time.
- Snapshot: You have a coding agent in a devbox considering 3 different ways to complete a task. Create a snapshot of the initial state of the devbox, create 3 parallel devboxes from that snapshot, collate the results, and then choose the best option to continue.
Quick Start: Create a Blueprint from a Local Dockerfile
If you already have a Dockerfile for your development environment, you can quickly convert it into a Runloop blueprint using the CLI:COPY and ADD instructions in your Dockerfile.
Once complete, create a devbox from the blueprint:
Creating a Blueprint
One use case for a blueprint is preinstalling tools your AI agent may want to use. For example, let’s create a simple Blueprint that installsjq, a lightweight command-line JSON processor:
Use the Debian package manager (apt) for installing system packages on the Runloop base image.
The Blueprint Build Process
When you create a Blueprint, Runloop builds a custom image containing all of your specified tools and configurations. Thestatus field indicates the current state of your Blueprint:
build_complete: Blueprint is ready to usebuild_failed: Refer to the Blueprint troubleshooting guidequeued: Blueprint is in the queue and will start processing as soon as resources are available. If there are more than 32 builds, additional builds will be queued, up to a maximum queue length of 2000.
Checking Build Status
After creating a Blueprint, check its build status:Best Practices
- Start Simple: Begin with basic Blueprints and gradually add complexity.
- Test Manually Using SSH: You can create a devbox and SSH into it and manually install tools to make sure the commands are correct before layering them into Blueprints.
- Lookup Blueprints via
blueprint_nameinstead ofblueprint_idto ensure you are using the latest version for a particular name. Use specific Blueprint IDs only when you need version control for particular setups. - Implement
setup_commandsin your Devbox creation to keep code and dependencies up-to-date. - Regularly update your Blueprints with the latest repository changes.
- Delete unused / deprecated Blueprints.
Next Steps
- Add files and build context - Learn about build contexts, object mounts, code mounts, and file mounts
- Customize with Dockerfiles - Use custom Dockerfiles, secrets, and composable blueprints
- Configure network policies - Restrict network access during build and runtime
- Manage blueprint lifecycle - Delete blueprints and configure launch parameters
