Agents
Abstra Agents are AI-powered stages that use an LLM to reason step-by-step, call tools, and complete tasks autonomously. Instead of writing procedural code, you write a prompt template describing the task, and the agent figures out which tools to use and in what order.
Agents are triggered by tasks — just like tasklets — but instead of executing a fixed script, they run a ReAct loop (Reason + Act) where the LLM decides each step based on observations from previous steps.
How It Works
- A task arrives at the agent stage with a payload (e.g.
{"customer_name": "Alice", "request": "send invoice"}) - The prompt template is rendered with the task data using Jinja2
- The agent enters a ReAct loop:
- Think: The LLM reasons about what to do next
- Act: It calls one of the available tools
- Observe: It sees the tool's result
- The loop continues until the agent calls
finishor reaches the maximum number of steps
Creating an Agent
Add an Agent stage to your workflow in the editor. Each agent has:
- Prompt template: A markdown file (
.md) with Jinja2 syntax describing the task - Permissions: Which tools and resources the agent can access (tables, files, connections, source code)
- Max steps: Maximum number of reasoning steps before the agent stops (default: 30)
Agent Settings
| Setting | Description | Default |
|---|---|---|
| Name | Display name for the agent in the workflow | Required |
| Max Steps | Maximum number of ReAct loop iterations | 30 |
| Input/Output | Enable workflow transitions to/from this agent | — |
| Permissions | Tools and resources the agent can access | None |
When to Use Agents
Agents are best suited for tasks that require flexible decision-making — where the exact sequence of steps isn't known in advance:
- Processing unstructured data (emails, documents, images)
- Multi-step operations that depend on intermediate results
- Tasks that involve searching, filtering, and acting on external data
- Workflows where the path depends on the content of the task
For tasks with a fixed, predictable sequence of steps, use a Tasklet instead.