@flow-engineer/flow

中文文档
0.19.0发布于 2026/11/10Apache-2.0TypeScriptES Module近 30 天下载 1.1万

An open-source runtime for chat agents that feel like a person texting back.

原始使用文档
文档目录9 节
  1. One codebase, every interface
  2. Quick start
  3. MCP and CLI
  4. Messaging and the playground
  5. Build with your coding agent
  6. Test, host and observe
  7. Documentation
  8. Stability
  9. License

Flow Framework

Build once. Ship to every chat.

One open-source TypeScript framework to bring your product to Claude, ChatGPT, the terminal, WhatsApp, iMessage, Telegram and your own app. Write your tools and skills once; use them as an MCP server, a plugin, a CLI and a messaging agent.

We're building Flow for a chat-first world: people should be able to use a product by asking for what they need, where they already chat. Moving a booking or placing an order should happen in the conversation—not end with a link to a form. Whether someone texts your business or asks their own assistant, the same product capabilities should be available to them.

License: Apache-2.0 Node 22.18+ TypeScript

Documentation · Quickstart · For coding agents · Website

One codebase, every interface

BuildReach
MCP serverClaude, ChatGPT and other MCP clients
PluginHosts that load native skills and an MCP connection
CLIPeople, scripts, Claude Code, Codex and other coding agents
Messaging agentWhatsApp, iMessage, Telegram, SMS and your own web or app chat
Web appPeople on your own site, in a side panel beside its pages

Tools are typed TypeScript functions that call your APIs. Skills teach the workflows around them. Flow exposes the same capabilities through each interface, with authentication hooks for your users and room to customize the generated tools, commands and handlers.

In Claude and ChatGPT, the host's model uses your MCP tools. In messaging, Flow runs the conversation with your model, handling double texts, acknowledgements, background tools, channel rules, reminders, persistent history and the agent's own records. Start with whichever interface you need.

Quick start

Node 22.18 or later. Create a project from the café example:

npx @flow-engineer/flow new my-agent --display-name "My agent"
cd my-agent
npm install

The starter includes the same tools in an MCP server, a CLI and a messaging agent.

MCP and CLI

Start the server:

npm run mcp

It prints the MCP URL and a command to connect Claude Code. In another terminal, try the CLI:

npm run cli -- --help
npm run cli -- menu --json

To test any MCP server from the current chat, use npx @flow-engineer/flow inspect <url> tools with the URL the server prints. call, auth, resources and prompts exercise its tools, sign-in and other capabilities as a host does, without requiring a CLI configuration.

These tool calls need no model key. To reach Claude or ChatGPT remotely, host the MCP server over HTTPS and connect it in the host. MCP and sign-in · Plugin packages

Messaging and the playground

npx @flow-engineer/flow link --channel telegram
npm start

link signs in, sets up the trial keys and prints a phone link. Use --channel whatsapp or --channel imessage for those platforms when available. Open the playground URL from npm start to try the agent locally, then text it from your phone while it runs. You can also use your own model key and messaging provider. Full setup and trial details

Build with your coding agent

flow new includes coding-agent skills and an AGENTS.md pointing to them. Give Claude Code, Codex or another coding agent your product's codebase and tell it which interfaces to build. Replace the café tools with calls to your APIs and teach your workflows through skills.

Read the coding-agent guide, or explore the café example.

Test, host and observe

Check tools, skills and CLI configuration with npx @flow-engineer/flow check. Test the messaging agent with simulated conversations, inspect traces, and deploy on your own infrastructure or Flow Cloud. The playground simulators follow each app’s behavior, including channel-specific controls, media and voice notes; Debug mode shows the underlying platform payloads. Flow Messaging provides channels through one API; you can also bring your own providers. Once it is live, npx @flow-engineer/flow conversations --grade wrong lists the conversations whose replies were graded wrong, flow conversations show <id> prints one with each grade's rule and reason, and flow issues the problems they add up to, and flow insights where people gave up or got annoyed, so a coding agent can fix them.

Deployment · Self-hosting · Testing · Traces

Documentation

The documentation site covers the Framework and the Unified Messaging API. Its source lives in the private flow-engineer/docs repository. Public behavior changes update the relevant guide there for people and coding agents; see AGENTS.md.

Tools · Skills · Models and options

In this repository: channel options · patterns that worked (enforce what matters in beforeSend, keep prompts for judgement, render in code, refuse with a reason the model can act on, test a long chat).

A channel's sendMessage resolves when your platform accepted the message and rejects when it refused it: the agent's next message waits for it, and a rejection reaches the agent as Not delivered. What is ordered, what is sent once and what send() resolving means: docs/guarantees.md.

Ready-made beforeSend checks compose with guards(...), the first refusal winning: oncePerChat(line) (a disclaimer at most once per conversation), noRepeats(), linkAllowlist(hosts) and noWriteButtons(actions); they read what was sent from the stored history (context.sent), so they hold after a restart. agent.resetHistory({ to, note }) starts the history the model is sent again from now (nothing is deleted). Each model call carries at most 24,000 tokens of history, or 60% of the model's contextTokens when that is less (createAgent({ history: { maxTokens } }) to change it).

What the agent must remember across days and people (a buyer's question waiting for the seller's answer) it keeps as records: small JSON documents in collections declared on createAgent({ records }), read by id or matched on a few declared fields, in the same store as its conversations, so they survive restarts and deploys and work the same in the playground, self-hosted and on Flow's hosting. Forgetting a person deletes the records that name them, and flow records export prints them all. The rule: if anything other than the agent reads it, it belongs in your own database. docs/agents.md

Stability

Flow Framework is 0.x: until 1.0 its API (exports, options, file formats, the CLI's commands, --json fields and exit codes) may change between releases. Every release's notes call out each breaking change with a migration note saying what to change. The API freezes at 1.0. Pin the exact version in package.json for production, and read the notes before you move it. What freezes at 1.0: docs/stability.md.

License

Apache-2.0

版本与发布记录

@flow-engineer/flow 共发布 63 个版本,首次发布于 2026/10/18;过去 12 个月发布了 63 个版本。

版本发布日期距今
0.19.0latest2026/11/105 天前
0.18.02026/11/106 天前
0.17.12026/11/088 天前
0.17.02026/11/078 天前
0.16.12026/11/079 天前
0.16.02026/11/0510 天前

关于 @flow-engineer/flow 的常见问题

@flow-engineer/flow 是什么?

An open-source runtime for chat agents that feel like a person texting back.

如何安装 @flow-engineer/flow?

在项目目录运行 npm install @flow-engineer/flow,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 flow、chinwag,可以用 npx flow 直接运行。

@flow-engineer/flow 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@flow-engineer/flow 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@flow-engineer/flow 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@flow-engineer/flow 可以商用吗?

@flow-engineer/flow 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@flow-engineer/flow 的下载量有多少?

根据 npm 官方下载统计,@flow-engineer/flow 在 2026/10/15 – 2026/11/13 这 30 天内被下载 11,402 次,日均约 380 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@flow-engineer/flow 还在维护吗?

最新版本 0.19.0 发布于 2026/11/10(5 天前);至今共发布 63 个版本,其中过去 12 个月发布了 63 个;首次发布于 2026/10/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。