Agents
Agents are intelligent orchestrators that manage multiple playbooks simultaneously, enabling complex multi-step workflows that span different tools and data sources.Think of it this way:
- Playbook = Single automation task (e.g., “fetch weather”)
- Agent = Coordinator of multiple tasks (e.g., “morning routine: fetch weather, check calendar, send daily brief”)
What is an Agent?
An Agent is a smart container that:- 🎯 Orchestrates Multiple Playbooks - Run several automations as one cohesive workflow
- ⏰ Scheduled Execution - Run all playbooks at specified times or intervals
- 🔄 Sequential or Parallel - Control how playbooks execute (one after another or simultaneously)
- 📊 Unified Monitoring - Track all playbook executions in one place
- 🤖 NIRA-Powered - Build complex agents through conversation
Agent vs Playbook
Playbook
Single automation task
- One specific workflow
- Uses one or more MCP tools
- Runs independently
- Example: “Send Slack notification”
Agent
Multi-playbook orchestrator
- Coordinates multiple playbooks
- Manages complex workflows
- Scheduled or interval-based
- Example: “Daily morning routine”
When to Use Agents
Use Agents when you need to:Coordinate Multiple Data Sources
Coordinate Multiple Data Sources
Example: Pull data from Salesforce, enrich with market data from Finnhub, analyze with AI, and post results to SlackWhy Agent: Multiple playbooks working together, each handling one data source
Execute Sequential Workflows
Execute Sequential Workflows
Example: Morning routine - check weather → check calendar → check emails → generate daily brief → send to SlackWhy Agent: Playbooks need to run in specific order, passing data between steps
Recurring Multi-Step Processes
Recurring Multi-Step Processes
Example: Hourly: monitor system health → check API quotas → update dashboard → alert if issuesWhy Agent: Complex workflow that repeats on a schedule
Conditional Workflow Branching
Conditional Workflow Branching
Example: Sales pipeline: check new leads → qualify leads → assign to reps → notify team, but only for qualified leadsWhy Agent: Logic spans multiple playbooks with conditional execution
Creating an Agent with NIRA
The easiest way to create an agent is to ask NIRA:1
Describe Your Multi-Step Workflow
Tell NIRA about the complex automation you want to build
You: “I need a morning routine agent that checks the weather, pulls my calendar for today, summarizes my emails, and sends me a daily brief in Slack every weekday at 7am”
2
NIRA Analyzes & Proposes Structure
NIRA identifies this needs multiple playbooks and suggests an agent
NIRA says: 🤖“Perfect! This is a great use case for an Agent. I’ll create a ‘Morning Routine Agent’ with 4 playbooks:
- Weather Playbook - Fetches forecast for your location
- Calendar Playbook - Gets today’s events from Google Calendar
- Email Playbook - Summarizes unread emails
- Brief Playbook - Compiles everything and sends to Slack
3
Configure API Keys
Provide credentials for each service the agent will use
4
Review Agent Configuration
See all playbooks, their execution order, and schedule
5
Deploy & Monitor
Agent goes live and you can track each playbook execution
Agent Configuration
Scheduling Options
Agents can be configured with flexible scheduling:- Time-Based
- Interval-Based
- Event-Triggered
Run at specific times:
- Daily at 9:00 AM
- Weekdays at 8:00 AM and 5:00 PM
- Every Monday at 10:00 AM
- First day of month at 9:00 AM
Execution Modes
Control how playbooks within an agent execute:Sequential
Playbooks run one after anotherBest for:
- Dependent steps
- Data flows between playbooks
- Resource-intensive tasks
Parallel
Playbooks run simultaneouslyBest for:
- Independent tasks
- Speed optimization
- Multiple data sources
Playbook Dependencies
Define relationships between playbooks:Real-World Agent Examples
1. Sales Intelligence Agent
Sales Intelligence Agent
Goal: Provide daily competitive intelligence to sales teamPlaybooks:
- Competitor Monitor - Scrape competitor pricing pages
- Market Data - Fetch relevant market trends (Finnhub)
- CRM Sync - Pull today’s opportunities (Salesforce)
- AI Analysis - Analyze data and generate insights
- Report Generator - Create formatted report
- Slack Notifier - Send to #sales channel
2. System Health Agent
System Health Monitor
Goal: Monitor application health and alert on issuesPlaybooks:
- API Health Check - Test all API endpoints
- Database Monitor - Check database performance
- Log Analyzer - Scan for errors in last hour
- Quota Monitor - Check API usage limits
- Alert Generator - Create alerts if issues found
- PagerDuty Trigger - Escalate critical issues
3. Content Distribution Agent
Content Distribution Agent
Goal: Automatically publish content across multiple platformsPlaybooks:
- Content Fetch - Get approved posts from Notion
- Image Optimizer - Resize/optimize images
- Twitter Publisher - Post to Twitter
- LinkedIn Publisher - Post to LinkedIn
- Slack Notifier - Notify team of publications
- Analytics Tracker - Log publication to database
Managing Agents
Agent Dashboard
View all your agents in one place:- 📊 Execution history and success rates
- ⏱️ Next scheduled run times
- 🎯 Active vs paused agents
- 📈 Performance metrics per playbook
Editing Agents
Modify agents at any time:- ➕ Add new playbooks
- ➖ Remove playbooks
- 🔄 Change execution order
- ⏰ Update schedule
- 🔧 Adjust configurations
Pausing & Resuming
Temporarily disable agents without deleting:- Pause before holidays or maintenance
- Resume when ready
- Edit while paused
- View historical data even when paused
Advanced Features
Conditional Execution
Conditional Execution
Run playbooks based on conditions:
- Only send alerts if threshold exceeded
- Skip steps if data is empty
- Branch based on time of day or day of week
Data Passing Between Playbooks
Data Passing Between Playbooks
Share data between playbooks in an agent:
- Output from one playbook becomes input to next
- Access shared agent context
- Transform data between steps
Error Handling & Retries
Error Handling & Retries
Configure resilient agents:
- Retry failed playbooks automatically
- Continue on error vs stop agent
- Fallback playbooks
- Error notifications
Agent Variables
Agent Variables
Define reusable variables across playbooks:
- Environment configurations
- Shared settings
- Dynamic values
Monitoring & Logs
Track agent performance in detail:Execution History
- See every agent run with timestamp
- Playbook-by-playbook status
- Execution duration
- Success/failure indicators
Detailed Logs
- Each playbook’s output
- MCP tool interactions
- Error messages and stack traces
- Data transformations
Performance Metrics
- Average execution time
- Success rate percentage
- Resource usage
- Cost tracking (API calls)
Best Practices
Start Simple
Begin with 2-3 playbooks and add more as needed
Name Clearly
Use descriptive names: “Morning Routine” not “Agent 1”
Test Individually
Test each playbook before combining into agent
Monitor Initially
Watch first few runs closely to catch issues
Handle Failures
Configure retries and error handling upfront
Document Purpose
Add descriptions so team understands agent’s goal
Troubleshooting
Agent didn't run on schedule
Agent didn't run on schedule
Check:
- Agent is not paused
- Schedule timezone is correct
- Schedule cron expression is valid
- System status page for outages
One playbook failed, stopped entire agent
One playbook failed, stopped entire agent
Solution:
- Configure error handling to “continue” instead of “stop”
- Add retry logic to the failing playbook
- Review playbook logs to fix underlying issue
Playbooks running in wrong order
Playbooks running in wrong order
Check:
- Execution mode (sequential vs parallel)
- Playbook dependencies are configured correctly
- Review execution logs for actual order
Agent runs too slowly
Agent runs too slowly
Optimize:
- Switch independent playbooks to parallel execution
- Reduce API call frequency in playbooks
- Cache frequently-accessed data
- Review MCP tool performance