Generic AI Agent

A generic AI Agent that works directly with the conversation object

Inputs

NameTypeDescription
Model NameStringThe LLM model to use
System PromptStringThe system prompt for the agent
ConversationObjectThe conversation history (Conversation object or list of OpenAI-style messages)
Force Tool UsageOptional BooleanWhen enabled, the agent only produces function calls. Defaults to false
ToolsOptional ListList of tool definitions
Response FormatOptional ObjectResponse format specification. Defaults to null
TemperatureOptional NumberMeasure of randomness in generated text. Defaults to 0

Model options: gpt-5, gpt-5-mini, gpt-4o, gpt-4o-mini, gpt-4.1, azure-gpt-5, azure-gpt-5-mini, azure-gpt-4o, azure-gpt-4o-mini, azure-gpt-41, gemini-2.0-flash, gemini-2.5-pro, gemini-2.5-flash


Outputs

NameTypeDescription
ContentStringThe response content from the agent
Tool CallStringThe tool call name if a tool was called
ArgumentsObjectThe arguments for the tool call
SuccessBooleanWhether the agent execution was successful
Server ResponseObjectThe server response (e.g. on error)

OpenAI-style messages example

Conversation can be a list of messages in OpenAI format: each item has role and content.

[
  {"role": "user", "content": "Hi, I need help with a return."},
  {"role": "assistant", "content": "I'd be happy to help you with your return."},
  {"role": "user", "content": "I bought shoes that don't fit. Can I return them?"}
]

Tools example

Tools is a list of tool definitions. Each tool has a name, description, and parameters (JSON schema). The agent can choose to call one of these tools; when it does, the tool name is returned in Tool Call and the arguments in Arguments.

Simple tool (no parameters):

[
  {
    "name": "order_status",
    "description": "Use this tool to check on customer's order status.",
    "parameters": {
      "properties": {},
      "required": []
    }
  }
]

Tool with required parameters:

{
  "name": "information_collector",
  "description": "This tool is responsible for collecting information",
  "parameters": {
    "type": "object",
    "properties": {
      "order_number": {
        "type": "string",
        "description": "Order number containing 7 digits"
      }
    },
    "required": ["order_number"]
  }
}

Response format example

Response Format constrains the agent output to a JSON structure. When specified, the model returns structured text that fits the schema. That text is returned as a string in Content.

{
  "type": "json_schema",
  "json_schema": {
    "name": "ConversationEvaluation",
    "description": "An evaluation of an E-commerce customer service conversation for a given criteria.",
    "schema": {
      "type": "object",
      "properties": {
        "explanation": {
          "description": "The explanation for the verdict, based on the rubric and conversation evidence.",
          "type": "string"
        },
        "score": {
          "description": "A score for the criterion on a 0.0-1.0 scale (in 0.1 increments)",
          "type": "number"
        }
      },
      "required": ["explanation", "score"],
      "additionalProperties": false
    }
  }
}

Notes

  • On success, the action returns Content (and optionally Tool Call + Arguments when a tool was called) with success: true.
  • If Response Format is specified, the structured output is returned as a string in Content. Parse it into the corresponding type (e.g. JSON).
  • When the agent calls a tool, Tool Call is the tool name and Arguments holds the arguments for that call.
  • On failure, the action returns success: false and may include Server Response with error details.