New to Automations? Check out the Automation System guide first to understand how event-driven workflows work in Elementum.
How It Works
Traditional automation excels at structured, deterministic processes: “When X happens, do Y.” AI agents excel at unstructured tasks requiring reasoning, judgment, and problem-solving. Run Agent Task combines both approaches in a single workflow:- Start with structured automation (trigger detection, data gathering)
- Hand off to an autonomous agent (analysis, research, decision-making)
- Return to structured automation (use agent output in subsequent actions)
- Pure Automation
- Pure Agent
- Hybrid (Run Agent Task)
- Excellent at deterministic tasks
- Struggles with tasks requiring judgment
- Can’t handle “figure it out” scenarios
- Limited to predefined logic paths
Configure a Run Agent Task
To add a Run Agent Task to your workflow, open yourAction Name
Provide a descriptive name for the task within your automation workflow.Object Selection
After naming the action, choose the Object the agent has access to. This determines which data the agent can read and act on when executing the task.Agent Selection
Select an agent you’ve already built to execute this task. For more on creating and configuring agents, see Agent tools, deployment, and integrations. After selecting the agent, click Configure Task and Test to proceed to the task definition.Task Definition
The task definition tells the agent what to accomplish. It has three critical components: context, objective, and success criteria. Because agents in Run Agent Task operate in a headless environment — with no user available for follow-up questions — your task definition must be self-contained with all necessary context provided upfront through value references.- Structure
- Good vs. Bad Examples
- Tips for Headless Tasks
Every task definition should include:
- Context — All relevant data via value references
- Objective — What the agent should accomplish
- Success criteria — How the agent knows it has completed the task, including specific deliverables and format
Output Type
Choose how the agent returns its work:- Text Output
- Structured Output
- Field Design Tips
Returns a simple narrative response. Best for summaries, explanations, and recommendations where you don’t need to branch on specific values in downstream actions.
File Inputs
Run Agent Task can pass files directly to the agent for processing — use this in place of the AI File Reader when you want broader model support and richer file handling inside the agent’s reasoning.The Files section is located below the Task Description field in the action configuration. Expand it to reveal the file input area — do not paste file references into the Task Description text box itself.
- Expand the Files section below the Task Description.
- Click Add, select Attachment type → One or many files → set the source to Attachment Trigger (when using an Attachment is Added trigger).
- In the Task Description, tell the agent what to do with the file (e.g., “Summarize the attached invoice and extract line items”).
Setting the attachment source correctly is critical. When using an Attachment is Added trigger, the Files section must reference Attachment Trigger as the source — this passes the specific file that fired the trigger to the agent. Using a record reference instead silently delivers zero file bytes and the agent cannot read the file. There is no error message; the agent simply responds without file context.
Expected execution behaviour
A successful file-processing run completes in 3–8 seconds and shows 2 completed actions (Run Agent Task + the downstream action) in the execution history. If the task completes in under 2 seconds, the agent likely did not receive the file — see Troubleshooting file inputs below.Differences from Agent Chat
Run Agent Task is headless: the agent processes the file in a single pass using only the Task Description for guidance. It cannot ask follow-up questions. A vague description (e.g., “Look at this file”) forces the agent to guess intent, which produces different results from the same file in an interactive Agent Chat. To match Agent Chat results, write a Task Description that mirrors the question you would ask in chat, and include relevant context via value references. For a side-by-side comparison, see Agent Chat vs Run Agent Task.Testing and Error Handling
Before deploying, test your agent task using the Test & Preview feature:- Fill in value references with actual data
- Run the agent task
- Verify the output format and quality
- Adjust task definition if needed
run_agent_task.success field, and refine your task definition based on real-world performance.
Built-in Retry Logic
Built-in Retry Logic
The system includes built-in retry logic (up to 3 attempts) when agents don’t provide correctly formatted structured output:
- Agent attempts to provide structured output
- If format is incorrect, system returns error to agent with details
- Agent tries again with error context
- Repeats up to 3 times
Always Check the Success Field
Always Check the Success Field
Always check
run_agent_task.success before using agent output in downstream actions:Implement Graceful Degradation
Implement Graceful Degradation
Design workflows that remain functional even if the agent task fails:
Troubleshooting file inputs
Troubleshooting file inputs
If your agent isn’t processing uploaded files correctly, check these common issues:Agent task completes in under 2 seconds with no file contentThe agent did not receive the file. Verify both:
- Attachment source — Open the automation, click Edit on the Run Agent Task, and confirm the Files section references Attachment Trigger (not a record reference).
- Agent model — Confirm the agent uses a multimodal model on the agent’s Overview page.
When to Use Run Agent Task
Ideal Use Cases
Use Run Agent Task when a step in your workflow requires reasoning, judgment, or synthesis of information.Research & Analysis
Research & Analysis
Scenario: Tasks requiring information gathering and synthesis
Complex Evaluation & Assessment
Complex Evaluation & Assessment
Scenario: Decisions requiring multiple factors and reasoningThis pattern pairs well with AI File Reader for extracting structured data before agent evaluation. See the document review example in Workflow Examples below.
Content Quality Assessment
Content Quality Assessment
Scenario: Evaluating quality, completeness, or appropriateness of content
Intelligent Data Enrichment
Intelligent Data Enrichment
Scenario: Enhancing records with synthesized information
Multi-Step Problem Solving
Multi-Step Problem Solving
Scenario: Tasks requiring sequential reasoning and proactive action
When NOT to Use Run Agent Task
Use standard automation actions instead when:- Deterministic logic — Simple IF/THEN logic, calculations, or predefined rules. Use IF conditions or Run Calculation instead.
- Direct data operations — Creating, updating, searching, or relating records with known values. Use Create Record, Update Record Fields, or Search Records instead.
- Standard classifications — Categorization with clear, predefined categories. Use AI Classification instead.
- API integrations — Direct calls to external systems with structured parameters. Use Send API Request instead.
Workflow Examples
These examples demonstrate the structured → agent → structured pattern in complete workflows. Each combines standard automation actions with Run Agent Task.Example: Intelligent Support Ticket Routing
Example: Intelligent Support Ticket Routing
Scenario: Route support tickets based on nuanced assessment, not just keywords.This workflow uses AI Classification for basic categorization and Run Agent Task for nuanced assessment, then feeds agent output into standard routing logic.
Example: Document Review Pipeline
Example: Document Review Pipeline
Scenario: Automated first-pass contract review for a legal team.This pairs AI File Reader for data extraction with Run Agent Task for risk assessment that requires judgment.
Example: Personalized Order Processing
Example: Personalized Order Processing
Scenario: Provide personalized order handling based on customer history.
Advanced Patterns
Chaining Agent Tasks
Chaining Agent Tasks
For complex workflows, break work into sequential agent tasks where each builds on the previous:Use this when a single agent task would be too complex — breaking into stages improves output quality.
Conditional Agent Invocation
Conditional Agent Invocation
Use agents only when intelligence is needed, falling back to standard actions for straightforward cases:This is the same pattern shown in the support ticket example in Workflow Examples, where AI Classification handles simple categorization and Run Agent Task handles complex cases.
Agent + Human Hybrid
Agent + Human Hybrid
Combine agent intelligence with human oversight using approval processes:
Combining with Other Automation Actions
Combining with Other Automation Actions
Run Agent Task integrates with other automation actions:
- AI File Reader — Extract structured data from documents, then pass to an agent for evaluation and recommendations. See the document review example in Workflow Examples.
- API Requests — Use agent output to determine API endpoints or parameters, or feed API response data into an agent for synthesis.
- AI Classification — Use classification for basic categorization, then route complex cases to Run Agent Task. See the support ticket example in Workflow Examples.
Agent Management
Agent Deletion Protection
When you attempt to delete an agent that’s used in automations, the system prevents deletion and shows a list of automations using that agent with direct links to each one. Before deleting an agent:- Check which automations use it
- Update those automations to use a different agent or action
- Test the updated automations
- Then delete the agent
Getting Started Checklist
- Identify a use case where a workflow step requires reasoning or research
- Design the workflow using the structured → agent → structured pattern
- Create or select an agent with appropriate capabilities — see Agent tools, deployment, and integrations
- Write a task definition with complete context and clear success criteria
- Define output fields if using structured output
- Test with real data using the Test & Preview feature
- Implement error handling with success field checks
- Deploy and monitor — review early executions, then iterate based on results
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 tools, deployment, and integrations
Understand how agents work and integrate with workflows
Automation Best Practices
General automation and workflow best practices