Flue: A Programmable Agent Framework
Better Stackgo watch the original →
the gist
Flue is an open-source agent framework that wraps the Pi agent core to provide a programmable, headless harness for agents and workflows, featuring an in-memory virtual sandbox for low-cost execution.
The Breakthrough
Flue provides a programmable, headless agent harness that abstracts session management, tool registration, and sandboxing into a TypeScript-based configuration, allowing developers to deploy agentic workflows to Node.js or Cloudflare environments with minimal boilerplate.
Programmable Agent Harness
Flue functions as a wrapper around the Pi agent core, moving beyond the human-in-the-loop limitations of tools like Claude Code. It enables the creation of both interactive agents and automated, headless workflows. The framework uses a flue.config.ts file to manage deployment targets, supporting either Node.js via Hono or Cloudflare Workers with Durable Objects for state persistence. Developers define agents or workflows in separate directories, where they can export either an agent instance or a run function for complex, multi-step tasks.
In-Memory Sandboxing
To reduce overhead and costs, Flue utilizes Vercel's just-bash, an in-memory implementation of Bash written in TypeScript. This allows agents to execute common file-system operations like grep, glob, and file reads without the latency and cost of spinning up full Linux containers. For tasks requiring heavier compute or specific dependencies, developers can opt into real containerized sandboxes or register custom tools that execute local scripts while maintaining security boundaries.
Workflow Orchestration
Flue supports both HTTP and WebSocket interfaces for triggering workflows. By adding route middleware, developers can expose agents as API endpoints. The framework handles the lifecycle of these requests, providing unique workflow IDs and allowing for asynchronous polling of results. This architecture enables the deployment of scalable agent fleets that can be invoked via standard curl requests or integrated into larger backend systems.