能力标签
⚙️
Agent工作流

GAI

基于 Go · 无代码搭建完整 AI 自动化流程
英文名:gai
⭐ 8 Stars 🍴 1 Forks 💻 Go 📄 LGPL-2.1 🏷 AI 8.0分
8.0AI 综合评分
AIGo工作流
✦ AI Skill Hub 推荐

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

📚 深度解析

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

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

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

📋 工具概览

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

GitHub Stars
⭐ 8
开发语言
Go
支持平台
Windows / macOS / Linux(跨平台)
维护状态
轻量级项目,按需更新
开源协议
LGPL-2.1
AI 综合评分
8.0 分
工具类型
Agent工作流
Forks
1

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

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

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

# 方式二:从源码编译
git clone https://github.com/lace-ai/gai
cd gai
go build -o gai .

# 方式三:下载预编译二进制
# 访问 Releases 页面下载对应平台二进制文件
# https://github.com/lace-ai/gai/releases
📋 安装步骤说明
  1. 访问 GitHub 仓库获取工作流文件
  2. 在对应平台(Dify / Flowise / Make 等)中找到「导入工作流」功能
  3. 上传工作流文件
  4. 按照提示配置必要的环境变量和 API Key
  5. 运行测试确认流程正常后投入使用
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
gai --help

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

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

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

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

简介

<p align="center"> <a href="https://github.com/lace-ai/gai/blob/main/go.mod"> <img alt="GitHub go.mod Go version" src="https://img.shields.io/github/go-mod/go-version/lace-ai/gai" style="margin: 0 6px;"> </a> <a href="https://github.com/lace-ai/gai/actions"> <img alt="CI" src="https://img.shields.io/badge/ci-passing-brightgreen.svg" style="margin: 0 6px;"> </a> <a href="https://github.com/lace-ai/gai/blob/main/LICENSE"> <img alt="License" src="https://img.shields.io/badge/license-LGPL-informational.svg" style="margin: 0 6px;"> </a> <a href="https://pkg.go.dev/github.com/lace-ai/gai"><img src="https://pkg.go.dev/badge/github.com/lace-ai/gai.svg" alt="Go Reference"></a> </p> <p></p>

GAI is a flexible Go framework for building agent-style applications on top of LLMs. It provides a generic interface for providers and models, prompt and context implementations, and a loop for agentic-calling workflows.

✨ Overview

The library is organized around three ideas:

  • 🧩 ai defines the core provider, model, request, and response abstractions.
  • 🗂️ context composes prompts, budgets context, renders message history, and loads prompt files.
  • 🔁 loop runs iterative model and tool execution when a model returns a tool call.

📋 Requirements

  • Go 1.26.x or newer
  • API credentials for whichever provider you use

📦 Installation

go get github.com/lace-ai/gai

🧱 PromptBuilder

</summary>

PromptBuilder composes the full ai.Prompt from structured parts:

prompt := gaictx.NewPromptBuilder().
    Budget(gaictx.PromptBudget{
        Tokenizer:            model.Tokenizer(),
        ContextWindowTokens:  128000,
        ReservedOutputTokens: 4096,
    }).
    System("base-system", "Follow the system policy.", gaictx.Required()).
    Source(gaictx.SectionContext, "history", gaictx.History(store, sessionID), gaictx.Required(), gaictx.SourceTokenCap(1000)).
    Source(gaictx.SectionContext, "rag", ragSource, gaictx.Optional(), gaictx.SourceTokenCap(2000)).
    User("request", "Summarize the project status.", gaictx.Required())

Entries use stable IDs and are rendered in fixed section order (system, context, user). Inside each section, required entries render before optional entries; configured order is preserved within the required group and within the optional group. This lets required sources receive budget before optional context can consume it.

With Budget(...) configured, the builder counts the rendered prompt with the configured tokenizer. ContextWindowTokens - ReservedOutputTokens is the prompt budget, and ConversationReserveTokens reserves space for loop messages appended by incremental prompt sessions. Required entries must fit or BuildPrompt returns ErrPromptBudget. Optional entries are best-effort: the builder includes them when they fit, asks the configured Summarizer to compact optional static parts when they do not fit, and drops them when there is no fitting summary. Optional source failures are skipped, and optional source overflow is dropped.

Dynamic sources implement:

type Source interface {
    BuildParts(ctx context.Context, view PromptView, budget SourceBudget) ([]Part, error)
}

PromptView exposes the current conversation and a read-only view of the whole configured prompt plan, so sources can inspect planned entries by ID or section before emitting parts. SourceBudget provides the source's cap, remaining prompt budget, tokenizer, render-overhead reserve ratio, required flag, and optional summarizer. SourceTokenCap(...) limits one source's budget; uncapped sources receive the remaining prompt budget.

The default renderer is XML-like and can be replaced with a custom renderer. Grouped parts render as one outer part with child items, which lets sources like RAG budget individual documents without adding a full XML wrapper around every document. LastTrace() returns the most recent build trace, including emitted, skipped, dropped, summarized, token counts, available tokens, and reasons. Debug(gai.DebugSink) emits the same prompt-build decisions. Rendered part text is only included in debug events when the sink allows sensitive data.

</details>

<details>

<summary>

🚀 Quick Start

🧭 Usage

🛠️ Creating Providers and Models

To start, first create a provider. For example, for Gemini:

geminiProvider := gemini.New("your_api_key", nil)

<details>

