Revenium AI Agent icon

Revenium AI Agent

Chat-based AI Agent with automatic Revenium usage tracking. Connect a Chat Trigger to start conversations.

Revenium AI Agent

AI-generated

Overview

The Revenium AI Agent node is designed to facilitate chat-based AI interactions with automatic usage tracking via Revenium. It connects to a chat trigger node to start conversations and supports integration with AI language models, memory modules, and tools. The node processes user messages from various sources, manages conversation history and memory, invokes AI models with context and tool schemas, handles tool calls iteratively, and saves conversation data back to memory. This node is beneficial for building intelligent chatbots or assistants that require context-aware responses, tool usage, and memory management.

Use Case Examples

  1. A customer support chatbot that remembers previous interactions and uses external tools to fetch data.
  2. An AI assistant that processes user queries, uses tools for calculations or data retrieval, and maintains conversation context for better responses.

Properties

Name Meaning
Source for Prompt (User Message) Determines where the user message or prompt is sourced from, such as a connected chat trigger node, manual input, or previous node output.
Prompt (User Message) The message to send to the AI model, used when the prompt source is set to manual.
Message Field The field name in the input data that contains the chat message, used when the prompt source is set to previous node output.
System Message A system message to set the AI's behavior and context for the conversation.
Require Specific Output Format Whether to require the AI model to respond in a specific output format.
Output Format The specific output format required from the AI model, shown only if requiring a specific format is enabled.
Memory Options Options for managing conversation memory, including whether to include previous messages, maximum number of messages to include, and whether to save messages to memory.
Tool Options Options for managing tool execution, including saving tool calls to memory, maximum tool call iterations, and how the model should choose to use tools.

Output

JSON

  • response - The AI model's textual response to the user message.
  • message - Duplicate of the AI response for convenience.
  • full_response - The complete response object returned by the AI model, including content and tool call details.
  • tool_calls - An array of tool call results executed during the AI response generation.
  • revenium_tracking - Information about automatic usage tracking via Revenium OpenAI Chat Model.
  • conversation_saved - Boolean indicating if the conversation was saved to memory.
  • tools_executed - Number of tools executed during the request.

Dependencies

  • An AI language model connected to the node's AI Language Model input.
  • Optional AI memory module connected to the AI Memory input for conversation history management.
  • Optional AI tools connected to the AI Tools input for extended capabilities.

Troubleshooting

  • Error 'No chat model connected' indicates the AI Language Model input is not connected; connect a valid chat model to proceed.
  • Errors related to missing input data or message fields suggest checking the input data structure and field names.
  • Timeout errors during model invocation or tool execution indicate increasing timeout settings or checking model/tool responsiveness.
  • Errors saving to memory may occur if the memory module does not support required methods; verify memory module compatibility.
  • Tool execution errors may arise from invalid tool call structures or missing call/invoke methods on tools; ensure tools are properly implemented and connected.

Discussion