能力标签
⚙️
Agent工作流

智能工作流

基于 Elixir · 无代码搭建完整 AI 自动化流程
英文名:agens
⭐ 22 Stars 🍴 2 Forks 💻 Elixir 📄 Apache-2.0 🏷 AI 8.0分
8.0AI 综合评分
AI工作流Elixir智能体
✦ AI Skill Hub 推荐

智能工作流 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析
智能工作流 是一套完整的 AI Agent 自动化工作流方案。随着 AI 能力的不断提升,基于 Agent 的自动化工作流正在成为提升个人和团队效率的核心方式。区别于传统的 RPA 自动化(模拟鼠标键盘操作),AI Agent 工作流通过理解任务意图、动态规划执行路径,能够处理更复杂的非结构化任务。

智能工作流 工作流的设计遵循"最小配置,最大复用"原则:核心逻辑已经封装好,用户只需配置自己的 API Key 和业务参数即可快速上手。工作流内置错误处理和重试机制,在网络波动或 API 限速等情况下仍能稳定运行,适合作为生产环境的自动化基础设施。

在实际部署时,建议先在测试环境中运行 3-5 次,验证各个环节的输出结果符合预期,再部署到生产环境。AI Skill Hub 评分 8.0 分,是同类 Agent 工作流中的精选推荐。
📋 工具概览

智能工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

GitHub Stars
⭐ 22
开发语言
Elixir
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
8.0 分
工具类型
Agent工作流
Forks
2
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

智能工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

📌 核心特色
  • 可视化 Agent 工作流编排,无需编写复杂代码
  • 支持多步骤自动化任务链,实现全流程无人值守
  • 与外部 API、数据库和第三方服务无缝集成
  • 内置错误处理与自动重试机制,保障稳定运行
  • 提供可复用的自动化模板,快速在同类场景部署
🎯 主要使用场景
  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 克隆仓库
git clone https://github.com/jessedrelick/agens
cd agens

# 查看安装说明
cat README.md

# 按 README 完成环境依赖安装后即可使用
📋 安装步骤说明
  1. 访问 GitHub 仓库获取工作流文件
  2. 在对应平台(Dify / Flowise / Make 等)中找到「导入工作流」功能
  3. 上传工作流文件
  4. 按照提示配置必要的环境变量和 API Key
  5. 运行测试确认流程正常后投入使用
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
agens --help

# 基本运行
agens [options] <input>

# 详细使用说明请查阅文档
# https://github.com/jessedrelick/agens
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# agens 配置说明
# 查看配置选项
agens --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export AGENS_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 44/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

CI Hexdocs Hex.pm codecov

Agens is an Elixir application designed to build multi-agent workflows with language models.

Drawing inspiration from popular tools in the Python ecosystem, such as LangChain/LangGraph and CrewAI, Agens showcases Elixir's unique strengths in multi-agent workflows. While the ML/AI landscape is dominated by Python, Elixir's use of the BEAM virtual machine and OTP (Open Telecom Platform), specifically GenServers and Supervisors, makes it particularly well-suited for these tasks. Agens aims to demonstrate how these inherent design features can be leveraged effectively.

⚠️ Breaking Changes: v0.2 Agens has changed significantly since the original 0.1 release (August 2024). The 0.2 line is a substantial redesign: - The Agens.Agent module has been removed. agent_id survives as an opaque identifier used by a Serving's c:Agens.Serving.load_context/2 callback. - Agens.Job.Step has been replaced by Agens.Job.Node. Jobs are now a list of Nodes, not sequences of Steps. - Routing is dynamic and lives on the Serving (via Agens.Router), not on static step configuration. - Observability moved to the Agens.Backend behaviour (default backends emit messages to the caller and write structured logs). - Tool calls are configured per-Node via the :tools field and executed by the Serving's c:Agens.Serving.tool_call/3 callback (now modeled after MCP tool calls).

