AI Agent Langfuse
AI-generatedSummary
Invoke an AI agent that integrates Langfuse observability by sending a prompt to a selected large language model (LLM) provider with optional memory, tools, and output parsing, returning the agent's response along with token usage and optionally intermediate steps.
Inputs
- LLM Provider (required) — Select the LLM provider to use (e.g., OpenAI, Anthropic, Azure OpenAI, etc.)
- Model (required) — Specify the model identifier or deployment name according to the chosen provider
- Model Options — Configure generation parameters such as max tokens, temperature, and top P for controlling randomness and diversity
- Prompt Type (required) — Choose whether to define the prompt via system and user messages or use the previous node's output as the prompt
- System Message — Set the system message to control the AI agent's behavior (visible only when defining prompt manually)
- User Message — Provide the user message or question for the AI agent (visible only when defining prompt manually)
- Langfuse Options — Add metadata such as custom metadata JSON, session ID, tags, trace name, and user ID for Langfuse trace attribution and filtering
- Agent Options — Set agent-specific options such as maximum iterations and whether to return intermediate steps
- AI Memory (optional input connection) — Connect an AI memory node to provide conversation history or memory context to the agent
- AI Tool (optional input connection) — Connect one or more AI tools that the agent can invoke during execution
- AI Output Parser (optional input connection) — Connect an output parser node to transform or extract structured data from the agent's raw response
Output shape
a single JSON object per input item containing the AI agent's response output, optionally intermediate steps if enabled, and token usage statistics
The output includes fields: 'output' for the final response, 'intermediateSteps' if returnIntermediateSteps is enabled, and 'tokenUsage' detailing prompt, completion, and total tokens. Errors are returned as an 'error' field if continue on fail is enabled.