能力标签
⚙️
Agent工作流

开源AI工作流

基于 TypeScript · 无代码搭建完整 AI 自动化流程
英文名:inferwise
⭐ 7 Stars 🍴 1 Forks 💻 TypeScript 📄 Apache-2.0 🏷 AI 7.5分
7.5AI 综合评分
workflowaiclicost-optimizationdevtoolsfinopstypescript
✦ AI Skill Hub 推荐

AI Skill Hub 推荐使用:开源AI工作流 是一款优质的Agent工作流。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。

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

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

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

Like a spell checker, but for your AI costs。扫描代码,估算成本,阻止超支。

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

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

Like a spell checker, but for your AI costs。扫描代码,估算成本,阻止超支。

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

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

# 方式二:npx 直接运行(无需安装)
npx inferwise --help

# 方式三:项目依赖安装
npm install inferwise

# 方式四:从源码运行
git clone https://github.com/inferwise/inferwise
cd inferwise
npm install
npm start
📋 安装步骤说明
  1. 访问 GitHub 仓库获取工作流文件
  2. 在对应平台(Dify / Flowise / Make 等)中找到「导入工作流」功能
  3. 上传工作流文件
  4. 按照提示配置必要的环境变量和 API Key
  5. 运行测试确认流程正常后投入使用
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
inferwise --help

# 基本用法
inferwise [options] <input>

# Node.js 代码中使用
const inferwise = require('inferwise');

const result = await inferwise.run(options);
console.log(result);
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# inferwise 配置说明
# 查看配置选项
inferwise --config-example > config.yml

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

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

简介

<p align="center"> <img src="assets/banner.png" alt="Inferwise" width="120" /> </p>

CI Setup

The $1,800/mo Example

An AI coding agent builds a RAG pipeline and picks Opus for every step — embeddings, retrieval, summarization, response generation. Those calls will run in production, billed per token to your API key.

Without Inferwise: The agent picks the most capable (and expensive) model for every call. The bill shows up after the code ships. $2,400/mo.

With Inferwise MCP: The agent calls suggest_model for each task — it learns that classification only needs gpt-4o-mini, summarization works fine on claude-sonnet-4, and only the reasoning step needs claude-opus-4. Cost drops to $600/mo before a single line ships.

With Inferwise CI: Even if the agent doesn't use MCP, inferwise diff flags "+$2,400/mo in new API costs" on the PR. The developer swaps models. Same result.

$1,800/mo saved before a single line ships.

---

Quick Start

```bash

Concrete Example

Your code:
  anthropic.messages.create({
    model: "claude-opus-4-20250514",
    system: "Classify tickets into: billing, technical, account",
    messages: [{ role: "user", content: ticket }],
  })

Inferwise analyzes:
  System prompt extracted -> medium confidence
  No code/reasoning keywords -> capability: [general]
  Opus 4 = premium tier, quality: 94/100, $75/M output

Candidates passing quality gate (general, quality >= 66):
  o3           mid tier, quality: 94, $8/M   -> quality-adj: $8.51/M
  gpt-4.1      mid tier, quality: 90, $8/M   -> quality-adj: $8.89/M
  gpt-4o       mid tier, quality: 77, $10/M  -> quality-adj: $12.99/M

Blocked by quality gate:
  flash-lite   budget, quality: 52 -> 52/94 = 55% < 70% threshold

Result:
  chat-service.ts:8  claude-opus-4 -> o3 (openai)
    Use case: [general] (medium confidence)
    Savings: $527/mo -- quality: 94 vs 94

Every model in the pricing database is tagged with its capabilities and quality benchmarks. See packages/pricing-db/providers/ for pricing and packages/pricing-db/benchmarks.json for quality scores.

---

Set up guardrails: config + git hooks + CI

npx inferwise init

Configuration

`inferwise.config.json`

Create with inferwise init or manually:

{
  "defaultVolume": 1000,
  "ignore": ["node_modules", "dist", "build", "test", "__tests__", "*.test.ts", "*.spec.ts"],
  "overrides": [
    {
      "pattern": "src/chat/**",
      "volume": 5000
    }
  ],
  "budgets": {
    "warn": 2000,
    "block": 50000,
    "requireApproval": 10000,
    "approvers": ["platform-eng", "@infra-team"]
  },
  "telemetry": {
    "backend": "grafana-tempo",
    "endpoint": "https://tempo.internal:3200",
    "apiKey": "glsa_..."
  }
}

Budget thresholds (monthly cost increase in USD):

FieldDefaultDescription
warn$2,000Warning in stderr (CLI) or yellow label on PR (GitHub Action)
block$50,000**Hard gate.** Exit code 1 (CLI) or red label + failed check (GitHub Action). Blocks merge in any CI.
requireApproval**Soft gate, GitHub Action only.** Orange label + requests review from approvers. Does not fail CI — relies on branch protection rules to enforce.
approversGitHub teams or users who can approve over-budget PRs. Only used with requireApproval.

Budget defaults are deliberately high — block is an emergency brake for catastrophic changes (wrong model at scale, missing max_tokens cap), not routine cost increases.

Environment Variables

VariableDescription
INFERWISE_CONFIGPath to config file (overrides auto-discovery)
INFERWISE_VOLUMEDefault daily request volume (overridden by --volume)
ANTHROPIC_ADMIN_API_KEYCalibration via Anthropic Admin API
OPENAI_API_KEYCalibration via OpenAI Usage API
OPENROUTER_API_KEYCalibration via OpenRouter (all providers in one call)

---

Direct provider APIs

ANTHROPIC_ADMIN_API_KEY=sk-ant-admin-... inferwise calibrate .

Or calibrate ALL providers via OpenRouter (one API key covers everything)

OPENROUTER_API_KEY=sk-or-... inferwise calibrate .


Fetches real usage data from provider APIs (or OpenRouter), computes correction ratios, and stores them locally. Future estimates go from "2-5x accuracy" to "within 20%".

**6. Connect to OTel for production-accurate estimates (optional)**

Add to `inferwise.config.json`:
json { "telemetry": { "backend": "grafana-tempo", "endpoint": "https://tempo.internal:3200", "apiKey": "glsa_..." } } ```

