callstackincubator/flows-ai
حول
Run AI workflows with TypeScript & Vercel AI SDK
الذكاء الاصطناعي وتعلّم الآلةالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
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
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…