flue

2 posts

cloudflare

How we built a software factory to drive Astro’s GitHub issue count to zero (opens in new tab)

AI-powered software factories can address a pressing open-source problem: maintainers are overwhelmed by the flood of AI-generated issues, pull requests, and security reports. The Astro team built an automated triage pipeline that reproduces bugs, diagnoses causes, creates fixes, and ships preview releases for verification. After several months, it reduced Astro’s open issues from more than 200 to roughly 30 without mass-closing or ignoring reports. ## Building an Issue-Triage Skill - The team began by automating issue triage, one of the most time-consuming parts of open-source maintenance. - The workflow mirrors manual debugging: - **Reproduce:** Clone the reporter’s reproduction repository and confirm the problem. - **Diagnose:** Instrument the code and add logging to identify the root cause. - **Verify:** Check tests, documentation, and comments to determine whether the behavior is actually a bug. - **Fix:** Turn the reproduction into failing tests, implement a solution, and deploy it. - Each phase runs in an isolated AI subagent to reduce the tendency to force a solution. - Subagents communicate through a sequential `report.md` file containing their findings. ## Running the Pipeline in GitHub Actions - The workflow is driven by GitHub issue labels rather than a separate internal database. - New issues begin with `triage needed`; verified fixes eventually move to `fix verified`. - The pipeline reconstructs its state from labels and existing issue comments. - When a fix is ready, it: - Creates a preview release using `pkg.pr.new`. - Posts the diagnosis, logs, and installation instructions to the issue. - Lets the original reporter test the patch. - Opens a linked pull request after confirmation. ## From a Repository Workflow to Flue - The team recognized that the process was not inherently tied to GitHub. - Its core structure consists of: - An external event. - A sequence of isolated subagents. - Separate reasoning and execution permissions. - Durable workflow state. - This generalization became **Flue**, an open, platform-agnostic framework for agent workflows that can respond to GitHub events, Slack messages, cron jobs, or webhooks. ## Effects on Maintainer and Community Work - Automation did not make the Astro team less connected to users. - Instead, it freed maintainers to spend more time: - Engaging with the community in Discord. - Participating in RFCs and feature discussions. - Collaborating with contributors. - The system is designed to resolve most incoming issues, while failures are treated as signals that the codebase needs improvement. ## Using Agent Failures to Improve the Codebase Agent mistakes often reveal problems that would also challenge human developers: - **Opaque abstractions:** Component boundaries are unclear. - **Missing documentation:** Important implementation decisions are unexplained. - **Insufficient testing:** Critical behavior lacks adequate unit tests. - For example, the bot repeatedly changed an HMR-related condition and caused regressions because the logic was poorly documented and under-tested. - Adding a precise comment clarified the intended behavior, after which the bot stopped making the same incorrect change. - Fixing these weaknesses improves both future automation and human maintainability. ## Extracting the Workflow into a GitHub Action - Initially, the triage system was embedded in the Astro monorepo, making changes risky and difficult to test. - The team separated it into the standalone `triagebot-action` repository. - This enabled independent testing and safer updates to Flue and the workflow. - The action now supports Astro and has been adopted or forked by other teams building their own automated development pipelines. The practical lesson is to start with a narrow, repeatable maintenance task, isolate agent responsibilities, make all reasoning auditable, and use failures to improve documentation, architecture, and tests.

cloudflare

Bringing more agent harnesses to Cloudflare, starting with Flue (opens in new tab)

Cloudflare argues that production AI agents need more than an agent harness: they require platform primitives for durable state, execution, storage, and secure compute. It presents a three-layer stack—framework, harness, and runtime—and introduces Flue as the first framework built on the Cloudflare Agents SDK. Flue uses a declarative approach based on Pi, while Cloudflare supplies the infrastructure needed to resume interrupted work and run agents reliably at scale. ## The Three-Layer Agent Stack - **Framework — Flue** - Provides project structure, conventions, integrations, CLI commands, and developer experience. - **Harness — Pi or Project Think** - Runs the agentic loop: calls tools, processes results, manages context, and continues until a task is complete. - **Runtime/platform — Cloudflare Agents SDK** - Supplies compute, state, storage, durable execution, sandboxing, and workflow primitives. - Cloudflare’s goal is to make these runtime capabilities available to any harness or framework. ## Flue’s Declarative Agent Model - Flue 1.0 Beta is built on the Pi harness, which also powers OpenClaw. - Developers describe what an agent knows rather than explicitly scripting its orchestration. - An agent is defined through its: - Model - Skills - Sandbox - Instructions - This allows relatively compact agents to autonomously handle tasks such as reproducing and diagnosing bug reports. ## Flue’s Developer Experience - **Integrated channels** - Preconfigured integrations let agents work in Slack, GitHub, Linear, and Discord. - Channels handle event verification and dispatch boilerplate. - **Headless and UI-ready operation** - Agents can run as background processes. - `@flue/react` provides hooks for streaming agent state, tool execution, and messages into frontend applications. - **Ecosystem integrations** - Commands such as `flue add channel slack` generate Markdown blueprints that coding agents can modify and integrate into a project. ## Durable Execution with Durable Streams - Production agents face host crashes, LLM API timeouts, restarts, and interrupted tool calls. - Flue records prompts, tool responses, model decisions, and other execution events in an append-only log. - This durable event history prevents in-memory state from being lost. - If a process fails, another process can replay the log and resume from the exact point of interruption. ## Deployment Across Clouds - On Node.js, Flue agents run as long-lived processes on VMs, containers, GitHub Actions, or existing servers. - On Cloudflare, each agent runs in its own Durable Object. - This provides: - Isolated storage and compute - Automatic scaling - No need to provision servers or manage sticky sessions - Protection from noisy neighbors - Cloudflare deployments use Agents SDK features including `runFiber()`, `stash()`, and `onFiberRecovered()` for durable execution. - Sandboxed code execution uses `@cloudflare/codemode` and `@cloudflare/shell` with a durable workspace. ## Requirements for Production Agent Harnesses - An agent turn is a multi-step process that may involve token streaming, tool calls, human approval, or delegated subagents. - These operations can last seconds or minutes and may fail at any point. - Persisting only conversation history is insufficient because it does not preserve active execution state, pending tool calls, or the agent’s current position. - Cloudflare’s fiber-based primitives provide checkpointing so interrupted agent turns can recover instead of leaving users with stalled requests. Cloudflare’s recommendation is to treat the framework, harness, and runtime as separate but coordinated layers. Frameworks like Flue make agents easy to build, while the Agents SDK supplies the durable execution and infrastructure primitives required to operate them reliably in production.