If your LLM calls are instrumented with OpenTelemetry (using the GenAI semantic conventions), Inferwise reads your existing traces to get real token averages per model. Estimates go from "2-5x accuracy" to "within 10%". Supports Grafana Tempo and Prometheus/OTLP backends.

---

What Ships: Four Packages

PackageWho Uses ItWhat It Does
[inferwise](https://www.npmjs.com/package/inferwise)Developers, CI, AI agentsCLI + SDK — scan, estimate, diff, check, audit, enforce budgets
[@inferwise/pricing-db](packages/pricing-db)Model routers, cost-aware appsBundled pricing for 35+ models across 5 providers, capability-based model selection, updated daily
[@inferwise/mcp](packages/mcp-server)AI agents (Claude Code, Cursor, VS Code, Windsurf)MCP server — suggest models, estimate costs, audit codebases as AI agent tools
[inferwise/inferwise-action](packages/github-action)GitHub reposPR cost comments, labels, reviewer requests, merge blocking

---

End-to-End Pipeline

Every AI API call in your codebase can pass through four tiers before it reaches production.

Code written (by human or AI agent)
        |
        v
  +-----------+
  |  TIER 0   |  Smart model selection (before/during code writing)
  |           |  MCP suggest_model / inferwise audit
  |           |  "Use gpt-4o-mini — classification doesn't need Opus"
  +-----+-----+
        |
        v
  +-----------+
  |  TIER 1   |  Pre-commit hook (developer machine)
  |           |  inferwise estimate .
  |           |  "This commit adds $2,400/mo in LLM costs"
  +-----+-----+
        |  developer pushes
        v
  +-----------+
  |  TIER 2   |  CI gate (GitHub Action / GitLab / any CI)
  |           |  inferwise diff --base main --head HEAD
  |           |  Posts cost report on PR, applies labels
  +-----+-----+
        |  budget check
        v
  +-----------+
  |  TIER 3   |  Budget policy (inferwise.config.json)
  |           |  warn: $2,000   -> yellow label, warning in PR
  |           |  block: $50,000 -> exit code 1, fails CI, blocks merge
  +-----------+
TierWhereWhat Happens
Smart selectionMCP server / inferwise auditRecommends cheapest capable model for each task
Pre-commit hookDeveloper machineShows costs before commit, catches obvious spikes
CI required checkPR/MR merge gateBlocks merge if budget exceeded, comments cost report
Budget policyinferwise.config.jsonOrg-wide thresholds committed to the repo, code-reviewed like any other config

For Developers: The Day-to-Day Workflow

1. Setup (once)

npx inferwise init

Creates inferwise.config.json, installs a pre-commit hook, prints CI setup instructions for GitHub Actions / GitLab / Bitbucket / Jenkins.

2. Audit existing code for optimization

npx inferwise audit .
SMART MODEL ALTERNATIVES

  src/rag.ts:6 — claude-opus-4 → claude-sonnet-4 (anthropic)
    Use case: general (high confidence)
    Reason: Task requires [general] — Sonnet handles that at 79% savings
    Savings: $14,595/mo ($18,440 → $3,845)

  src/classify.ts:14 — gpt-4o → gpt-4o-mini (openai)
    Use case: general (medium confidence)
    Reason: Task requires [general] — gpt-4o-mini handles that at 90% savings
    Savings: $4,500/mo ($5,000 → $500)

Inferwise reads the prompts in your code, infers what each LLM call does, and recommends cheaper models that can handle the task. See How Model Selection Works for details.

3. Write code with LLM API calls

You (or an AI coding agent) write code that calls provider APIs. On git commit, the pre-commit hook runs automatically:

$ git commit -m "feat: add summarizer"

File               Line  Provider   Model           Cost/Call  Monthly
src/summarize.ts   18    openai     gpt-4o          $0.0064    $192/mo
src/rag.ts         91    anthropic  claude-opus-4   $0.0429    $1,287/mo

Total: $1,479/mo (at 1,000 req/day)

You see the cost impact before the code leaves your machine.

4. Open a pull request

CI runs inferwise diff. The GitHub Action posts a cost report directly on the PR:

FileModelChangeMonthly Impact
src/summarize.ts(new) gpt-4oAdded+$192/mo
src/rag.tsclaude-sonnet-4 -> claude-opus-4Upgrade+$1,050/mo

Net: +$1,242/mo

If the increase exceeds budgets.block, the PR is blocked from merging.

5. Calibrate for tighter estimates (optional)

```bash

Bitbucket Pipelines

pipelines:
  pull-requests:
    '**':
      - step:
          name: Cost Check
          script:
            - npx inferwise diff --format table

Compare costs between branches

npx inferwise diff


For AI agents — add the MCP server:
bash

Cursor / VS Code / Windsurf — add to MCP settings:

{ "mcpServers": { "inferwise": { "command": "npx", "args": ["-y", "@inferwise/mcp"] } } }


Or install globally:
bash npm install -g inferwise

Cursor / VS Code / Windsurf — add to MCP settings:

{ "mcpServers": { "inferwise": { "command": "npx", "args": ["-y", "@inferwise/mcp"] } } }


Once connected, the agent gets four tools:

| Tool | What It Does |
|------|-------------|
| `suggest_model` | Describe a task, get back the cheapest capable model with alternatives and reasoning |
| `estimate_cost` | Estimate the cost of an LLM API call given provider, model, and token counts |
| `audit` | Scan a directory for LLM API calls and suggest cheaper capable alternatives |
| `apply_recommendations` | Auto-apply model swap recommendations to source files (from audit or explicit list) |

**Example flow — new code:** An agent writing a classification pipeline calls `suggest_model` with task "classify support tickets by category" — Inferwise returns `gpt-4o-mini` at $0.60/MTok instead of `gpt-4o` at $10/MTok. The agent writes the code with the right model from the start.

**Example flow — existing code:** An agent calls `apply_recommendations` with `{ directory: "." }` — Inferwise audits the codebase, finds that `claude-opus-4` is overkill for a classification task, and rewrites the model ID to `claude-sonnet-4` in the source file. The agent commits the change. No human needed.

The MCP server runs locally as a subprocess — no hosted infrastructure, no API keys needed. It communicates via stdio using JSON-RPC. Works with Claude Code, Cursor, VS Code (1.99+), Windsurf, Cline, and any MCP-compatible tool.

#### Programmatic Alternatives

For agents and pipelines that don't support MCP:

**SDK** — embed directly in agent pipelines:
typescript import { estimateAndCheck } from "inferwise/sdk";

const result = await estimateAndCheck("./src", { maxMonthlyCost: 10000, volume: 5000 }); if (!result.ok) console.error("Over budget:", result.violations);


**CLI** — tool-use for agents and scripts:
bash inferwise check . --max-monthly-cost 10000 --format json inferwise price openai gpt-4o --input-tokens 2000 --output-tokens 1000 --format json

**Pricing database** — for model routers and cost-aware selection:
typescript import { suggestModelForTask, calculateCost, getModel } from "@inferwise/pricing-db";

const suggestion = suggestModelForTask("classify support tickets"); const cost = calculateCost({ model: suggestion.model, inputTokens: 2000, outputTokens: 500 }); ```

---

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

此项目提供了一个开源的AI工作流,用于成本优化和成本控制。虽然它有潜在的风险,但也提供了一个有用的工具。

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

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

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

📄 License 说明

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

🔗 相关工具推荐
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
请参阅README文件
💡 AI Skill Hub 点评

总体来看,开源AI工作流 是一款质量良好的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

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

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

📚 深入学习 开源AI工作流
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 inferwise
原始描述 开源AI工作流:Like a spell checker, but for your AI costs. Scans code, estimates spend, blocks。⭐7 · TypeScript
Topics workflowaiclicost-optimizationdevtoolsfinopstypescript
GitHub https://github.com/inferwise/inferwise
License Apache-2.0
语言 TypeScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/inferwise/inferwise

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