The Agent Harness Framework

Not another SDK. Build powerful, autonomous agents with Flue's programmable TypeScript harness. Write once, deploy anywhere.

View README.md
agents/triage.ts
export default async function ({ init, payload, env }) {
  // Initialize a new agent. 
  // Provide a hosted sandbox, or use Flue's built-in virtual sandbox.
  const agent = await init({ model: 'anthropic/claude-sonnet-4-6' });
  const session = await agent.session();

  // Call skills as reusable workflows with structured output:
  const triage = await session.skill('triage', {
    args: { issueNumber: payload.issueNumber },
    result: v.object({ fixApplied: v.boolean() }),
  });

  // Keep track of work in the session, just like Claude Code or Codex:
  const comment = await session.prompt('Write a GitHub comment summarizing the triage.');

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

  // Protect your sensitive tokens and API keys with fine-grained control:
  await session.shell(`gh issue comment ${Number(payload.issueNumber)} --body-file -`, { 
    stdin: comment,
    env: { GITHUB_TOKEN: env.GITHUB_TOKEN },
  });
}

Agent = Model + Harness

It's the architecture that makes coding agents like Claude Code and Codex so powerful. They can plan, gather context, write files, spawn subagents, adopt roles, and problem-solve. These agents are more than just chatbots. Why isnt every agent built like this?

Flue is a framework for the next generation of agents. Flue's programmable agent harness is able to represent any autonomous agent or workflow, from simple chatbots to entire coding platforms. Connect your favorite remote sandbox, or use our built-in zero-config virtual sandbox to give your agent a place to work through any task.

When you're ready to ship, Flue bundles your agents into an HTTP server that you can deploy anywhere. Or skip the server and run your agents right from the CLI, perfect for local tasks and CI.

Modern Agent Architecture

04 / Filesystem read · write · grep · glob
03 / Sandbox bash · security · network
02 / Harness skills · memory · sessions
01 / Model tokens · tools · prompts

Build your own AI issue triage in 22 lines of TypeScript.

Replaces

DosuGreptileCodeRabbit

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.

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.

import type { FlueContext } from '@flue/sdk/client';
import { Octokit } from '@octokit/core';
import * as v from 'valibot';

// Triggered in CI via `flue run` CLI — no HTTP endpoint needed.
export const triggers = {};

// Built for: Node, GitHub Actions
export default async function ({ init, payload, env }: FlueContext) {
  const { issueNumber } = payload;
  const agent = await init({ model: 'anthropic/claude-opus-4-7' });
  const session = await agent.session();
  // Run the 'triage' skill to triage the GitHub issue.
  const triage = await session.skill('triage', {
    args: { issueNumber },
    result: v.object({
      severity: v.picklist(['low', 'medium', 'high', 'critical']),
      reproducible: v.boolean(),
      summary: v.string(),
    }),
  });
  // Post the triage result back to GitHub.
  // The agent/sandbox never sees your sensitive GITHUB_TOKEN.
  const body = `**Severity:** ${triage.severity}\n**Reproducible:** ${triage.reproducible}\n\n${triage.summary}`;
  await (new Octokit({ auth: env.GITHUB_TOKEN })).request(
    'POST /repos/{owner}/{repo}/issues/{num}/comments', 
    { owner: 'withastro', repo: 'flue', num: issueNumber, body },
  );
}

Deploy Anywhere

Node.js
Cloudflare Workers
GitHub Actions
GitLab CI/CD