Flue is a TypeScript framework for building the next generation of agents
Not another SDK. Build powerful, autonomous agents with Flue's programmable TypeScript harness. Write once, deploy anywhere.
agents/triage.ts flue run triage POST /agents/triage/:id 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.
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 }, ); }import type { FlueContext } from '@flue/sdk/client'; import { Bash, InMemoryFs, MountableFs, ReadWriteFs } from 'just-bash'; // POST /agents/data/:id export const triggers = { webhook: true }; // Built for: Node export default async function ({ init, payload }: FlueContext) { // Mount the current directory at /workspace, so the agent can read, // write, grep, and glob from your project files using bash. const fs = new MountableFs({ base: new InMemoryFs() }); fs.mount('/workspace', new ReadWriteFs({ root: process.cwd() })); // Create a custom virtual sandbox with 'just-bash'. Enable Python use // so the agent can write code to analyze data, generate reports, etc. const agent = await init({ sandbox: () => new Bash({ fs, cwd: '/workspace', python: true }), model: 'anthropic/claude-sonnet-4-6', }); const session = await agent.session(); // Prompt! The agent harness includes your workspace AGENTS.md, // skills, and roles (aka subagents) to analyze the data and // complete your task as desired. return await session.prompt( `Answer this user question: ${payload.message}`, { role: 'data-analyst' }, ); }import type { FlueContext } from '@flue/sdk/client'; import { Daytona } from '@daytona/sdk'; import { daytona } from '@flue/connectors/daytona'; // POST /agents/code/:id export const triggers = { webhook: true }; // Built for: Node, Daytona export default async function ({ init, payload, env }: FlueContext) { // Each agent gets a real container via Daytona. const client = new Daytona({ apiKey: env.DAYTONA_API_KEY }); const sandbox = await client.create(); const agent = await init({ sandbox: daytona(sandbox), model: 'openai/gpt-5.5' }); const session = await agent.session(); // Setup the sandbox (for illustrative purposes only). // In production, you'd want to bake setup into the container image, // or use a snapshot (if available from your sandbox provider). await session.shell(`git clone ${payload.repo} /workspace/project`); await session.shell('npm install', { cwd: '/workspace/project' }); return await session.prompt(payload.prompt); }import { getVirtualSandbox } from '@flue/sdk/cloudflare'; import type { FlueContext } from '@flue/sdk/client'; // POST /agents/support/:id export const triggers = { webhook: true }; // Built for: Cloudflare Workers, R2 export default async function ({ init, payload, env }: FlueContext) { // Mount your R2 bucket (declared as a binding in wrangler.jsonc) as // the agent's filesystem at /workspace, backed by Durable Object // SQLite + R2 under the hood. The agent searches it with bash — // grep, glob, read — without spinning up a container. const sandbox = await getVirtualSandbox(env.KNOWLEDGE_BASE_BUCKET); const agent = await init({ sandbox, model: 'openrouter/moonshotai/kimi-k2.6' }); const session = await agent.session(); // 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
Схожі новини
Halo Studios не остановится на одном ремейке: инсайдеры раскрыли планы на Halo 2 и Halo 3