Workflow Structure
Workflows in Machina Sports are defined in YAML format with the following key sections:Task Types
Workflows support several task types to handle different operations:Connector Tasks
Connect to external APIs and services to fetch or send data.Document Tasks
Perform operations on documents in the Machina database (search, update, bulk-save).Prompt Tasks
Execute AI prompts to generate content or analyze data.Mapping Tasks
Transform data between different formats using predefined mappings.Conditional Logic
Tasks can include conditions to control execution flow:Real-World Example: Chat Completions Workflow
This example from our samples shows a workflow that processes chat messages and generates AI responses:Common Workflow Patterns
Data Synchronization
Fetch data from external sources and store it in your Machina database.Content Generation
Create AI-generated content based on sports data and user context.Chat Processing
Handle user messages and generate contextually relevant responses.Scheduled Tasks
Execute workflows at regular intervals using scheduler agents.Next Steps
- Explore Agents to understand how to schedule workflows
- Learn about Connectors to integrate data sources
- Review Mappings to transform data between formats
- See Prompts to optimize AI outputs