Features

  • Flexible routing — graph-based, step-based/sequential, or LM-driven dynamic routing, all supported through the Agens.Router behaviour. Routing is decided per-request from the running Agens.Message and structured outputs, rather than baked into static configuration.
  • LM-agnostic Servings — call any backend (external APIs like OpenAI, Anthropic, Ollama, or local pipelines like Nx.Serving / Bumblebee) from your Serving's c:Agens.Serving.handle_message/3 callback. Agens makes no provider assumptions.
  • Concurrency control — built-in FIFO queue and configurable in-flight limit per Serving (via use Agens.Serving, limit: N). A flood of :run calls drains gracefully through bounded concurrency rather than overwhelming the LM provider or local pipeline.
  • Strict structured outputs — JSON schema assembled per-request from the Router's declared outputs, compatible with OpenAI strict mode and similar grammar-constrained sampling.
  • MCP-style tool calls and resources — tools attached per-Node and executed via the Serving's c:Agens.Serving.tool_call/3 callback; resources resolved via c:Agens.Serving.load_resource/3 before inference.
  • Sub-Jobs — compose Jobs hierarchically. A Sub-Job can run in place of a Node's inference (with its result mapped back via c:Agens.Serving.handle_sub/3) or be dispatched as additional routed-to work after inference.
  • Parallel routing primitives — fan-out with {:route, node_id, count}, yield/aggregation with {:yield, node_id}, retry with LM-supplied reasons via {:retry, reason}, explicit termination via :end.
  • Customizable prompt assembly — override every section heading/detail via per-Serving Agens.Prefixes, or replace c:Agens.Serving.build_prompt/3 entirely for full control over how the running Agens.Message is rendered into the final system/user prompt.
  • Pluggable observability — implement the Agens.Backend behaviour to fan lifecycle events out to your own logging, persistence, or UI layer; defaults emit messages to the caller process and write structured logs.
  • Telemetry coverage — comprehensive Telemetry.Metrics definitions in Agens.Metrics for Job/Node/Sub/Serving/tool/resource lifecycle, ready to feed a Prometheus/StatsD reporter.
  • JSON-defined Jobs — load Job configurations from JSON via Agens.Job.Config.from_json/1, useful for runtime-loaded workflows or non-Elixir authoring.

Installation

Add agens to your list of dependencies in mix.exs:

def deps do
  [
    {:agens, "~> 0.2.0"}
  ]
end

Usage

A multi-agent workflow with Agens has four moving parts: a Serving (the LM interface), a Router (routing logic on top of structured outputs), a Job (a graph of Nodes), and optional Backends (observability/persistence). Most workflows only need one Serving and one Router.

--- 1. Add the Agens Supervisor to your supervision tree

children = [
  {Agens.Supervisor, name: Agens.Supervisor}
]

Supervisor.start_link(children, strategy: :one_for_one)

See Agens.Supervisor for more information.

--- 2. Define and start a Serving

A Serving wraps language model inference. Implement the Agens.Serving behaviour, use Agens.Serving, and call your LM of choice (HTTP API, Nx.Serving/Bumblebee pipeline, anything else) inside c:Agens.Serving.handle_message/3.

defmodule MyApp.Serving do
  use Agens.Serving
  use Agens.Router

  alias Agens.{Message, Serving}

  @impl Serving
  def start(state), do: {:ok, state}

  @impl Serving
  def handle_message(_state, %Message{system: system, user: user}, schema) do
    # Call your LM with the prepared system/user prompts + JSON schema, return
    # `{:ok, parsed}` or `{:error, reason}`.
  end

  @impl Serving
  def handle_result({:ok, %{"body" => body} = parsed}, _state, _msg) do
    {:ok, %Serving.Result{body: body, outputs: Map.get(parsed, "outputs", %{})}}
  end

  def handle_result({:error, reason}, _state, _msg), do: {:error, reason}

  # Router callbacks (see step 3)
  @impl Agens.Router
  def outputs(%Message{}), do: []

  @impl Agens.Router
  def resolve(%Message{}, _outputs), do: [:end]
end

{:ok, _pid} =
  Agens.Serving.start(%Agens.Serving.Config{
    name: :my_serving,
    serving: MyApp.Serving
  })

See Agens.Serving and examples/servings/ for reference Serving implementations.

--- 3. Define a Router

A Router maps a Serving's structured outputs to a list of routing instructions ({:route, node_id, count}, {:yield, node_id}, {:sub, job_id}, :end, :retry).

A Router can live in the Serving module itself (the "merged" pattern shown above) or in a dedicated module passed via use Agens.Serving, router: MyRouter (the "split" pattern — useful when many Servings share the same routing logic).

defmodule MyApp.LinearRouter do
  use Agens.Router

  alias Agens.Message

  @impl Agens.Router
  def outputs(%Message{}), do: []

  @impl Agens.Router
  def resolve(%Message{node_id: "summarize"}, _), do: [{:route, "critique", 1}]
  def resolve(%Message{node_id: "critique"}, _), do: [:end]
end

For routing decisions that depend on the LM's structured response, declare an Agens.Router.Output schema and use Agens.Router.Condition to branch:

def outputs(%Message{}) do
  [
    %Output{key: "viable", type: "bool", description: "Is the topic researchable?"},
    %Output{key: "confidence", type: "int", description: "1-10 confidence in the result"}
  ]
end

