Agents
An Agent action in Leverage allows you to create AI-powered automation that can perform multiple steps and make decisions to complete complex tasks. Agents use the actions you provide to work through problems autonomously until the specified objective is achieved.
Key Features
Decision-making capabilities to determine the best approach to a task
Action selection from tools you provide
Iterative processing that continues until instructions are fulfilled
Dynamic variable integration for workflow context
Ability to process files and access knowledge bases
Smart suggestions for improving agent configuration
How to Add an Agent Action
Open the Add Action menu using one of three methods:
Click the "Add Action" button in the top left corner
Click on a connection circle on an existing action card
Click and drag from one action to create a connection
Select "AI" from the categories or find "Agent" in the options
Click on "Agent" to add it to your canvas
💡 The Agent action appears similar to the Prompt action in the workflow canvas

How to Add an Agent Action
Open the Add Action menu using one of three methods:
Click the "Add Action" button in the top left corner
Click on a connection circle on an existing action card
Click and drag from one action to create a connection
Select "AI" from the categories or find "Agent" in the options
Click on "Agent" to add it to your canvas
💡 The Agent action appears similar to the Prompt action in the workflow canvas.
How to Configure the Agent Action Card
Locate the Agent card on your canvas which includes:
Header with the action name
Variable chip in the top left corner for referencing outputs
Control buttons for expanding/collapsing and running the agent
Connection points for inputs and outputs
Configure the basic settings:
Instructions: Add your agent's objective in the instructions box
Provide clear instructions for what the agent needs to accomplish
⚠️ Be specific with instructions as this determines how the agent will operate.
Expanding the Instructions View
To view your instructions in a larger format:
Hover over the input box at the bottom right corner
Click the expand arrows icon
This opens an expanded view for easier editing of longer instructions
How to Add Actions and Resources to Your Agent
Below the instructions section, you can add various resources by clicking the "+" button:
1. Add an App
Integrates external applications like Gmail, Slack, Outlook, and other services
Provides access to Leverage's built-in tools and integrations
2. Add an Action
Select from Leverage's action library
Configure action parameters or leave them blank for the agent to determine
For sub-actions, you can specify parameters if needed or let the agent fill them out automatically
3. Add a Variable
Reference workflow variables the agent should use
Ensures the agent has access to necessary data from previous steps
4. Add a Knowledge Base
Select from your available knowledge bases
Gives the agent access to specific information repositories
💡 The agent will attempt to automatically configure actions when possible, using context from your instructions.
Agent Suggestions Feature
Below the agent card, you'll find a suggestions panel that provides:
Action Recommendations: Suggests relevant actions based on your instructions
Variable Recommendations: Identifies variables that might be useful for your task
Instruction Formatting: If your instructions aren't optimally structured, a magic wand icon appears
Click the magic wand to automatically reformat your prompt
This creates a more systematic structure that agents can better understand
How the Agent Action Works
The agent analyzes your instructions to understand the objective
It selects appropriate actions from those you've provided
It executes actions in sequence, making decisions based on results
The process continues until the agent determines the instructions have been fulfilled
The final output is passed to the next action in your workflow
⚠️ If action configurations have been previously specified in your workflow, the agent will follow those rules rather than creating its own configuration.
Writing Effective Agent Instructions
Structure Guidelines
Clear Objective: Start with a specific goal statement
Context: Provide relevant background information
Constraints: Specify any limitations or requirements
Expected Output: Describe what success looks like
Best Practices
Be clear about the specific goal the agent needs to achieve
Specify any constraints or requirements for the solution
Reference any variables the agent should use with proper syntax
Focus on the "what" (goal) rather than the "how" (specific steps)
Use the formatting suggestions when available to improve clarity
💡 For best results, provide context that helps the agent understand the problem scope.
Working with Files and Data
Agents can:
Process files passed through triggers
Access information from connected knowledge bases
Handle multiple data sources simultaneously
Pass processed information to subsequent workflow steps
Testing Your Agent Action
Click the "Run" button on the Agent card to test it with current workflow variables
Review the final output to ensure it meets your requirements
If the agent encounters issues:
The output panel will explain why it couldn't complete the task
Review the error message for guidance on adjustments needed
Adjust instructions or available actions if necessary to improve results
⚠️ Agents may take longer to execute than standard prompts because they perform multiple steps to complete a task.
Troubleshooting
If your agent isn't performing as expected:
Check the output panel for detailed error messages
Ensure all necessary actions and resources are added
Use the suggestion feature to optimize your instructions
Verify that variables are correctly referenced
Consider breaking complex tasks into smaller, clearer objectives
Last updated