LLM Agent
An intelligent agent powered by Large Language Models (LLMs) that can process queries, use tools, manage sub-agents, and maintain conversation state across sessions.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
Inputs
- Session ID (optional) - (string) A unique identifier for this specific conversation thread, essential for retrieving it later.
- Name - (string) Name of the agent.
- Description - (string) Description of the agent's purpose and capabilities.
- LLM Agent Instructions - (string) Instructions for the agent. Supports Mustache templates with session state and artifact access. Use
{{key}}for variables,{{#key}}...{{/key}}for conditionals/loops,{{#artifacts}}...{{/artifacts}}to iterate over available files, and{{file:filename}}for file references. - Query - (string) User query to the agent. Supports Mustache templates with full artifact embedding. Use
{{file:filename}}to include actual file content in the query. - Files - (string) Files from Artifact Service to load and send to agent. Can be JSON array with filename/version:
[{"filename": "image.jpg", "version": 1}]or string array:["image.jpg", "document.pdf"]. Version is optional (defaults to latest). - Output Key - (string) Automatically saves the agent's final response text (or structured output) to the specified state key.
Options
- Model Name - LLM model to use. Options include:
- Google Models: Gemini 3 Pro, Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.5 Flash Lite, Gemini 2.0 Flash
- OpenAI Models: GPT-5, GPT-5 mini, GPT-5 nano, o3, o4-mini, GPT-4o, GPT-4o mini
- Anthropic Models: Claude Opus 4.5, Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4
- Custom Model (specify manually)
- Custom Model - (string) Enter the specific model string if 'Custom Model' was selected. Examples:
groq/llama3-8b-8192,ollama/mistral,gemini-experimental. - API Key - (Credentials) API Key if required for direct provider SDKs and API access.
- Built-in Tool - Include a built-in tool with the agent. Options: None, Google Search, Code Execution.
- API Base URL (Optional) - (string) Specify the API base URL for vLLM or self-hosted servers (e.g.,
http://localhost:8000/v1for vLLM,http://localhost:11434for Ollama). - Output Schema (JSON) - (string) Optional JSON schema to enforce structured output format. Note: Using output_schema prevents the agent from using tools.
- Timeout (seconds) - (number) Maximum wait time in seconds for agent operations to finish. Default: 300.
- Session Service - Session storage backend for conversation context. Options: In Memory Session Service, Robomotion Session Service.
- Artifact Service - Storage backend for files and artifacts. Options: In Memory Artifact Service, Robomotion Artifact Service.
Outputs
- Text - (string) Agent text response.
- Images - (array) Images returned by the agent saved as temp files (array of file paths).
- File URIs - (array) File URI references returned by the agent (array of URI strings like gs://...).
- Code Outputs - (array) Code execution output strings (array of stdout strings).
- Raw Response - (object) Full API response structure (only set when Include Raw Response is enabled).
Ports
- sub-agents - (output) Connect to other agents (LLM Agent, Sequential Agent, Parallel Agent, Loop Agent) to create hierarchical agent systems.
- tools - (output) Connect to Tool In nodes to give the agent custom capabilities.
- callbacks - (output) Connect to Callback In nodes to monitor and intercept agent operations.
How It Works
The LLM Agent node creates an AI agent that can:
- Process Natural Language - Accepts queries and responds using the configured LLM model
- Maintain Context - Uses session management to remember conversation history
- Use Tools - Can call connected tools to perform actions (web search, code execution, custom workflows)
- Manage Sub-Agents - Delegates tasks to specialized sub-agents for complex workflows
- Handle Files - Processes images, PDFs, and other files through the artifact service
- Execute Code - When Code Execution is enabled, can write and run Python code
- Structured Output - Can return responses in a specified JSON schema format
The agent uses the Google Agent Development Kit (ADK) internally and supports multimodal interactions with text, images, and files.
Common Use Cases
- Conversational AI - Build chatbots and virtual assistants
- Document Analysis - Process and extract information from PDFs, images, and text files
- Multi-Step Workflows - Combine agents and tools to automate complex tasks
- Code Generation - Generate and execute code to solve problems
- Web Research - Search and synthesize information from the web
- Image Analysis - Analyze and describe images using vision models
Error Handling
The node handles various error scenarios:
- Invalid API credentials
- Model not available or unsupported
- Timeout during agent execution
- Tool execution failures
- Session or artifact service connection issues
When errors occur, the agent will attempt to provide a user-friendly error message and continue execution if Continue On Error is enabled.
Usage Notes
- Session Management - The Session ID input allows you to continue previous conversations. If not provided, a new session will be created automatically.
- Template Support - Both Instructions and Query support Mustache templates, allowing dynamic content based on session state.
- File Handling - Files can be referenced in queries using
{{file:filename}}syntax to embed their content. - Tool Limitations - When using Output Schema for structured output, tools cannot be used simultaneously.
- Model Selection - Different models have different capabilities, costs, and performance characteristics. Choose based on your needs.
- Robomotion Credits - When running in Robomotion cloud, you can use the managed AI service without providing API keys.
- Code Execution - The built-in code executor runs Python code in a sandboxed environment with common libraries available.
- Callbacks - Use callbacks to monitor agent behavior, log interactions, or implement custom logic at various stages.