{"owner":"withastro","repo":"flue","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# Flue\n\nFlue is a TypeScript framework for building autonomous AI agents and running them anywhere. An agent is a plain exported function: hooks in its body compose its capabilities — model (`useModel`), tools, skills, sandboxes, state — and its return value is its instruction. Agents live in durable conversations: accepted input survives crashes, restarts, and redeploys, and interrupted work recovers to a deterministic state. Applications build with Vite (the `flue()` plugin plus an explicit `app.ts` route map) and deploy to Node.js or Cloudflare Workers from the same source, with persistence adapters (SQLite, Postgres, MySQL, MongoDB, Redis, and more), channels that turn provider webhooks (Slack, GitHub, Telegram, ...) into agent conversations, and clients — the Flue Agent SDK (`@flue/sdk`), `@flue/react`, and the `flue` CLI — for driving conversations over HTTP or from code. The model layer is [Pi](https://pi.dev)'s provider protocol, used directly.\n\n## Contributing\n\nSee `CONTRIBUTING.md` for the full picture. In short:\n\n- **Bug reports** → https://github.com/withastro/flue/issues\n- **Feature requests** → https://github.com/withastro/flue/discussions\n- **Pull requests** are not accepted; they are automatically closed and converted into one of the two contribution types above.\n\n## Terminology\n\n```\nAgent                         — a capitalized, exported plain function; Flue Hooks in its body attach\n                                tools, instructions, and state, and its returned string is its\n                                instruction; the function name (or its `agentName` string-literal\n                                static) is the agent's durable identity\nAgent module                  — a source file whose first statement is the `'use agent'` directive;\n                                every capitalized exported function in it is an agent\n└─ AgentInstance              — URL `<id>`; the agent's durable identity, independent of authoring\n   └─ Harness                 — runtime-initialized agent environment; defaults to name `\"default\"`\n      └─ Session              — one `harness.session(name?)`; defaults to `\"default\"`\n         └─ Operation        — one `session.prompt` / `skill` / `task` / `shell` call\n            └─ Turn          — one LLM round-trip inside pi-agent-core\n```\n\nThere are no workflows or runs: conversations are the only durable unit, and a bounded code job is a tool with `harness: true`. Direct HTTP agent prompts and dispatched agent inputs operate within persistent sessions; `dispatch(...)` is identified by its `submissionId`.\n\nRouting is explicit: `app.ts` is the application's route map, mounting each HTTP-reachable agent (`app.route('/agents/<name>', createAgentRouter(AgentFn))`) and channel (`app.route('/channels/<x>', channel.route())`). Registration comes from the `'use agent'` scan, not from mounting.\n\nA blueprint is a Markdown implementation guide returned by `flue add`; its kind is `sandbox`, `database`, `channel`, or `tooling`.\n\n## Project Structure\n\n- `packages/runtime/` — Runtime library (`@flue/runtime`): sessions, agent harnesses, tools, sandbox plumbing, and the `/config` loader for `flue.config.ts`.\n- `packages/vite/` — The `flue()` Vite plugin (`@flue/vite`): `'use agent'` scan/transform, generated bootstraps, Node dev/build, and the Cloudflare target adapter.\n- `packages/cli/` — CLI (`@flue/cli`): `flue run` transport-free local execution, `init`, blueprint `add`/`update`, and offline `docs`.\n- `examples/` — Integration examples for channels, databases, sandboxes, and deployment targets.\n- `demo/` — Standalone Vite+React chat SPA that connects to any running Flue example server.\n- `apps/docs/` — The documentation site; its content is the source of truth for user-facing docs.\n\nNo tests exist in the repo.\n\n## Development\n\n```\npnpm install\npnpm build          # turbo build across the workspace\npnpm check:types    # typecheck (excludes apps-www)\npnpm format         # format your work\n```\n"},"files":{"AGENTS.md":"# Flue\n\nFlue is a TypeScript framework for building autonomous AI agents and running them anywhere. An agent is a plain exported function: hooks in its body compose its capabilities — model (`useModel`), tools, skills, sandboxes, state — and its return value is its instruction. Agents live in durable conversations: accepted input survives crashes, restarts, and redeploys, and interrupted work recovers to a deterministic state. Applications build with Vite (the `flue()` plugin plus an explicit `app.ts` route map) and deploy to Node.js or Cloudflare Workers from the same source, with persistence adapters (SQLite, Postgres, MySQL, MongoDB, Redis, and more), channels that turn provider webhooks (Slack, GitHub, Telegram, ...) into agent conversations, and clients — the Flue Agent SDK (`@flue/sdk`), `@flue/react`, and the `flue` CLI — for driving conversations over HTTP or from code. The model layer is [Pi](https://pi.dev)'s provider protocol, used directly.\n\n## Contributing\n\nSee `CONTRIBUTING.md` for the full picture. In short:\n\n- **Bug reports** → https://github.com/withastro/flue/issues\n- **Feature requests** → https://github.com/withastro/flue/discussions\n- **Pull requests** are not accepted; they are automatically closed and converted into one of the two contribution types above.\n\n## Terminology\n\n```\nAgent                         — a capitalized, exported plain function; Flue Hooks in its body attach\n                                tools, instructions, and state, and its returned string is its\n                                instruction; the function name (or its `agentName` string-literal\n                                static) is the agent's durable identity\nAgent module                  — a source file whose first statement is the `'use agent'` directive;\n                                every capitalized exported function in it is an agent\n└─ AgentInstance              — URL `<id>`; the agent's durable identity, independent of authoring\n   └─ Harness                 — runtime-initialized agent environment; defaults to name `\"default\"`\n      └─ Session              — one `harness.session(name?)`; defaults to `\"default\"`\n         └─ Operation        — one `session.prompt` / `skill` / `task` / `shell` call\n            └─ Turn          — one LLM round-trip inside pi-agent-core\n```\n\nThere are no workflows or runs: conversations are the only durable unit, and a bounded code job is a tool with `harness: true`. Direct HTTP agent prompts and dispatched agent inputs operate within persistent sessions; `dispatch(...)` is identified by its `submissionId`.\n\nRouting is explicit: `app.ts` is the application's route map, mounting each HTTP-reachable agent (`app.route('/agents/<name>', createAgentRouter(AgentFn))`) and channel (`app.route('/channels/<x>', channel.route())`). Registration comes from the `'use agent'` scan, not from mounting.\n\nA blueprint is a Markdown implementation guide returned by `flue add`; its kind is `sandbox`, `database`, `channel`, or `tooling`.\n\n## Project Structure\n\n- `packages/runtime/` — Runtime library (`@flue/runtime`): sessions, agent harnesses, tools, sandbox plumbing, and the `/config` loader for `flue.config.ts`.\n- `packages/vite/` — The `flue()` Vite plugin (`@flue/vite`): `'use agent'` scan/transform, generated bootstraps, Node dev/build, and the Cloudflare target adapter.\n- `packages/cli/` — CLI (`@flue/cli`): `flue run` transport-free local execution, `init`, blueprint `add`/`update`, and offline `docs`.\n- `examples/` — Integration examples for channels, databases, sandboxes, and deployment targets.\n- `demo/` — Standalone Vite+React chat SPA that connects to any running Flue example server.\n- `apps/docs/` — The documentation site; its content is the source of truth for user-facing docs.\n\nNo tests exist in the repo.\n\n## Development\n\n```\npnpm install\npnpm build          # turbo build across the workspace\npnpm check:types    # typecheck (excludes apps-www)\npnpm format         # format your work\n```\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# Flue\n\nFlue is a TypeScript framework for building autonomous AI agents and running them anywhere. An agent is a plain exported function: hooks in its body compose its capabilities — model (`useModel`), tools, skills, sandboxes, state — and its return value is its instruction. Agents live in durable conversations: accepted input survives crashes, restarts, and redeploys, and interrupted work recovers to a deterministic state. Applications build with Vite (the `flue()` plugin plus an explicit `app.ts` route map) and deploy to Node.js or Cloudflare Workers from the same source, with persistence adapters (SQLite, Postgres, MySQL, MongoDB, Redis, and more), channels that turn provider webhooks (Slack, GitHub, Telegram, ...) into agent conversations, and clients — the Flue Agent SDK (`@flue/sdk`), `@flue/react`, and the `flue` CLI — for driving conversations over HTTP or from code. The model layer is [Pi](https://pi.dev)'s provider protocol, used directly.\n\n## Contributing\n\nSee `CONTRIBUTING.md` for the full picture. In short:\n\n- **Bug reports** → https://github.com/withastro/flue/issues\n- **Feature requests** → https://github.com/withastro/flue/discussions\n- **Pull requests** are not accepted; they are automatically closed and converted into one of the two contribution types above.\n\n## Terminology\n\n```\nAgent                         — a capitalized, exported plain function; Flue Hooks in its body attach\n                                tools, instructions, and state, and its returned string is its\n                                instruction; the function name (or its `agentName` string-literal\n                                static) is the agent's durable identity\nAgent module                  — a source file whose first statement is the `'use agent'` directive;\n                                every capitalized exported function in it is an agent\n└─ AgentInstance              — URL `<id>`; the agent's durable identity, independent of authoring\n   └─ Harness                 — runtime-initialized agent environment; defaults to name `\"default\"`\n      └─ Session              — one `harness.session(name?)`; defaults to `\"default\"`\n         └─ Operation        — one `session.prompt` / `skill` / `task` / `shell` call\n            └─ Turn          — one LLM round-trip inside pi-agent-core\n```\n\nThere are no workflows or runs: conversations are the only durable unit, and a bounded code job is a tool with `harness: true`. Direct HTTP agent prompts and dispatched agent inputs operate within persistent sessions; `dispatch(...)` is identified by its `submissionId`.\n\nRouting is explicit: `app.ts` is the application's route map, mounting each HTTP-reachable agent (`app.route('/agents/<name>', createAgentRouter(AgentFn))`) and channel (`app.route('/channels/<x>', channel.route())`). Registration comes from the `'use agent'` scan, not from mounting.\n\nA blueprint is a Markdown implementation guide returned by `flue add`; its kind is `sandbox`, `database`, `channel`, or `tooling`.\n\n## Project Structure\n\n- `packages/runtime/` — Runtime library (`@flue/runtime`): sessions, agent harnesses, tools, sandbox plumbing, and the `/config` loader for `flue.config.ts`.\n- `packages/vite/` — The `flue()` Vite plugin (`@flue/vite`): `'use agent'` scan/transform, generated bootstraps, Node dev/build, and the Cloudflare target adapter.\n- `packages/cli/` — CLI (`@flue/cli`): `flue run` transport-free local execution, `init`, blueprint `add`/`update`, and offline `docs`.\n- `examples/` — Integration examples for channels, databases, sandboxes, and deployment targets.\n- `demo/` — Standalone Vite+React chat SPA that connects to any running Flue example server.\n- `apps/docs/` — The documentation site; its content is the source of truth for user-facing docs.\n\nNo tests exist in the repo.\n\n## Development\n\n```\npnpm install\npnpm build          # turbo build across the workspace\npnpm check:types    # typecheck (excludes apps-www)\npnpm format         # format your work\n```\n","category":"root","tokens":999}]}