<summary>🗂️ Use the Model Repository to manage multiple providers and dynamic model selection</summary>

You can use a ModelRepository to register multiple providers and look up models by name across providers.

modelRepo := ai.NewModelRepository(nil)
err := modelRepo.RegisterProvider(context.Background(), geminiProvider)
if err != nil {
    // handle error
}

To get a model from the repo just use the provider name and the model name:

model, err := modelRepo.GetModel(context.Background(), "gemini", "gemini-3-flash-preview")
if err != nil {
    // handle error
}

</details>

💬 Generate Text

Now you can access models from that provider, and generate text:

model, err := geminiProvider.Model("gemini-3-flash-preview")
if err != nil {
    // handle error
}
response, err := model.Generate(context.Background(), ai.AIRequest{
    Prompt: ai.Prompt{
        System: "You are a helpful assistant.",
        Prompt: "What is the capital of France?",
    },
    MaxTokens: 100,
})

<details>

<summary>🔌 Implement Your Own Provider</summary>

Currently, the library includes Gemini and Mistral implementations. Gemini uses the official go-genai library, and Mistral uses direct HTTP calls to the Mistral API.

But you can implement your own provider by implementing the Provider, Model, and Tokenizer interfaces defined in the ai package.

Example:

Provider Implementation:

type MyProvider struct {
    // any configuration fields you need, e.g. API key
}

func (p *MyProvider) Name() string {
    return "myprovider"
}

func (p *MyProvider) Model(name string) (ai.Model, error) {
    // return a model implementation based on the name
}

func (p *MyProvider) ListModels() ([]string, error) {
    // return a list of available model names
}

func (p *MyProvider) Validate() error {
    // validate the provider configuration, e.g. check API key is set
}

Model Implementation:

type MyModel struct {
    // any configuration fields you need, e.g. model name, provider reference
    name string
}

func (m *MyModel) Name() string {
    return m.name
}

func (m *MyModel) Generate(ctx context.Context, req ai.AIRequest) (*ai.AIResponse, error) {
    // implement the logic to call your model API and return the response
}

func (m *MyModel) GenerateStream(ctx context.Context, req ai.AIRequest) <-chan ai.Token {
    // implement streaming token generation
}

func (m *MyModel) Close() error {
    // clean up any resources if needed
}

func (m *MyModel) Tokenizer() ai.Tokenizer {
    // return a tokenizer implementation for your model
}

Tokenizer Implementation:

type MyTokenizer struct{}

func (t MyTokenizer) ID() string {
    return "myprovider.my-model"
}

func (t MyTokenizer) Tokenize(ctx context.Context, text string) ([]string, error) {
    // split text into model-specific tokens
}

func (t MyTokenizer) CountTokens(ctx context.Context, text string) (int, error) {
    // return the token count for text
}

Now you can use your custom provider just like the built-in ones

</details>

🧰 Tool Interface

</summary>

Tools must implement:

type Tool interface {
    Name() string
    Description() string
    Params() string
    Function(req *ai.ToolCall) *ToolResponse
}

Tool calls are expected to arrive as JSON with this shape:

{
  "type": "function",
  "name": "tool_name",
  "arguments": {
    "some": "value"
  }
}

Tool call IDs are generated internally by the runtime and are not model-controlled.

</details>

<details>

<summary>

🧱 Package Layout

agent/       Reusable loop-backed agent definitions and built-in agents such as summary.
ai/          Core abstractions: Provider, Model, Tokenizer, AIRequest, AIResponse, ModelRepository. With implementations for Gemini and Mistral.
context/     Prompt building, token budgeting, dynamic sources, sessions, RAG, summaries, and message rendering.
loop/        Agent loop, tool parsing, tool execution helpers.
testutil/    Mocks used by tests.
🎯 aiskill88 AI 点评 A 级 2026-06-03

高质量的AI工作流框架,易于使用

⚡ 核心功能

👥 适合人群

自动化工程师和运维人员项目经理和业务分析师希望减少重复性工作的专业人士数字化转型团队

🎯 使用场景

  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同

⚖️ 优点与不足

✅ 优点
  • +大幅减少重复性人工操作
  • +可视化流程,清晰直观
  • +可扩展性强,支持复杂场景
⚠️ 不足
  • 初始配置和调试需投入一定时间
  • 强依赖外部服务的稳定性
  • 复杂场景需具备一定技术基础
⚠️ 使用须知

该工具使用 LGPL-2.1 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

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

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

📄 License 说明

⚠️ LGPL 2.1 — 弱 Copyleft,可动态链接到商业软件,但修改库本身须开源。

🔗 相关工具推荐

🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

GAI是一个开源的Go框架,用于构建智能应用
💡 AI Skill Hub 点评

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

⬇️ 获取与下载
⬇ 下载源码(GPL)
⚠️ 本工具使用 LGPL-2.1 协议。您可以自由下载和使用,但衍生作品必须以相同协议开源,不可商业闭源。使用前请确认符合协议要求。
📚 深入学习 GAI
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 gai
Topics AIGo工作流
GitHub https://github.com/lace-ai/gai
License LGPL-2.1
语言 Go
🔗 原始来源
🐙 GitHub 仓库  https://github.com/lace-ai/gai 🌐 官方网站  https://lace.moorph.eu/

收录时间:2026-06-03 · 更新时间:2026-06-03 · License:LGPL-2.1 · AI Skill Hub 不对第三方内容的准确性作法律背书。