callstackincubator/flows-ai
关于
Run AI workflows with TypeScript & Vercel AI SDK
人工智能与机器学习实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Flows AI
A lightweight, type-safe AI workflow orchestrator inspired by Anthropic's agent patterns. Built on top of Vercel AI SDK.
Installation
npm install flows-ai
What to do next?
Motivation
Last year, we built Fabrice - an AI agent framework designed to break down complex tasks into smaller steps. We realized that AI agent systems today are essentially modern workflows where each node is an LLM call instead of a traditional function. The key difference lies not in the framework, but in the nature of these nodes: they have flexible input/output contracts.
This insight led us to redefine our approach and focus on an orchestration, so you can connect different (often incompatible input/outputs) together.
This library provides a simple, more deterministic way to build AI workflows. You can either explicitly define your workflow with loops and conditionals, or use an orchestrator agent to dynamically break down complex tasks.
On top of that, we keep our library simple and functional, without any classes or state.
Defining a workflow
First, you need to define your agents.
const translationAgent = agent({
model: openai('gpt-4o'),
system: 'You are a translation agent...',
})
const summaryAgent = agent({
model: openai('gpt-4o'),
system: 'You are a summary agent...',
})
Then, you can define and run your workflow.
const translateFlow = sequence([
{
agent: 'translationAgent',
input: 'Translate this text to English',
},
{
agent: 'summaryAgent',
input: 'Now summarize the translated text',
}
])
execute(translateFlow, {
agents: {
translationAgent,
summaryAgent
}
})
Learn more about this and other flows in our docs.
License
MIT
探索相关项目
加载中…