← Back to Skills Marketplace
qiuwenxi416488212-ship-it

ai-workflow-engine

by XiLi-aXi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
102
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ai-workflow-engine
Description
智能工作流自动化引擎,支持任务编排、Agent协作、RAG知识库和自动代码生成,实现端到端AI工作流构建与执行。
README (SKILL.md)

AI Workflow Skill

智能工作流自动化引擎

让AI工作流变得像说话一样简单


核心功能

1. 工作流编排

  • ✅ 线性执行 - 按顺序执行任务
  • ✅ 条件分支 - 根据条件选择路径
  • ✅ 并行执行 - 多任务同时运行
  • ✅ 循环执行 - 失败自动重试
  • ✅ 事件驱动 - 定时/文件/触发器

2. Agent智能体

  • ✅ 角色定义 - 设定Agent能力和边界
  • ✅ 多Agent协作 - 任务分配与结果汇总
  • ✅ 记忆系统 - 短期/长期记忆
  • ✅ 工具调用 - 执行代码/查询等

3. RAG知识库

  • ✅ 文档向量化 - 多种格式支持
  • ✅ 智能检索 - 语义搜索
  • ✅ 生成答案 - 结合上下文回答
  • ✅ 多轮对话 - 记住对话历史

4. 数据处理

  • ✅ ETL自动化 - 抽取/转换/加载
  • ✅ AI清洗 - 自动修复异常数据
  • ✅ 质量监控 - 实时数据质量

5. 代码生成 (核心!)

根据你的简单描述,自动生成完整工作流!


快速开始

方式一: 描述需求,自动生成

from ai_workflow import WorkflowGenerator

gen = WorkflowGenerator()

# 描述你的需求
workflow = gen.generate("""
    1. 爬取某网站数据
    2. 清洗数据
    3. 存入数据库
    4. 生成分析报告
    5. 发送到我的邮箱
""")

# 执行工作流
workflow.run()

方式二: 手动构建

from ai_workflow import Workflow, Step, Parallel

# 构建工作流
wf = Workflow([
    Step("爬取", fetch_data),
    Step("清洗", clean_data),
    Step("分析", analyze),
    Step("报告", generate_report)
])

wf.run()

方式三: Agent编排

from ai_workflow import Agent, orchestrate

agents = [
    Agent("研究员", search_and_analyze),
    Agent("分析师", deep_analyze),
    Agent("写手", write_report)
]

result = orchestrate(agents, task="分析BTC价格趋势")

工作流模式

1. 线性执行

wf = Workflow([
    Step("第一步", do_something),
    Step("第二步", do_next),
    Step("第三步", final_step)
])

2. 条件分支

from ai_workflow import Condition

wf = Workflow([
    Step("检查", check_status),
    Condition(
        if_true=Step("成功", handle_success),
        if_false=Step("失败", handle_failure)
    )
])

3. 并行执行

from ai_workflow import ParallelStep

wf = Workflow([
    ParallelStep([
        Step("任务A", task_a),
        Step("任务B", task_b),
        Step("任务C", task_c)
    ]),
    Step("汇总", aggregate_results)
])

4. 循环重试

from ai_workflow import Retry, Loop

# 失败重试3次
wf = Workflow([
    Retry(max_attempts=3)(
        Step("可能失败", risky_task)
    )
])

# 循环直到成功
wf = Workflow([
    Loop(until="success")(
        Step("尝试", try_task)
    )
])

Agent系统

创建Agent

from ai_workflow import Agent

# 创建研究员Agent
researcher = Agent(
    name="研究员",
    role="负责信息搜集和分析",
    tools=[search_web, read_file],
    knowledge="专业领域知识库"
)

# 创建写手Agent
writer = Agent(
    name="写手",
    role="负责内容创作",
    tools=[write_file, send_email]
)

Agent协作

from ai_workflow import orchestrate

result = orchestrate(
    agents=[researcher, analyst, writer],
    task="写一篇关于AI的工作报告",
    mode="sequential"  # 或 parallel
)

RAG知识库

构建知识库

from ai_workflow import KnowledgeBase

kb = KnowledgeBase("公司知识库")

# 添加文档
kb.add_document("产品介绍.pdf")
kb.add_document("技术文档.docx")
kb.add_document("常见问题.md")

# 问答
answer = kb.query("公司的使命是什么?")
print(answer.text)
print(answer.sources)  # 引用来源

带工具的RAG

# 当RAG无法回答时,自动调用工具
kb = KnowledgeBase("助手", tools=[search_web, calculator])

answer = kb.query("昨天BTC价格是多少?")
# 如果知识库没有,自动搜索网络

代码生成示例

输入简单的描述

帮我写一个爬虫工作流:
1. 爬取某网站的产品数据
2. 清洗数据(去重、填充缺失)
3. 存入MySQL数据库
4. 生成Excel报表
5. 发送到邮箱

自动生成完整代码

# 生成的代码会自动包含:
# 1. 爬虫实现
# 2. 数据清洗
# 3. 数据库操作
# 4. Excel导出
# 5. 邮件发送
# 6. 错误处理
# 7. 日志记录
# 8. 配置文件

# 执行
workflow.run()

配置

from ai_workflow import Config

# 配置AI模型
Config.set("openai_key", "sk-xxx")
Config.set("model", "gpt-4")

# 配置数据库
Config.set("db_url", "mysql://user:pass@localhost/db")

# 配置邮件
Config.set("smtp", {"host": "smtp.gmail.com", "port": 587})

依赖

pip install pandas openpyxl requests beautifulsoup4
pip install chromadb pypdf  # RAG
pip install openai anthropic  # AI模型

示例工作流

