Skip to content

tuxi/flux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flux

Flux is a deterministic execution kernel for DAG-based workflows. It does not reason, it does not own users, and it does not manage conversations. It executes plans generated by Agent Runtime.


一句话

Flux 是一个与 Agent 解耦的 Workflow 执行内核。它接收一个 Plan(DAG),做依赖求解、并行调度、async/await、trace/replay。谁生成 Plan?Agent Runtime(code-agent、DreamAI、Claude Code…)。Flux 不关心。

三种用法

                flux kernel
               /     |      \
        library    MCP     tool
       (Go import) (stdio) (Agent)
模式 说明 适用
Library import "flux"engine.Run() DreamAI(已有 Agent Runtime)
MCP Server flux-mcp-serverplan_workflow tool Claude Code / 任何 MCP Agent
Tool 嵌入 实现 tools.Tool 接口,同进程调用 AgentKit / code-agent

三种模式共享同一份内核代码。详见 docs/v3/architecture-v3.md

五层架构

Layer 1  UI              AgentKit / DreamAI
Layer 2  Agent Runtime   决策层(Loop / Tool / Approval)
Layer 3  Tool Layer      普通工具 + Flux Workflow Tool
Layer 4  Workflow Runtime flux(DAG / Scheduler / Async / Trace)
Layer 5  Persistence     Store 接口(SQLite / PG / Memory adapter)

快速开始

MCP Server

export LLM_API_KEY="your-key"
go run ./cmd/flux-mcp-server

在 Claude Code 或其他 MCP Agent 中配置此 server,即可使用 plan_workflow 工具。

内核(Go library)

import "flux/runtime"

flux/runtime 只依赖 stdlib:Plan IR、Scheduler(依赖求解/并行/async/retry)、ExecStatePlanSource 接缝。零 flux/* 依赖。

Store 接口(v3)

import "flux/store"

flux/store 定义 WorkflowStoreAwaitStoreTraceStore 接口。消费者提供 adapter(SQLite / PG / Memory),注入 Engine。

文档

v3 架构 五层架构、持久化端口、集成契约、设计原则、决策记录
v3 开发计划 实施路线图
code-agent 对接 给 code-agent 团队的架构对齐建议
v2 文档 历史参考(核心设计保留)

About

Event-driven workflow runtime for Go.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages