Agent
AI-generatedSummary
Executes an AI conversation using Berget AI chat completion models with optional tool definition capabilities.
Inputs
- model (required) — The Berget AI model ID used to generate completion responses.
- userMessage (required) — The prompt or message sent to the AI agent.
- systemPrompt — System prompt defining the agent's role and behavior guidelines.
- tools — List of tools provided to the model, each specified by name, description, and a JSON Schema parameters object.
- options — Additional response options including temperature, max_tokens, max_iterations, and tool_choice.
Output shape
a single object
Returns an object containing the assistant response text, tool calls array, iteration count, message history, and model used. If the model emits a tool call, the node raises an operation error indicating tool execution is not natively performed by this node.
Examples
Example 1: Send a direct prompt to an AI model
Set Model to a Berget AI model and User Message to 'Summarize the provided text.'
Example 2: Define available tool schemas for function calling
Set Model, User Message, and add a Tool entry with name 'search_database', a description, and a JSON Schema for parameters.