1. 内容创作工作流

workflow = generate_workflow("""
    1. 搜索AI最新新闻
    2. 分析热点话题
    3. 撰写文章
    4. 生成配图
    5. 发布到博客
""")

2. 数据分析工作流

workflow = generate_workflow("""
    1. 从数据库读取销售数据
    2. 分析销售趋势
    3. 生成可视化图表
    4. 输出分析报告
""")

3. 客服工作流

workflow = generate_workflow("""
    1. 接收用户问题
    2. 查询FAQ知识库
    3. 如无法回答,搜索文档
    4. 生成回复
    5. 记录对话
""")

许可证

MIT License

Usage Guidance
This package implements a powerful workflow engine that will read files, connect to databases, send email, call webhooks, and talk to AI providers. Before installing or running it: 1) Be cautious about providing API keys (OpenAI/Anthropic/SMTP/DB) — the skill does not declare required env vars but will use any keys you give it; never paste production secrets without isolation. 2) Note the code contains hard-coded local sys.path entries pointing to a developer's Windows workspace (C:\Users\qiuwe\...), which is unexpected and could alter imports or access local skill code; consider removing those lines. 3) The AIModel supports an unknown third-party endpoint (https://api.deepseek.com); avoid or inspect usage of that provider if you must protect data confidentiality. 4) Run the code in an isolated environment (network-restricted or sandbox) and review/modify any outbound HTTP calls (webhooks, AI adapters) before giving it real credentials or production data. If you want to proceed, remove/replace hard-coded paths, limit allowed providers to vetted endpoints (e.g., only OpenAI), and ensure secrets are supplied in a controlled manner.
Capability Analysis
Type: OpenClaw Skill Name: ai-workflow-engine Version: 1.0.0 The skill bundle contains hardcoded absolute file paths targeting a specific user's directory (C:\Users\qiuwe\...) in ai_workflow.py to import dependencies, which is a significant security risk and indicates environment-specific targeting or poor development practices. While the bundle's stated purpose is an 'AI Workflow Engine,' it includes a broad range of high-risk capabilities such as network requests (NetworkSteps.fetch_url), database operations (DatabaseSteps), and template-based code generation (NLCodeGenerator). Although no explicit evidence of intentional data exfiltration or backdoors was found, the combination of environment-specific hardcoding and extensive system-level access warrants a suspicious classification.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
Name/description claim an AI workflow engine and the included Python files implement orchestration, RAG, DB, Excel, webhooks and model adapters — so capability matches purpose. However the code inserts hard-coded absolute sys.path entries that point to a specific developer's local workspace (C:\Users\qiuwe\...skills...), which is unexpected and suspicious for a distributable skill. The package also includes an extra 'deepseek' provider (unknown third-party endpoint) alongside openai/anthropic — this expands external data flows beyond what a typical self-contained workflow library would need.
Instruction Scope
SKILL.md instructs setting API keys and SMTP/DB configs via Config.set and shows examples that will read files, connect to DBs, send emails, and call webhooks. The instructions do not declare or limit the kinds of files or environment data the skill may access. The runtime code enables arbitrary HTTP requests (WebhookTrigger.call_webhook, AIModel._deepseek_chat) and uses local imports via injected sys.path, giving the skill a broad scope for reading local files and sending data externally.
Install Mechanism
There is no install spec (instruction-only from the platform perspective), which reduces automatic risk from external installers. A requirements.txt exists (openai, anthropic, chromadb, etc.), so users will likely pip-install network-capable packages. Nothing in the manifest downloads arbitrary archives or uses remote installers, but runtime code will perform network IO when used.
Credentials
The skill declares no required environment variables or primary credential, yet SKILL.md and the code clearly expect API keys (openai_key, anthropic_key) and other credentials (db_url, SMTP settings). This mismatch is important: the skill will work with secrets but does not advertise or restrict them. Additionally, the presence of an unknown external provider (deepseek) means sensitive data or prompts could be sent to an unvetted third party if that provider is used. Hard-coded sys.path entries could also cause the code to import other local skill modules, increasing access to local resources.
Persistence & Privilege
The skill does not request always:true and uses normal autonomous invocation defaults. It includes scheduler and webhook components that can run workflows over time, but that is consistent with the declared functionality. The skill does not appear to modify other skills' configurations, though the hard-coded sys.path behavior could cause it to access other skill code if present.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-workflow-engine
  3. After installation, invoke the skill by name or use /ai-workflow-engine
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
AI Workflow Engine initial release. - Introduces workflow orchestration with linear, conditional, parallel, loop/retry, and event-driven execution - Built-in Agent system for defining roles, multi-agent collaboration, memory management, and tool integration - RAG knowledge base supports document vectorization, semantic search, multi-format docs, and multi-turn Q&A - Automated ETL, data cleaning, and real-time data quality monitoring - Core code generation feature: generate complete workflows from natural language descriptions - Extensive usage examples and quickstart for all modes: auto-generation, manual, agent-based, RAG, and configuration
Metadata
Slug ai-workflow-engine
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is ai-workflow-engine?

智能工作流自动化引擎,支持任务编排、Agent协作、RAG知识库和自动代码生成,实现端到端AI工作流构建与执行。 It is an AI Agent Skill for Claude Code / OpenClaw, with 102 downloads so far.

How do I install ai-workflow-engine?

Run "/install ai-workflow-engine" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ai-workflow-engine free?

Yes, ai-workflow-engine is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ai-workflow-engine support?

ai-workflow-engine is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ai-workflow-engine?

It is built and maintained by XiLi-aXi (@qiuwenxi416488212-ship-it); the current version is v1.0.0.

💬 Comments