def resolve(_msg, outputs) do
  cond do
    Condition.check(%Condition{key: "viable", op: "eq", value: "false"}, outputs) -> [:end]
    Condition.check(%Condition{key: "confidence", op: "lt", value: "7"}, outputs) -> [:retry]
    true -> [{:route, "writer", 1}]
  end
end

See Agens.Router, Agens.Router.Output, Agens.Router.Condition, and examples/router/ for more.

--- 4. Define and run a Job

A Job is a graph of Agens.Job.Nodes with a designated :starting_node_id. Each Node declares a Serving and, optionally, an agent_id, objective, tools, resources, or a sub Job. Routing between Nodes is decided at runtime by the Serving's Router — there is no static next field on a Node.

config = %Agens.Job.Config{
  id: "summarize_critique",
  description: "Summarize a topic in three sentences, then critique the summary.",
  starting_node_id: "summarize",
  nodes: %{
    "summarize" => %Agens.Job.Node{
      serving: :my_serving,
      agent_id: "summarizer",
      objective: "Write a tight three-sentence summary of the topic."
    },
    "critique" => %Agens.Job.Node{
      serving: :my_serving,
      agent_id: "critic",
      objective: "Identify one weakness or omission in the summary."
    }
  }
}

run_id = Agens.generate_uid()

{:ok, _pid} = Agens.Job.start(config, run_id)
:ok = Agens.Job.run(run_id, "the rise of small open-weight LLMs", [])

Jobs are addressed by run_id (not name) so the same Job.Config can be executed in parallel. See Agens.Job, Agens.Job.Config, and Agens.Job.Node.

--- 5. Observe via Backends (optional)

The Agens.Backend behaviour fans out lifecycle and Node activity to one or more backends. Defaults are configured via the :backends application key:

config :agens, backends: [Agens.Backend.Emit, Agens.Backend.Log, MyApp.PubSubBackend]

The default emit backend sends {:job_run, _, _}, {:node_started, msg}, {:node_result, msg}, {:tool_call, msg, call}, {:resource_load, msg, resource}, {:job_complete, _} (natural completion) or {:job_ended, _} (explicit :end instruction), and more to the caller process — handle them with handle_info/2 in a LiveView or any GenServer. See Agens.Backend for the full list of callbacks.

--- Sub-Jobs

A Node can run an entire Sub-Job in place of inference by setting :sub to a Job id. When the Sub completes, the parent invokes the Node's Serving c:Agens.Serving.handle_sub/3 callback to map the Sub's final Agens.Message into the parent Node's outputs and routing decision. A Serving can also emit {:sub, job_id} in its next list to chain a Sub-Job after its own inference. See the "Routing and Sub-Jobs" section in Agens.Job for details.

Examples

The examples/ directory contains:

  • A single-file Phoenix LiveView app — see phoenix.exs — wiring up Instructor, MCP tools, a PubSub backend, and a multi-node routed Job.
  • Reference Serving implementations under examples/servings/ (e.g. Instructor for structured outputs).
  • A linear router and a condition-driven edge router under examples/router/.
  • PubSub and file backends under examples/backends/.
  • An MCP client/server pair under examples/mcp/ using hermes_mcp for tools and resources.
  • JSON-defined Jobs under examples/jobs/, loaded via Agens.Job.Config.from_json/1.

Run the Phoenix example with:

elixir examples/phoenix.exs

It will be available at http://localhost:8080.

🎯 aiskill88 AI 点评 A 级 2026-05-26

高质量的AI工作流项目

⚡ 核心功能
👥 适合人群
自动化工程师和运维人员项目经理和业务分析师希望减少重复性工作的专业人士数字化转型团队
🎯 使用场景
  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同
⚖️ 优点与不足
✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +大幅减少重复性人工操作
  • +可视化流程,清晰直观
  • +可扩展性强,支持复杂场景
⚠️ 不足
  • 初始配置和调试需投入一定时间
  • 强依赖外部服务的稳定性
  • 复杂场景需具备一定技术基础
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐
📚 相关教程推荐
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
agens 是一款Elixir开发的AI辅助工具。开源AI工作流:Create multi-agent workflows with AI and Language Models using OTP components in。⭐22 · Elixir 主要应用场景包括:自动化工作流创建。
💡 AI Skill Hub 点评

经综合评估,智能工作流 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ Apache-2.0 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 智能工作流
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 agens
原始描述 开源AI工作流:Create multi-agent workflows with AI and Language Models using OTP components in。⭐22 · Elixir
Topics AI工作流Elixir智能体
GitHub https://github.com/jessedrelick/agens
License Apache-2.0
语言 Elixir
🔗 原始来源
🐙 GitHub 仓库  https://github.com/jessedrelick/agens

收录时间:2026-05-26 · 更新时间:2026-05-26 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。