Launch HN: Freestyle – Sandboxes for Coding Agents
TL;DR Highlight
Sandbox infrastructure designed to allow AI coding agents to run tens of thousands of VMs concurrently, with core features including VM startup within 700ms, forking (cloning) of running VMs, and Pause/Resume functionality.
Who Should Read
Engineers developing services where AI directly generates and executes code, such as Devin, Cursor Agent, Lovable, and Bolt, or backend developers operating AI code review bots or test automation in CI/CD.
Core Mechanics
- Freestyle is a VM Sandbox service dedicated to AI coding agents, providing an immediate startup time of under 700ms from API request to VM readiness.
- The most differentiating feature is 'Live Forking,' which allows you to clone a running VM entirely without stopping it. For example, you can fork a single VM into three and assign 'API endpoint implementation,' 'frontend UI implementation,' and 'test suite writing' to the AI in parallel.
- Pause & Resume functionality allows you to pause a VM, resulting in zero cost, and resume it exactly where it left off when the next execution request arrives. With a `idleTimeoutSeconds: 60` setting in the code example, it automatically pauses after 60 seconds of inactivity.
- Unlike competing services that only fork the filesystem, Freestyle explicitly states that it forks the entire VM memory (RAM state). This enables agents to explore multiple directions from an intermediate execution state (branch-and-explore).
- It also includes built-in Git repository management, allowing agents to store generated code in Freestyle's own Git repo, synchronize bidirectionally with GitHub, and configure Webhooks with fine-grained control by branch, path, and event type.
- In a code review bot use case, `bun run lint` and `bun test` are executed in the VM, after which the AI reviews the diff and automatically posts 'REQUEST_CHANGES' or 'APPROVE' to the GitHub PR depending on test failures.
- The infrastructure is built on top of its own bare-metal servers to reduce cloud virtualization overhead and supports low-level network features like eBPF and XDP. It was stated that the Sandbox is isolated outside the main VPC for security.
- The JS Sandbox API was already available, and this launch adds a full VM-based Sandbox. It natively supports Node.js/Bun runtimes and automatic execution of development servers (`bun run dev`).
Evidence
- The most interest was in the memory forking feature. One comment stated that forking the entire VM memory during runtime is a different approach than competitors copying only the filesystem, and expressed hope that if implemented with Copy-on-Write, the complexity would be O(1) and costs would not increase regardless of machine size.
- There was a comment from a team operating thousands of Sandboxes on Azure, GCP, and AWS using standard VMs, who were unclear what Freestyle offers compared to standard VMs. A key question was whether the forking feature requires the agent code to be modified to recognize forking, or if it operates transparently.
- Several comments requested comparisons with competitors. E2B, Daytona, Modal, Blaxel, Vercel, Cloudflare, and Fly Sprites were mentioned, and there were many requests for a price and performance comparison matrix.
- There was criticism that the 50 concurrent VM limit is low. A team that built a similar service in-house shared that maintaining a warm pool of Firecracker VMs allows for immediate Sandbox provisioning without boot time.
- The lack of Windows support was mentioned. Currently, all Sandbox platforms, including Freestyle, are Linux-only, creating a gap for automating enterprise software (ERP, etc.) workflows that require Windows.
How to Apply
- When creating services that automatically generate apps with AI, like Lovable, Bolt, and V0, you can create a template repo with `freestyle.git.repos.create()` and set up `VmDevServer` to configure an environment where the development server automatically starts as soon as the AI generates code, all through API calls.
- When you want to process a single task in parallel, like with Devin and Cursor Agent, you can clone the running VM with `vm.fork({ count: 3 })` and assign different tasks to each fork simultaneously using `Promise.all` to significantly reduce the overall task time.
- When adding an AI code review bot to a GitHub PR, you can generate an AI review based on the results of running `vm.exec('bun run lint')` and `vm.exec('bun test')` in the VM, and then conditionally post 'REQUEST_CHANGES' if the tests fail, creating a CI-integrable automated review pipeline.
- When operating an AI coding assistant that interacts with users, setting `persistence: { type: 'persistent' }` and `idleTimeoutSeconds: 60` will eliminate costs during idle periods between conversations and automatically resume the VM in its previous state when the next message arrives, minimizing costs while maintaining session state.
Code Example
// Parallel agent forking example (Devin, Cursor Agent style)
import { freestyle } from "freestyle-sandboxes";
import { VmBun } from "@freestyle-sh/with-bun";
const { vm } = await freestyle.vms.create({
git: {
repos: [
{ repo: "https://github.com/user/repo.git" },
]
}
});
// Clone the running VM into 3 copies
const { forks } = await vm.fork({ count: 3 });
// Assign different tasks to each fork in parallel
await Promise.all([
ai(forks[0], "Build the API endpoints"),
ai(forks[1], "Build the frontend UI"),
ai(forks[2], "Write the test suite"),
]);
// AI code review bot example
const { stdout: lint } = await vm.exec("bun run lint");
const { stdout: test } = await vm.exec("bun test");
const review = await ai(vm, "Review the diff for bugs");
await github.pulls.createReview({
body: review,
event: test.includes("FAIL") ? "REQUEST_CHANGES" : "APPROVE",
});
// Persistent VM + automatic Pause example
const { vm: persistentVm } = await freestyle.vms.create({
persistence: { type: "persistent" },
idleTimeoutSeconds: 60, // Automatically pauses after 60 seconds of inactivity, cost 0
});
while (true) {
const userMessage = await getNextMessage();
const result = await ai(persistentVm, userMessage);
await respond(result);
}Terminology
Related Papers
OfficeCLI: Office suite for AI agents to read and edit Microsoft Office files
AI 에이전트가 Microsoft Office 파일을 읽고 편집할 수 있도록 만들어진 오픈소스 CLI 도구로, Office 설치 없이 단일 바이너리만으로 동작한다.
Reasoning effort, not tool access, buys first-try reliability in agentic code generation: an observational study
Claude Code로 90번 반복 실험한 결과, Playwright 같은 테스트 도구는 비용만 올리고 실패율엔 무효였으며 xHigh reasoning effort가 첫 시도 완성률을 28%→89%로 끌어올렸다.
Show HN: ctx – Search the coding agent history already on your machine
Claude Code, Cursor, Codex 등 코딩 에이전트가 이전 세션의 논의·결정·실패 시도를 잊지 않도록 SQLite로 인덱싱해 재사용할 수 있게 해주는 오픈소스 CLI 도구다.
OpenWiki: CLI that writes and maintains agent documentation for your codebase
LangChain이 만든 CLI 도구로, AI 에이전트가 코드베이스를 이해하는 데 필요한 문서를 자동으로 생성하고 최신 상태로 유지해준다. 코딩 에이전트(Copilot, Claude 등)의 컨텍스트 품질을 높이고 싶은 개발자에게 유용하다.
Micro-Agent: Beat Frontier Models with Collaboration Inside Model API
vLLM 팀이 단일 모델 API 호출 뒤에서 여러 모델이 협업하는 'Micro-Agent' 개념을 공개했습니다. 별도의 에이전트 코드 없이 라우터 레이어에서 모델 조합을 실행해 GPT-4급 결과를 더 저렴하게 낼 수 있다는 아이디어입니다.
Ornith-1.0: self-improving open-source models for agentic coding
Gemma 4와 Qwen 3.5를 기반으로 파인튜닝한 코딩 특화 오픈소스 모델로, RL(강화학습)을 통해 스캐폴드(에이전트 실행 구조)까지 함께 최적화하는 방식을 주장하지만, 커뮤니티에서는 벤치마크 과최적화에 불과하다는 의심을 받고 있다.