Package Exports
- ai-workflows
- ai-workflows/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ai-workflows) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ai-workflows
Composable AI Workflows & Durable Execution Framework
Overview
ai-workflows is a powerful framework for building event-driven, AI-powered workflows with durable execution guarantees. It provides both a JavaScript API and MDX-based workflow definitions for maximum flexibility.
Features
- 🎯 Event-Driven Architecture - Build reactive workflows that respond to external events
- 🤖 AI Functions - Built-in MDX-based AI functions structured data generation and processing
- ⏰ Smart Scheduling - Schedule tasks with natural language time expressions
- 📝 Workflow Definitions - Design workflows by composing AI functions and events
- 💪 Durable Execution - Reliable workflow execution with state persistence
Installation
npm install ai-workflowsUsage
JavaScript API
import { ai, Workflow } from 'ai-workflows'
const workflow = Workflow()
workflow.on('ticket.created', (ticket) => {
const summary = ai.summarize(ticket)
workflow.send('ticket.summarized', summary)
})
workflow.on('ticket.summarized', (summary) => ai.sentiment(summary).then('update.ticket'))
workflow.every('30 minutes during business hours', (context) => ai.reviewKPIs(context).then('slack.post'))
export default workflow