Flue 2.0 — Introducing Agent Hooks API

The Open Agent Framework

Build durable AI agents with Flue's programmable TypeScript harness. Write once, deploy anywhere, use any LLM.

agents/triage.ts
'use agent';
import { useModel, usePersistentState, useSandbox, useSkill, useTool } from '@flue/runtime';
import { local } from '@flue/runtime/node';
import triage from '../skills/triage/SKILL.md';

// This is an agent.
export function IssueTriage() {
  // Define your agent with hooks.
  // Dynamically attach capabilities to your agent.
  useModel('anthropic/claude-sonnet-5-0');
  useSkill(triage);
  // Store persistent data on each agent.
  // Update your agent capabilities as state evolves.
  const [isSandbox, setSandbox] = usePersistentState('isSandbox', false);
  useTool({name: 'handoff', description: '...', run: () => setSandbox(true)});
  if (isSandbox) useSandbox(local());
  // Return your agent instructions. Flue handles the rest.
  return `Triage the bug report end-to-end...`;
}

Powered by Pi, the open agent harness.

Flue is powered by Pi, the trusted agent harness used by OpenClaw and millions worldwide. Pi gives you the tools you need to unlock real agent autonomy, moving beyond simple chatbots.

Pi is the core of our open tech stack including Durable Streams, Vite, and a flexible Sandbox API. Deploy Flue anywhere with confidence.

Flue agent architectureAn isometric agent harness powered by Pi, stacked above the Flue runtime.RUNTIMESANDBOX · DATABASE · DEPLOYMENTHARNESSSESSIONS · TOOLS · SKILLS

Durability. Recovery. It's all handled for you.

Agents can’t die when the server goes down. Flue records every session in a durable stream, then safely resumes interrupted work when the runtime comes back online. Run one agent or a multi-agent swarm on the same durable foundation.

  • Accepted work is never lost
  • Interrupted sessions resume automatically
  • Clients reconnect without starting over
0 agents online

Bring the stack you already love.

Explore our ecosystem
  • Image
  • Image
  • Image
  • Image
  • Image
  • Image
  • Image
  • Image
  • Image
  • Image
  • Image
  • Image