21
Views
1
Comments
AI Agent: Action Calling returning text instead of triggering Server Action

Hi everyone,

I'm implementing an AI Agent in ODC using a Custom AI Model connection (running Gemini on Google Cloud Run).

While the Chat functionality works perfectly, I'm struggling with Action Calling. I’ve exposed a Server Action (e.g., SendSms) to the agent and set descriptions for both the action and its parameters.

The issue: When the agent decides to use the tool, instead of triggering the Server Action, it returns a text response like: "Delegate to Tool: SendSms({"Number": "...", "Text": "..."})"

My Setup:

  1. Connector: A custom Node.js service that translates ODC requests to Vertex AI.

  2. Swagger: I'm using the standard ODC Swagger boilerplate for Custom Connections.

  3. Agent Flow: Action calling is enabled, and a Call Condition is set (e.g., TotalCallsCount < 5).

My Hypothesis: I suspect the standard ODC Swagger doesn't include the necessary definitions for tools (in the request) and tool_calls (in the response/message definition), causing ODC to ignore the structured tool call and treat it as plain text.

Questions:

  1. Has anyone successfully implemented Action Calling with a Custom AI Provider?

  2. Does the Custom Connection API contract even support tool_calls? The documentation mentions property names should use camelCase, but the provided Swagger doesn't seem to have placeholders for function calling.

  3. Is there a specific, updated Swagger definition I should use to enable "Native" Action Calling for custom models?

Any help or examples of a working Swagger for Custom Action Calling would be greatly appreciated!

2021-10-09 07-57-44
Stefan Weber
 
MVP

You are right. Custom AI models currently do not support function calling. The contract simply does not include the necessary structures. https://success.outsystems.com/TK_Resource/046194ce-cb10-4a13-a3e4-d83062026204

Best option if you really need a intermediate service is to build the API OpenAI compatible.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.