run_agent
Run an autonomous AI agent loop. The agent reasons about the prompt, decides which tools to call, executes them, and continues until it produces a final answer or hits max_steps.
Use this from any regular Python stage (Tasklet, Job, Hook, or Form logic) when the task requires multi-step reasoning, tool use, or autonomous decision-making. For single-shot completions, use prompt instead.
Parameters
| Name | Description | Type | Default |
|---|---|---|---|
| prompt (required) | Instruction(s) for the agent. A single string, a list of strings, or a list mixing strings, files (Path), and images. Files and images are forwarded to the LLM as multimodal input. | str | None |
| tools | Tools the agent may call. Each item is either a plain Python function (its name, type hints and docstring become the tool spec) or an AgentTools subclass instance (e.g. BrowserTools, TablesTools, FilesTools, ConnectorsTools). Defaults to None (no tools). | Optional | None |
| max_steps | Maximum number of reasoning/tool-use iterations before the agent is forced to stop. Defaults to 30. | int | 30 |
Return Value
Dict[str, Any]