Skip to main content

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

  1. A task arrives at the agent stage with a payload (e.g. {"customer_name": "Alice", "request": "send invoice"})
  2. The prompt template is rendered with the task data using Jinja2
  3. 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
  4. The loop continues until the agent calls finish or 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

SettingDescriptionDefault
NameDisplay name for the agent in the workflowRequired
Max StepsMaximum number of ReAct loop iterations30
Input/OutputEnable workflow transitions to/from this agent
PermissionsTools and resources the agent can accessNone

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.