Skip to main content
Google AI Studio is the place to prototype Gemini prompts and function declarations. You define a tool that matches POST /api/outbound-call; Gemini fills in to, name, and metadata; your app (or a thin Cloud Function) performs the HTTP call with the workspace API key. Do not put the Trikon API key in the AI Studio prompt. The model should only emit arguments. Your code holds the secret.

Before you start

  • A Gemini API key from AI Studio (Get API key).
  • A Trikon workspace API key from Settings → Developer API.
  • Outbound agent ID, workspace slug, and from phone-line UUID.

1. Declare a function that matches the API

In AI Studio, open Tools → Function calling (or add a function declaration in code) with this schema:
Keep agentId, enterprise, and from in your environment, not in the model’s arguments. Those values should not change per customer.

2. Execute the function in your backend

When Gemini returns a functionCall for start_trikon_outbound_call, POST to Trikon:
Return { "success": true, "callUuid": "..." } back to Gemini as the function response so the model can tell the user the call was placed.

3. Example prompt in AI Studio

Try: Call Asha on +919845012345 about ₹4500 due 12 October. Gemini should emit the function call; your executor hits Trikon; the agent rings Asha.

4. After the call

AI Studio does not receive Trikon webhooks by itself. Point Settings → Developer API at your own HTTPS endpoint, then (optionally) feed intent and summary from webhook events back into Gemini for a follow-up message in your product.
Gemini can hallucinate numbers or amounts. Require the user (or your CRM) to supply to and treat model-filled metadata as untrusted until you validate it.