The Sandbox Agent Framework

Build powerful AI agents with Flue's programmable TypeScript agent harness. Write once, deploy anywhere.

Get Started
agents/triage.ts
export default async function ({ init, payload, env }) {
  // Initialize a new agent session, or resume an existing one.
  // By default, Flue spins up a lightweight virtual sandbox + filesystem.
  const session = await init();

  // Leverage agent skills as typed, reusable LLM calls with structured output:
  const triage = await session.skill('triage', {
    args: { issueNumber: payload.issueNumber },
    result: v.object({ summary: v.string(), fixApplied: v.boolean() }),
  });

  // Keep absolute, deterministic control over the most critical decisions:
  if (triage.fixApplied) {
    await session.shell(`git add -A && git commit -m "fix: ${triage.summary}"`);
  }

  // Run any CLI tool in the agent's sandbox (git, gh, curl, ...):
  const comment = await session.prompt('Write a GitHub comment summarizing the triage.');
  await session.shell(`gh issue comment ${payload.issueNumber} --body-file -`, { stdin: comment });
}

The Universal Agent

A Sandbox Agent is the most powerful form of AI agent. The pattern pairs an agent harness (like Claude Code or pi) with a dedicated workspace for the agent that includes an isolated filesystem, bash, and all of the agent context required to complete its task.

We believe every agent should have a sandbox. Historically, the sandbox pattern was too slow and expensive to use in most situations. But recent advances in microVMs and in-process virtualization have made sandboxes fast and cheap enough to run everywhere — even in high-traffic scenarios like customer support and search. It's time to embrace the shift.

Flue is the agent framework designed for sandbox agents. Prompt the LLM, call skills, navigate the file tree, delegate tasks, and run bash commands — all inside a secure virtualized sandbox or proper container that you control.

When you're ready to ship, Flue builds and bundles your agents into an HTTP server bundle that you can deploy anywhere. Or, skip the build and run your agents locally, perfect for automating CI workflows.

The Sandbox Agent

04 / Filesystem read · write · grep · glob
03 / Context skills · roles · AGENTS.md
02 / Sandbox bash · security · network
01 / Harness intelligence · tools · memory

Build your own customer support agent in 11 lines of TypeScript.

Replaces

Intercom AIZendesk AIAda

Stop renting someone else's agent. Off-the-shelf AI tools are built for a general audience and struggle to fit to your product, your data, your customers, or your exact workflows.

Flue gives you the building blocks to build smarter agents with an intuitive, programmable interface. You own the entire stack: the agent, the harness, and the sandbox itself. Connect it all together and start building a more powerful, autonomous agent.

// Built for: Cloudflare
import { getVirtualSandbox } from '@flue/sdk/cloudflare';
import type { FlueContext } from '@flue/sdk/client';

// POST /agents/support/:id
export const triggers = { webhook: true };

export default async function ({ init, payload, env }: FlueContext) {
  // Mount a bucket as your agent's filesystem in a virtual sandbox.
  // The agent can grep, glob, and read from the knowledge base with 
  // bash, without the need of a traditional, expensive container.
  const sandbox = await getVirtualSandbox(env.KNOWLEDGE_BASE);
  const session = await init({ sandbox });
  // Prompt! The agent harness includes your workspace AGENTS.md,
  // skills, and roles (aka subagents) to complete your task as 
  // desired. Use `session.skill()` to call a skill directly.
  return await session.prompt(
    `Respond to this customer message: ${payload.message}`,
    { role: 'support-agent' },
  );
}

Deploy Anywhere

GitHub Actions
GitLab CI/CD
Cloudflare Workers
Node.js