Tutorials
These tutorials walk you through building real-world AI agents on the Datafi platform. Each tutorial creates a complete, production-ready agent that you can customize for your own data.
Who Are These For?
These tutorials are designed for business users -- Sales Operations, RevOps, Customer Success, and other teams who want to automate data-driven workflows. No programming experience is required, though the tutorials include full technical details for those who want to understand what's happening under the hood.
Prerequisites
Before starting any tutorial, make sure you have:
- Datafi account -- An active account with access to the Agent Studio. See Account Registration if you need to sign up.
- Connected data source -- At least one data source configured with customer or transaction data. See Connecting Datasets.
- Email service -- Email notifications configured for your workspace (required for tutorials that send reports). See Events & Notifications.
Available Tutorials
Building a Customer Churn Monitoring Agent
Build an agent that analyzes customer transaction patterns to detect churn risk. The agent queries your database, identifies customers with declining revenue (>20% drop), generates AI-powered retention recommendations formatted as HTML, and emails a weekly report to your sales team.
What you'll learn:
- Using the conversational builder to scaffold a workflow
- Refining workflows in the visual editor (JQ expressions, HTML formatting, variable substitution)
- Configuring scheduled execution with cron expressions
- Working with the query, array, json, regression, llm, markdown_table_formatter, and email tools
Time estimate: 30-45 minutes
Building a Customer Health Monitoring Agent
Build an agent that monitors overall customer health using statistical regression analysis. The agent fetches transaction data, performs trend analysis per customer, filters for at-risk accounts, generates retention recommendations, and sends a formatted report.
What you'll learn:
- Designing workflows with regression analysis
- Grouping and transforming data with JSON operations
- Configuring guard rails and resource limits
- Setting up retry policies for production reliability
Time estimate: 30-45 minutes
Tutorial Pattern
Both tutorials follow the same fundamental pattern that applies to most business automation agents:
Query Data → Transform → Analyze → Decide → Generate → Act
- Query -- Fetch data from your connected sources using PRQL
- Transform -- Group, filter, and reshape the data
- Analyze -- Apply statistical analysis or AI reasoning
- Decide -- Branch based on conditions (any results found?)
- Generate -- Use LLM to create recommendations or reports
- Act -- Send emails, update systems, or trigger downstream workflows
Once you understand this pattern, you can apply it to any business automation scenario.
After the Tutorials
After completing the tutorials, explore these resources:
- Agent Studio Guide -- Reference for every tab and setting in the Agent Studio.
- Agent Builder -- Deep dive into agent specification fields.
- Workflow Builder -- Advanced workflow patterns and error handling.
- Multi-Agent Coordination -- Coordinate multiple agents with events and shared state.