AI Skill Hub 推荐使用:Riptide工作流 是一款优质的Agent工作流。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
Riptide工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
Riptide工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install riptide-watergraph
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install riptide-watergraph
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/shibinsp/riptide-watergraph
cd riptide-watergraph
pip install -e .
# 验证安装
python -c "import riptide_watergraph; print('安装成功')"
# 命令行使用
riptide-watergraph --help
# 基本用法
riptide-watergraph input_file -o output_file
# Python 代码中调用
import riptide_watergraph
# 示例
result = riptide_watergraph.process("input")
print(result)
# riptide-watergraph 配置文件示例(config.yml) app: name: "riptide-watergraph" debug: false log_level: "INFO" # 运行时指定配置文件 riptide-watergraph --config config.yml # 或通过环境变量配置 export RIPTIDE_WATERGRAPH_API_KEY="your-key" export RIPTIDE_WATERGRAPH_OUTPUT_DIR="./output"
Riptide-Watergraph is a reusable multi-agent framework for building, running, and inspecting LLM agent systems — conceptually like AutoGen, but it doesn't re-author the orchestration runtime. Instead it sits as a thin layer on LangGraph, consuming what LangGraph already does well (durable graph execution, checkpointing, human-in-the-loop interrupts) and concentrating its own engineering on the parts no framework ships off the shelf.
The design goal is to be "like water": a layered, modular substrate where every layer is swappable behind a thin interface (an ABC in interfaces/). Swap the model gateway, memory backend, tool registry, swarm policy, or guardrails without touching the rest. It's pure Python, one toolchain — installs and runs offline with no compiler and no API key.
What's in the box
- A runnable agent graph — orchestrator → worker/swarm → (critic → supervisor) → finalize → reflect, with human-approval interrupts and durable resume. - Self-learning memory that distills a lesson after each task and recalls it on the next. - A cost-aware swarm composer that decides single-agent vs. a parallel swarm per task. - 238 read-only tools out of the box (750+ with the enterprise connector pack) and 219 agent roles. - Guardrails (block prompt-injection, redact PII), multi-tenancy, and per-tenant cost tracking. - MCP interop — register tools from external Model Context Protocol servers and call them like locals. - Like Water Studio — a dependency-free, AutoGen-Studio-style web UI (chat, drag-and-drop workflow builder, tool/role galleries, monitoring, connections) served straight from the API.
Who it's for: engineers who want a production-shaped agent stack they can read, extend, and self-host — not a black box. Status: v0.10.0 · on PyPI · Stages 1–4 + Studio shipped · 100% test coverage (enforced in CI) · MIT.
| Capability | What it does | |
|---|---|---|
| 🧠 | **Self-learning memory** | reflect distills a reusable lesson after each task; recall injects relevant lessons into the next task's prompts (hybrid BM25 + dense retrieval, no fine-tuning). |
| 🐝 | **Dynamic swarm** | A cost-aware composer picks single-agent vs. a parallel swarm per task; dependency-ordered **waves** with a shared blackboard. |
| 🎭 | **Role specialists** | 219 roles, each with a focused prompt and a **scoped tool allow-list** (least privilege per agent). |
| 🔍 | **Critic & supervisor** | An adversarial critic verifies each result (pass/fail); a supervisor appends corrective subtasks and re-runs (capped). |
| 🔁 | **ReAct loop** | Workers loop _think → act → observe_ over read-only tools (--react N). |
| 🗳️ | **Self-consistency voting** | Sample a direct answer K times and majority-vote (--vote K). |
| 📐 | **Structured output** | finalize can emit JSON validated against a JSON Schema (--schema). |
| 🙋 | **Clarify (HITL)** | A worker can ask_human(...) to pause and ask the operator when a subtask is ambiguous. |
| 🛡️ | **Guardrails** | guard_input/guard_output block prompt-injection and redact PII (in + out). |
| 🏢 | **Multi-tenancy + cost** | Tenant-isolated memory namespaces + a per-tenant CostTracker dashboard and budget ceilings. |
| ♻️ | **Resilient gateway** | ResilientGateway wraps any model with timeouts + retry/backoff; failing tools can't crash a run. |
| 🔌 | **MCP interop** | Register external MCP-server tools into the registry; a gated, allowlisted Studio "Connect" flow makes them live. |
| 📊 | **Monitoring** | A Studio dashboard + GET /api/monitoring aggregate the usage log into KPIs and charts. |
| 🧪 | **Eval harness** | riptide eval scores pass rate, routing, guardrail blocking, and tool-call validity — a regression gate in CI. |
| 🖥️ | **Web Studio** | A dependency-free vanilla-JS UI (11 views) with light/dark theme, served at the API root. |
| 🌐 | **FastAPI server** | POST /run, SSE /run/stream, multi-turn sessions, runtime connection config. |
| 🗄️ | **Pluggable memory** | JsonFileMemory by default; PgVectorMemory (Postgres + pgvector) as a drop-in at scale. |
Prerequisites: Python 3.11+. No compiler or other toolchain needed.
```bash pip install riptide-watergraph # core pip install "riptide-watergraph[server]" # + Studio web UI (riptide serve) pip install "riptide-watergraph[all]" # + LiteLLM, MCP, observability
pip install "riptide-watergraph[all]" export OPENAI_API_KEY=sk-... # and RIPTIDE_WATERGRAPH_MODEL=gpt-4o-mini riptide run "Summarize and save a note about water" # drop --offline
**Library API** — the same graph, embedded:
python from riptide_watergraph import build_graph, DemoGateway, default_registry, HeuristicSwarmComposer
graph = build_graph( gateway=DemoGateway(), # swap for LiteLLMGateway(...) to use a real model registry=default_registry(), composer=HeuristicSwarmComposer(model="demo"), model="demo", ) result = graph.invoke({"task": "compute 21 * 2"}) print(result["final_answer"]) ```
More runnable examples in examples/; see CONTRIBUTING.md to hack on it and CHANGELOG.md for history.
`psycopg` is imported lazily, so the core package never requires it.
</details>
<details>
<summary><strong>🐝 Dynamic swarm + on-demand tools (Stage 3)</strong></summary>
The orchestrator asks a cost-aware **composer** how to run each task. `HeuristicSwarmComposer` estimates
independent sub-goals and picks a parallel **swarm** only when the task genuinely decomposes *and* needs no
human-approved side effects (those serialize through the HITL gate); otherwise it stays a **single** agent
— avoiding the multi-agent token multiplier for work that wouldn't benefit. The decision carries both the
chosen-mode and single-agent cost so the trade-off is visible.
**Phase C deepens this:** an `LLMSwarmComposer` (`--llm-composer`) asks the model to decompose the task
into subtasks **with dependencies**. Execution is then **dependency-ordered waves** — independent subtasks
run in parallel within a wave, dependent ones run after, and a shared **blackboard** carries each subtask's
output to its dependents' prompts. **Model routing** (`planner_model` / `worker_model`) lets the
orchestrator/finalize use a premium model while workers use a cheaper one. The **tool registry** retrieves
only the top-k relevant tools per subtask (BM25), keeping schemas out of context, and supports versioned
tools (`get` / `list_versions`).
</details>
<details>
<summary><strong>🎭 Heterogeneous agents — roles, critic, supervisor, handoff</strong></summary>
The swarm runs **specialist** agents, not generic workers:
- **Roles** — each subtask is assigned a role with a role-specific prompt and a **scoped tool allow-list**
(least privilege per agent). Always on; defaults to `generalist`.
- **Critic** (`--critic`) — an adversarial verifier checks each result (`pass`/`fail`) before finalize,
which then builds the answer from **verified** results only.
- **Supervisor** (`--supervisor`, implies `--critic`) — reviews verdicts and appends **corrective
subtasks** for the failures, looping back through the workers up to a hard `max_rounds` cap.
- **Handoff** — a worker can emit a `handoff(role, reason)` call to **delegate its subtask to a
better-suited specialist** (capped at one per subtask).
</details>
<details>
<summary><strong>🔁 Smarter individual agents — ReAct, voting, structured output, clarify</strong></summary>
Each worker can do more than a single shot. Every capability below is **gated by a default that reduces
exactly to the prior single-shot behavior**, so it is purely opt-in:
- **Iterative tool use / ReAct** (`build_graph(max_steps=N)`, CLI `--react N`) — loop _think → act →
observe_ over read-only tools; side-effecting tools still defer to the approval gate (run once).
- **Self-consistency / voting** (`build_graph(vote_k=K)`, CLI `--vote K`) — sample a direct answer `K`
times and majority-vote; abandoned if any sample requests a tool (so tools run once).
- **Structured outputs** (`build_graph(final_schema=…)`, CLI `--schema PATH`) — finalize emits a JSON
object validated against a JSON Schema (one retry on failure), as `RunResult.structured`.
- **Clarifying questions (HITL)** — a worker can emit `ask_human(question)` to pause and ask the operator;
the graph `interrupt()`s, resumes with the answer, and re-runs the subtask (capped at one per subtask).
</details>
<details>
<summary><strong>🛡️ Production hardening — guardrails, multi-tenancy, cost (Stage 4)</strong></summary>
Guardrails wrap the graph: a **`guard_input`** node blocks prompt-injection attempts and redacts PII
before anything reaches the model; a **`guard_output`** node redacts PII from the final answer. Both are a
`GuardrailPipeline` of layered, swappable checks (defense in depth). **Multi-tenancy** gives each tenant an
isolated memory namespace (`--tenant`), so lessons never leak across tenants, and every run appends a
`UsageRecord` to a per-tenant usage log — `riptide costs` prints the dashboard, and per-tenant **budget
ceilings** reject over-budget runs (HTTP 402).
</details>
<details>
<summary><strong>🔌 Tools, roles & MCP interop</strong></summary>
The registry ships **230+ read-only, stdlib-only tools** (`tools/library.py`) across text, regex, JSON/CSV,
encoding, hashing, math/stats, datetime, units, collections, random, extract, code, color, and validation —
**238 tools out of the box** — plus a **219-role catalog** (`swarm/role_library.py`) of domain specialists
across engineering, data, devops/SRE, security, QA, product, writing, research, finance, ops, design, and
enterprise functions/verticals. Each role carries a category-scoped tool allow-list, so on-demand retrieval
keeps a worker's context small no matter how large the registry is.
**Enterprise connectors (opt-in, MCP-bindable).** `RIPTIDE_ENABLE_ENTERPRISE=1` registers ~518 connector
tools for ~37 vendors (Salesforce, Jira, GitHub, ServiceNow, Slack, Snowflake, Stripe, …) — **~750 tools in
the gallery**. Offline they are **deterministic stubs**; bind a real
[MCP](https://modelcontextprotocol.io) server for a vendor to make them execute for real. Write actions are
`side_effecting` (human-approval gated) and stay inert until bound.
**MCP interop.** Tools from external MCP servers plug straight into the registry — once registered they are
ordinary `ToolSpec`s the worker/swarm call with no graph changes. The core is dependency-free and testable
offline via `FakeMcpClient`; the real stdio transport (`StdioMcpClient`) needs the `[mcp]` extra:
python from riptide_watergraph import register_mcp_tools, default_registry from riptide_watergraph.mcp.stdio import StdioMcpClient # pip install "riptide-watergraph[mcp]"
registry = default_registry() client = StdioMcpClient(command="npx", args=["-y", "@modelcontextprotocol/server-filesystem", "/data"]) await register_mcp_tools(registry, client, prefix="fs.") # fs.read_file, fs.write_file, ...
**Connect from the Studio (gated + allowlisted).** The Studio's **MCP Servers** view turns the catalog into
live tools without code — only when `RIPTIDE_ENABLE_MCP_CONNECT=1` **and** the server is pre-declared in the
allowlist:
bash export RIPTIDE_ENABLE_MCP_CONNECT=1 export RIPTIDE_MCP_SERVERS='[{"name":"fs","command":"npx", "args":["-y","@modelcontextprotocol/server-filesystem","."],"prefix":"fs."}]' riptide serve # MCP Servers > Connect → fs.* tools appear everywhere; Disconnect removes them ```
Connected tools join a dynamic-spec store that default_registry() appends, so they persist across Chat, Playground, Workflows and the Tool Runner. See examples/mcp_connect.py for an offline end-to-end demo.
</details>
```bash
高质量的开源AI工作流框架,易于使用和扩展
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,Riptide工作流 是一款质量良好的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | riptide-watergraph |
| 原始描述 | 开源AI工作流:Riptide-Watergraph is a reusable multi-agent framework for building, running, an。⭐6 · Python |
| Topics | AI工作流多智能体 |
| GitHub | https://github.com/shibinsp/riptide-watergraph |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-02 · 更新时间:2026-06-08 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端