智能工作流 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
智能工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
智能工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:npm 全局安装 npm install -g robrain # 方式二:npx 直接运行(无需安装) npx robrain --help # 方式三:项目依赖安装 npm install robrain # 方式四:从源码运行 git clone https://github.com/adelinamart/robrain cd robrain npm install npm start
# 命令行使用
robrain --help
# 基本用法
robrain [options] <input>
# Node.js 代码中使用
const robrain = require('robrain');
const result = await robrain.run(options);
console.log(result);
# robrain 配置说明 # 查看配置选项 robrain --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export ROBRAIN_CONFIG="/path/to/config.yml"
Stop watching your AI agent repeat the same mistakes.
Open-source shared memory for teams using AI agents. Captures every decision and the alternatives your team ruled out, and flags when a new decision contradicts an old one — so your team revisits past decisions intentionally, instead of re-litigating from zero.
Works across Claude Code, Cursor, and Copilot.
RoBrain is built by Rory Plans, an agent orchestration platform; it is the memory layer that keeps multi-agent, multi-developer work coherent over time.
You install one thing — the Sensing MCP — and run one Docker command. That's the whole setup.
pnpm docker:up brings up Postgres + Perception in the background; the user-facing surfaces are Sensing and the robrain CLI. npx robrain init-project writes the project instructions that tell Claude Code to call the Sensing tools at session start and end.
Self-hosted setup usually needs two keys: ANTHROPIC_API_KEY for extraction and one embedding-provider key for semantic retrieval. If that surprises you, see Why are there two API keys in self-hosted mode?.
#### Prerequisites - Docker + Docker Compose - Node.js 18.18+ (older 18.x + npm 9.6 can break npx bin permissions; upgrade Node or use pnpm dlx robrain), pnpm - Anthropic API key (for Haiku extraction) - OpenAI, Voyage, or Cohere API key (for embeddings)
.envFrom the repository root:
git clone https://github.com/adelinamart/robrain
cd robrain
cp .env.example .env
Edit .env at the repo root (the same keys power Perception in Docker and the CLI install prompts). Paste real keys from Anthropic and your embedding provider — do not commit that file.
ANTHROPIC_API_KEY=
EMBEDDING_PROVIDER=openai
OPENAI_API_KEY=
Keep EMBEDDING_PROVIDER identical between this file and what you select when running install (or set EMBEDDING_PROVIDER in .env and install will pick it up without prompting).
init-project writesrobrain init-project writes mode-aware instructions:
robrain install --self-hosted): generated CLAUDE.md / Cursor rule uses only sensing_* tools.sensing_* and control_* calls.PATH (optional)If you prefer not to use npx every time, install the package globally, then use the robrain command directly:
npm install -g robrain
Open a new terminal, or in zsh run rehash so your shell picks up the new binary. Then:
```bash robrain install --self-hosted
If you pulled new code but did not rebuild the perception service, the container may still run an older Perception binary than packages/perception-self-hosted on disk. Then startup migrations (for example reviewed_at on decisions) never run, robrain review approval can fail against the DB the CLI is using, and features that assume the new schema break in confusing ways.
From the repo root (same directory as .env and docker/docker-compose.yml):
pnpm docker:up:build
That runs prepare-env and docker compose … up -d --build perception — rebuilds the Perception image and recreates the container.
To build only, then start Perception yourself:
pnpm docker:build
docker compose -f docker/docker-compose.yml --env-file .env up -d perception
If Docker reused layers and you still see old behavior, force a clean rebuild (no pnpm shortcut for --no-cache yet):
docker compose -f docker/docker-compose.yml --env-file .env build --no-cache perception
docker compose -f docker/docker-compose.yml --env-file .env up -d perception
Sanity check:
curl -sf "http://localhost:${PERCEPTION_PORT:-3001}/health"
After shared types change (packages/shared): downstream packages read @robrain/shared types from dist/. From repo root run pnpm --filter @robrain/shared build (or pnpm -r build) before relying on pnpm typecheck or publishing — otherwise packages/*/dist/*.d.ts can lag packages/shared/src.
Verify the running container matches your checkout: tail Perception logs while exercising capture — you should see current behavior (for example embedding dedupe logs as POST /signals deduped with matched decision text when a near-duplicate is skipped):
docker compose -f docker/docker-compose.yml logs -f --tail=80 perception
Note: A brand-new Postgres volume applies packages/shared/schema.sql on first boot. Existing volumes rely on Perception’s idempotent startup migrations when you run an up-to-date image — so after upgrading, rebuild and restart perception once.
---
From a fresh clone, copy .env.example to .env, add your ANTHROPIC_API_KEY plus one embedding-provider key, then run:
pnpm install && pnpm build
pnpm docker:up These first three commands run once from the robrain clone.
npm install -g robrain
npx robrain install --self-hosted --repo-root "$(pwd)" These commands install the Robrain package and then set-up everything so Robrain can run.
cd /path/to/your/project && npx robrain init-project The last command runs once per application repo.
RoBrain uses Anthropic (Haiku) for decision extraction/classification and a separate embeddings provider (openai, voyage, or cohere) for semantic vector search. That is why you may see both ANTHROPIC_API_KEY and an embedding key in setup.
Cheapest recommended combo: ANTHROPIC_API_KEY (Haiku) + EMBEDDING_PROVIDER=openai with OPENAI_API_KEY (text-embedding-3-small).
All commands accept --help for full flag details. Repo-level pnpm scripts live in package.json; CLI commands live in packages/cli.
| Command | What it does |
|---|---|
pnpm install:self-hosted | Build everything + run robrain install --self-hosted --repo-root . in one shot |
pnpm build | Compile all workspace packages (pnpm -r build) — run after pnpm install in the robrain clone |
pnpm docker:up | Start Postgres + Perception (uses .env) |
pnpm docker:up:build | Same, but force a rebuild of Perception |
pnpm docker:build | Rebuild Perception image without starting |
pnpm docker:down | Stop the stack |
pnpm synthesis:build | Compile @robrain/synthesis before running it |
pnpm synthesis:dry-run | Run Synthesis with SYNTHESIS_DRY_RUN=true (no DB writes) |
npx robrain install --self-hosted | Wire Sensing MCP into Claude Code / Cursor; then runs **init-project in the current directory** by default |
npx robrain install --token <token> | Authenticate against Rory Plans cloud (or set RORY_TOKEN) |
npx robrain install --editor <claude-code\|cursor\|copilot> | Target a specific editor instead of all detected |
npx robrain install --perception-url <url> | Override Perception URL for self-hosted (default http://localhost:3001) |
npx robrain install --repo-root <path> | Path to the robrain clone — needed so MCP bundle gets linked (or set ROBRAIN_REPO) |
npx robrain install --skip-init-project | Wire editors only — do not run **init-project** in the current directory after install |
npx robrain init-project | Warm-start memory from package.json, README, git log |
npx robrain init-project --project-id <id> | Override the auto-derived project ID (useful after projects merge) |
npx robrain init | Alias for init-project |
npx robrain projects list | List Perception projects with session/decision counts (recover phantom ids) |
npx robrain projects merge <from-id> <to-id> | Merge one project id into another in the database |
npx robrain review | Inspect, edit, or delete captured decisions; conflict **“keep”** can persist a **related_to** edge when Perception returns a counterpart id so Synthesis stops re-flagging the pair |
npx robrain review --session <id> | Review a specific session (default: last session) |
npx robrain review --all | Show all active decisions, not only the last session |
npx robrain review --limit <n> | Max decisions to fetch (default: **20**) |
npx robrain review --history | Show full decision lifecycle including superseded decisions |
npx robrain review --approve-all | Bulk-approve every reviewable decision in the current fetch (no prompts per row) |
npx robrain export-memory | Export approved decisions into Claude Code auto-memory files; optional **--cwd** / **--project-id** for non-interactive paths (Synthesis F2) |
npx robrain export-memory --dry-run | Preview the file plan without touching disk |
npx robrain export-memory --include-unreviewed | Also export decisions not yet approved (not recommended) |
npx robrain export-memory --to <dir> | Write to a custom memory dir instead of ~/.claude/projects/<slug>/memory |
npx robrain export-memory --ledger | Also write a single git-committed decisions ledger (default: <project>/decisions.md); DB is source of truth — file is regenerated each run |
npx robrain export-memory --ledger <path> | Same as --ledger, but write to a custom path under the project root (e.g. docs/decisions.md) |
npx robrain inject | Get formatted context to paste into Claude Code |
npx robrain inject --query "..." | Semantic search for relevant decisions |
npx robrain inject --files "..." | Get decisions about specific files |
npx robrain inject --copy | Copy output directly to clipboard |
npx robrain inject --all | Request up to **100** decisions (server cap): all **unreviewed** without --query, or a wider semantic pool with --query |
npx robrain inject --limit <n> | Cap how many decisions are returned (default: **5**) |
npx robrain explain <file> | Answer "why does this code exist?" for any file |
npx robrain explain <file> --why | Full rationale + rejected alternatives per decision |
npx robrain explain <file> --copy | Copy explain output to the clipboard |
npx robrain rule --add "..." | Add a Planning rule (**Rory Plans cloud** — requires planningUrl in config) |
npx robrain rule --list | List rules from Planning **GET /facts** when cloud is configured; OSS-only prints guidance |
npx robrain rule --remove <id> | Remove a rule by id (cloud Planning API) |
npx robrain rule --type <type> | When using **--add**, set rule type: **always_include**, **always_exclude**, or **preference** (default: **preference**) |
npx robrain status | Auth + Perception/Planning health + **active decision count** for the current project |
npx robrain logout | Clear locally stored credentials (Rory Plans token / install state) |
pnpm synthesis:run | **[Synthesis](#synthesis)** — batch job from **robrain repo root** (pnpm must resolve @robrain/synthesis) |
npx robrain synth | Same job via CLI: optional **--dry-run**, **--full**, **--lookback <n>**, **--project <id>**. Resolves the robrain monorepo from this CLI package unless **ROBRAIN_REPO** is set (needed for some global installs). |
curl -s -H "Authorization: Bearer <PERCEPTION_API_KEY>" \ "http://localhost:3001/decisions?project_id=<project_id>&history=true&limit=20" ```
After you've seen the loop, you may want to know how RoBrain fits the broader landscape of AI memory tools. The short version:
See RoBrain vs Claude Code Auto Memory and Comparisons for the detailed breakdown.
Claude Code Auto memory is Anthropic’s native persistence: Claude writes notes as it works into machine-local markdown under ~/.claude/projects/…/memory/ (official docs). Roughly the first ~200 lines or 25 KB of MEMORY.md loads every session; deeper notes live in topic files Claude reads on demand with normal file tooling. It ships with Claude Code v2.1.59+ and needs no Docker or Postgres. That makes it the closest competitor to RoBrain’s “capture things without writing MEMORY.md yourself” story — but the shape of the data differs.
| Capability | Claude auto-memory | RoBrain |
|---|---|---|
| Storage | Local markdown files, per-user, per-machine | Postgres, can be team-shared |
| Capture mechanism | Active — Claude decides what to write | Systematic passive — every turn auto-classified, Claude doesn't decide |
| Cross-tool | Claude Code only | Any MCP-capable client (Claude Code, Cursor, etc.) |
| Recall | Loads MEMORY.md index at session start | Always-on summary + semantic search via embeddings |
| Audit trail | Files only | Full session turn history in DB |
| New developer joining the project | Sees nothing | Inherits the team's accumulated memory immediately |
When Auto memory is enough: solo dev, single editor (Claude Code), repo younger than ~6 months, and you’re fine curating markdown when notes drift.
When RoBrain is worth the overhead: you need vetoes and file-level provenance as data, semantic recall across months of history, invalidation when decisions reverse, multiple editors, or a shared / auditable store.
The two can coexist: Auto memory for lightweight scratch notes; RoBrain for canonical decisions you want to query, explain, and review.
RoBrain and Zep answer different questions and work well together.
RoBrain captures architectural decisions — what was chosen, why, and what was explicitly ruled out as a structured queryable field. It answers: "what did we decide about this module, and what did we reject?"
Zep / Graphiti captures conversation history and entity relationships — it stores sessions, extracts facts, builds a temporal knowledge graph, and supports semantic retrieval across all of it. Zep can implicitly capture decisions too — the difference is that RoBrain surfaces rejected alternatives as a structured rejected[] field you can query directly, whereas in Zep they would live in conversation prose. For relationship queries — "how does the auth module connect to everything else?" — Zep's multi-strategy retrieval (semantic + graph traversal + BM25) is particularly strong.
A combined setup:
```bash
After setup, Sensing runs automatically whenever Claude Code is open. The MCP server is registered in ~/.claude/mcp.json, so Claude Code starts it automatically on launch. The CLAUDE.md instructions tell Claude to call sensing_start_session at the beginning of each session and sensing_record_turn after every exchange.
The one thing that can break it:
Claude Code doesn't always follow CLAUDE.md instructions reliably — this is the compliance problem from pre-launch testing. If Claude stops calling sensing_record_turn, Sensing goes silent. The way to check:
npx robrain status
That prints Perception connectivity and a Decisions: count for the current project (from GET /projects). If Decisions: 0 after a session where you expected captures, Claude may not have called the Sensing tools, or Perception rejected writes — run npx robrain review to confirm what is stored. The fix is often to make CLAUDE.md more explicit or remind Claude: "follow the RoBrain instructions in CLAUDE.md."
The practical reality:
The developer needs two habits: - npx robrain review after sessions where important decisions were made - npx robrain inject --copy before starting a new task that builds on prior work
Everything else — capture, extraction, storage, embedding — happens without you doing anything.
高质量的开源AI工作流项目
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
经综合评估,智能工作流 在Agent工作流赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | robrain |
| 原始描述 | 开源AI工作流:Open-source shared memory for teams using AI agents. Captures every decision and。⭐61 · TypeScript |
| Topics | ai-agentstypescriptcontext-engineering |
| GitHub | https://github.com/adelinamart/robrain |
| License | NOASSERTION |
| 语言 | TypeScript |
收录时间:2026-05-27 · 更新时间:2026-05-30 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端