AI Agent

Built-in step · 1 step

Give an AI a task, files to read and tools to use, and use what it hands back.

To learn when to use these steps, with examples, read Use an AI agent.

Run an AI agent

Give an AI a task, files to read or search, and tools to use. It works out which tools to use and when, then hands back an answer or the exact fields you ask for. For work with no fixed recipe, such as reading an invoice, answering from a handbook or researching a name.

Inputs

TasktasktextRequired
What the agent should do this run. Write it as you would brief a colleague, and mention the values it needs from earlier steps.
ModelmodeltextRequired
The AI model that does the work, from Anthropic, OpenAI, Google Gemini or another AI provider you've connected under Apps.One of: anthropic/claude-opus-4-8 (Claude Opus 4.8 (recommended)), anthropic/claude-fable-5 (Claude Fable 5 (most capable, expensive)), anthropic/claude-sonnet-5 (Claude Sonnet 5), anthropic/claude-haiku-4-5 (Claude Haiku 4.5 (fastest, lowest cost)), openai/gpt-6-astra (GPT-6 Astra (most capable)), openai/gpt-6.1-sol (GPT-6.1 Sol (near-Astra quality, lower cost)), openai/gpt-6-luna (GPT-6 Luna (fastest, lowest cost)), openai/gpt-5.5 (GPT-5.5), openai/gpt-5.4 (GPT-5.4), openai/gpt-5.4-mini (GPT-5.4 mini), and 61 more.
Filesfileslist
Files the agent uses: an invoice, a CV, a screenshot, a contract, a spreadsheet. Upload one, or use a file from an earlier step. The agent reads a PDF or an image whole when its model can and it fits, and searches the rest for the passages that matter, which needs OpenAI, Google Gemini, Mistral or Cohere connected. Up to 20 files.
Knowledgeknowledgelist
Files the agent can search when it needs to: a handbook, a price list, past tickets, a contract. Attach them once and Lodol makes them searchable; the agent looks up the passages that matter instead of reading everything. PDF, Word, text, Markdown, CSV, Excel and JSON files, up to 10 MB each and 20 in all. Works with any model, and needs OpenAI, Google Gemini, Mistral or Cohere connected for the searching.
Knowledge basesknowledge_baseslist
The workspace's knowledge bases the agent can search too: shared sets of files, made searchable once, made and kept up to date under Files in the step. Pick up to 3.
Instructionsinstructionstext
Standing rules for every run: who the work is for, what a good answer looks like, what to leave out. The place for the context a client or a team needs applied.
Toolstoolslist
What the agent may use: actions from your apps, such as reading a page or writing a row, Lodol's own steps, such as Call an API, Run Python code or the date steps, and your own published workflows. Actions run with the accounts connected to this workspace, so connect the app first. Fix any input you do not want the agent to choose, such as which spreadsheet to write to or which mail server to send from, and mark a tool Ask first to have a person approve each use before it runs. Keep the list short and relevant.
Search the webweb_searchtrue/false
Let the agent search the web through its AI provider's own search, with no search app to connect. Works with a model from Anthropic, OpenAI, Google Gemini, OpenRouter or Qwen; each search is billed by the provider to your account, with the model's own usage.Default: false.
Fields to returnoutput_schemaobject
The fields the agent must fill in before it finishes, each with a note on what it should hold. Later steps then read them by name. Leave empty to get a plain text answer instead.
Turn limitmax_stepsnumber
The most turns the agent may take before it has to finish. Each turn is one model call and may use one or more tools.From 1 to 30. Default: 10.
Fallback modelfallback_modeltext
A second model to carry on with if the first one fails to answer, such as during an outage or a rate limit. Chosen from the same list as the model, and run on your own key for it in the same way.One of: anthropic/claude-opus-4-8 (Claude Opus 4.8 (recommended)), anthropic/claude-fable-5 (Claude Fable 5 (most capable, expensive)), anthropic/claude-sonnet-5 (Claude Sonnet 5), anthropic/claude-haiku-4-5 (Claude Haiku 4.5 (fastest, lowest cost)), openai/gpt-6-astra (GPT-6 Astra (most capable)), openai/gpt-6.1-sol (GPT-6.1 Sol (near-Astra quality, lower cost)), openai/gpt-6-luna (GPT-6 Luna (fastest, lowest cost)), openai/gpt-5.5 (GPT-5.5), openai/gpt-5.4 (GPT-5.4), openai/gpt-5.4-mini (GPT-5.4 mini), and 61 more.
Conversation keymemory_keytext
Give runs that belong to one conversation the same key, such as a chat thread id or a customer's email, and the agent sees what was asked and answered in the earlier runs. Leave empty and each run starts fresh.
Runs to remembermemory_windownumber
How many earlier runs under the same conversation key the agent is shown.From 1 to 50. Default: 10.
Redact personal dataredact_personal_datatrue/false
Replace names, email addresses, phone numbers and card and account numbers with placeholders before the model sees them. Tools still get the real values, and so does the step's result. Text only: a step with files cannot use it.Default: false.
Block prompt injectionsblock_prompt_injectiontrue/false
Check the task, the files and every tool result for text that tries to give the agent instructions, and stop the step if any does. Costs one extra model call before the first turn and one per turn that uses tools.Default: false.
Who to askapproverstext
For tools marked Ask first: email addresses of the people who approve what the agent wants to do, separated by commas. People in this workspace answer in the app; anyone else gets a secure link by email. Leave empty to ask whoever the run runs as.
Who can answerapprover_grouptext
Only the people asked, the people asked plus the workspace's owner and admins, or anyone in the workspace who can run workflows (not Viewers).One of: listed (Only the people asked), admins (People asked, plus admins), anyone (Anyone who can run workflows).
Time limit (hours)approval_time_limit_hoursnumber
How long each request waits for an answer. Leave empty for 72 hours; at most 720 (30 days). Hours can be fractions, for example 0.5 for half an hour.From 0 to 720.0.
If nobody answers in timeapproval_on_timeouttext
What happens to the tool call when the time limit runs out. Left unset, it is rejected and the agent is told nobody approved it.One of: reject (Treat it as rejected), approve (Treat it as approved), fail (Stop the run with an error).
Also post to Slack channelapproval_slack_channeltext
A channel ID or #name to post each request to, with a link to answer. Uses the Slack account connected to this workspace; the Lodol app must be in the channel.

Outputs

modeltext
The model that finished the run.
outputobject
The fields asked for, filled in; or the agent's final text when no fields were asked for.
stepsnumber
How many turns the agent took.
texttext
The agent's final message.
tool_callslist
Each tool the agent used, and each web search it ran, with its input, whether it succeeded, the start of what came back and, for a tool marked Ask first, who approved or declined the call.
usageobject
The tokens the run used.
Example output
{
  "model": "example_value",
  "output": {},
  "steps": 1,
  "text": "example_value",
  "tool_calls": [],
  "usage": {
    "input_tokens": 1,
    "output_tokens": 1
  }
}

On this page