Agent Task Automation: The Best of Both Worlds
The Run Agent Task automation action represents a breakthrough in workflow design: the ability to seamlessly transition between structured, deterministic automation steps and intelligent, autonomous agent actions. This bridges two previously separate paradigms, giving you the reliability of automation combined with the adaptability of AI.New to Automations? Check out the Automation System guide first to understand how event-driven workflows work in Elementum.
The Core Concept
Traditional automation excels at structured, deterministic processes: “When X happens, do Y.” AI agents excel at unstructured tasks requiring reasoning, judgment, and proactive problem-solving. Until now, these have been separate capabilities. Run Agent Task changes this. You can now build workflows that:- Start with structured automation (trigger detection, data gathering)
- Hand off to an autonomous agent (intelligent analysis, research, decision-making)
- Return to structured automation (use agent output in subsequent actions)
Why This Matters
The Limitations Before Run Agent Task
Pure Automation Approach:- Excellent at deterministic tasks
- Struggles with tasks requiring judgment
- Can’t handle “figure it out” scenarios
- Limited to predefined logic paths
- Excellent at complex reasoning
- Can handle ambiguous tasks
- Unreliable for deterministic steps
- Harder to integrate into existing processes
The Hybrid Approach
Run Agent Task gives you both:Structured Reliability
Use automation for data gathering, record updates, notifications, and integrations
Intelligent Autonomy
Use agents for research, analysis, evaluation, and tasks requiring reasoning
Understanding the Run Agent Task Action
Configuration Components
1. Action Name
Descriptive name for the task within your automation workflow.2. Agent Selection
Choose an existing agent or create a new one specifically for this task. Agent Design Considerations:- Specialized agents: Create agents with expertise domains (research, analysis, evaluation)
- General agents: Use broad-capability agents for varied tasks
- Consistent agents: Reuse the same agent across similar automation tasks for consistency
3. Task Definition
The heart of the action. This is where you tell the agent what to accomplish. Critical Components: Context - Provide all necessary information using value references:4. Output Type
Choose how the agent returns its work: Text Output:- Simple narrative response
- Good for summaries, explanations, recommendations
- Flexible format
- Define specific fields you want returned
- Works exactly like AI File Reader
- Ensures consistent data format
- Enables direct use in subsequent actions
complexity_rating(text): Low/Medium/Highestimated_hours(number): Resolution time estimaterecommended_team(text): Team namereasoning(text): Explanation of recommendationsrequires_escalation(checkbox): Boolean flag
5. Testing & Preview
Before deploying, test your agent task with real values:- Fill in value references with actual data
- Run the agent task
- Verify the output format and quality
- Adjust task definition if needed
When to Use Run Agent Task
Ideal Use Cases
Research & Analysis
Research & Analysis
Scenario: Tasks requiring information gathering and synthesisExample:Why Agent Task: Research requires judgment about what information is relevant and how to synthesize it meaningfully.
Complex Evaluation & Assessment
Complex Evaluation & Assessment
Scenario: Decisions requiring multiple factors and reasoningExample:Why Agent Task: Contract evaluation requires understanding context, comparing terms, and making nuanced risk assessments.
Content Quality Assessment
Content Quality Assessment
Scenario: Evaluating quality, completeness, or appropriateness of contentExample:Why Agent Task: Quality assessment requires judgment and understanding of nuanced criteria.
Intelligent Data Enrichment
Intelligent Data Enrichment
Scenario: Enhancing records with synthesized informationExample:Why Agent Task: Data enrichment requires synthesis of multiple sources and intelligent inference.
Multi-Step Problem Solving
Multi-Step Problem Solving
Scenario: Tasks requiring sequential reasoning and proactive actionExample:Why Agent Task: Problem diagnosis requires connecting information, reasoning about causes, and planning solutions.
When NOT to Use Run Agent Task
Use standard automation actions instead when:Deterministic Logic
Simple IF/THEN logic, calculations, or predefined rulesUse: IF conditions, Run Calculation
Direct Data Operations
Creating, updating, searching, or relating records with known valuesUse: Create Record, Update Record Fields, Search Records
Standard Classifications
Categorization with clear, predefined categoriesUse: AI Classification
API Integrations
Direct calls to external systems with structured parametersUse: Send API Request
- Yes → Consider Run Agent Task
- No → Use standard automation actions
The Headless Environment
A critical concept: agents in Run Agent Task operate in a headless environment - there is no user available to provide clarification or additional input.What This Means
No User Interaction:- Agent cannot ask follow-up questions
- Agent cannot request additional information
- Agent cannot seek clarification
- All context provided upfront through value references
- Task definition must be complete and clear
- Success criteria must be unambiguous
Best Practices for Headless Operation
1. Provide Complete Context
Bad:2. Define Clear Success Criteria
Bad:3. Use Value References Extensively
Make all relevant data available:4. Anticipate Agent Needs
Think through what information an intelligent human would need:- Historical context
- Business rules or policies
- Comparative data
- Success thresholds
- Constraints or limitations
Working with Structured Output
Structured output is powerful because it ensures consistent, usable data from agent tasks.Defining Output Fields
Similar to AI File Reader, you define exactly what fields you want: Field Configuration:- Field Name: Variable name for use in subsequent actions
- Field Type: text, number, checkbox, date, list, etc.
- Description (optional but recommended): Helps the agent understand what you want
Using Output in Subsequent Actions
Once the agent task completes, its output becomes available as variables:Error Handling with Structured Output
The system includes built-in retry logic (up to 3 attempts) when agents don’t provide correctly formatted output:- Agent attempts to provide structured output
- If format is incorrect, system returns error to agent with details
- Agent tries again with error context
- Repeat up to 3 times
Real-World Workflow Examples
Example 1: Intelligent Order Processing
Scenario: E-commerce company wants to provide personalized order handling- Structured steps for order retrieval and customer lookup
- Agent intelligence for personalization analysis
- Structured steps for order updates and communications
- Combines speed of automation with quality of human-like judgment
Example 2: Smart Support Ticket Routing
Scenario: Support organization wants intelligent ticket routing beyond simple keywords- AI Classification handles basic categorization
- Agent Task handles nuanced assessment requiring context and judgment
- Structured routing logic uses agent insights
- Pattern detection enables proactive customer success intervention
Example 3: Intelligent Document Review
Scenario: Legal team needs automated first-pass contract review- AI File Analysis extracts data (structured)
- Agent Task provides nuanced risk assessment (intelligence)
- Routing logic uses risk assessment (structured)
- Combines speed of automation with quality of expert review
Best Practices
Task Definition Quality
Be Specific but Not Restrictive
Be Specific but Not Restrictive
Goal: Give the agent clear direction while allowing intelligent interpretationBad:Good:Why: Specific objectives with room for intelligent interpretation gives best results.
Include Success Evaluation Criteria
Include Success Evaluation Criteria
Goal: Help the agent understand what “done” looks likePattern:Example:Why: Success criteria guide the agent’s autonomous actions and ensure consistent output.
Provide Business Context
Provide Business Context
Goal: Enable the agent to make decisions aligned with business prioritiesExample:Why: Business context enables better judgment about priorities and trade-offs.
Output Field Design
Balance Detail and Usability
Balance Detail and Usability
Goal: Get enough information for decisions without overwhelming downstream logicExample:Avoid:
Design for Downstream Actions
Design for Downstream Actions
Goal: Structure output to align with how you’ll use itIf you’ll route based on output:If you’ll calculate or aggregate:If you’ll display to humans:
Testing Strategy
Test with Representative Scenarios
Test with Representative Scenarios
Test your agent task with various real-world cases:
- Typical cases: Most common scenarios
- Edge cases: Unusual or extreme situations
- Ambiguous cases: Situations requiring judgment
- Data variations: Different data completeness or quality
- Use the Test & Preview feature
- Fill in value references with real data
- Run the agent task
- Evaluate output quality and format
- Refine task definition if needed
- Repeat until consistent quality achieved
Monitor and Iterate
Monitor and Iterate
After deployment:
- Review early executions: Check first 10-20 runs manually
- Track error rates: Monitor
run_agent_task.successfield - Gather feedback: Talk to users affected by agent decisions
- Refine task definition: Adjust based on real-world performance
- Update success criteria: Clarify based on observed issues
- Agent task definitions can be updated without breaking workflows
- Iterate based on performance data
- Consider creating specialized agents for high-volume tasks
Error Handling Patterns
Always Check Success Field
Always Check Success Field
Pattern:Why: Prevents downstream actions from using incomplete or invalid data.
Implement Graceful Degradation
Implement Graceful Degradation
Pattern:Example:Why: System remains operational even if agent task fails.
Agent Deletion Protection
When you attempt to delete an agent that’s used in automations:- System prevents deletion
- Shows list of automations using the agent
- Provides direct links to each automation
- Check which automations use it
- Update those automations to use different agent or different action
- Test updated automations
- Then delete the agent
Advanced Patterns
Chaining Agent Tasks
For complex workflows, chain multiple agent tasks:Conditional Agent Invocation
Use agents only when intelligence is needed:Agent + Human Hybrid
Combine agent intelligence with human oversight:Integration with Other Features
Combine with AI File Reader
Combine with API Requests
Combine with Classification
Import/Export Considerations
Good News: Automations with Run Agent Task actions export and import smoothly. What Exports:- Run Agent Task action configuration
- Task definitions
- Output field definitions
- Agent references
- Agents themselves don’t export with the automation
- When importing to new app, ensure required agents exist or create them
- Agent names must match for import to work seamlessly
- Document which agents your automation uses
- Create agents with consistent names across environments
- Test imported automations thoroughly
Getting Started Checklist
Ready to build your first agent task automation? Follow this checklist:- Identify a use case where judgment or research is needed
- Design the workflow showing structured → agent → structured pattern
- Create or select an agent with appropriate capabilities
- Write task definition with complete context and success criteria
- Define output fields (if using structured output)
- Test with real data using Test & Preview feature
- Implement error handling with success field checks
- Deploy to test automation with low-volume trigger
- Monitor first executions and gather feedback
- Iterate and refine task definition based on results
- Scale to production once quality is validated
Next Steps
Automation Actions Reference
See all available automation actions including Run Agent Task details
AI in Automations
Learn about other AI-powered automation capabilities
Agent Architecture
Understand how agents work and integrate with workflows
Best Practices
Master general automation and workflow best practices
Questions or feedback? The Run Agent Task action represents a new paradigm in workflow automation. As you explore its capabilities, your feedback helps us improve the feature and documentation.