Developer Guides 5 min read

How to Add AI Calling to Your App with Google Antigravity

Vistara AI Team· Vistara AI Editorial Team
October 11, 2026

The short answer: paste the prompt from vistaraai.in/integration/antigravity into Antigravity with your project open and VISTARA_API_KEY set. Antigravity turns the setup into a task plan, runs the Vistara API calls in the terminal, builds and tests your voice agent with a live call to your phone, and wires calls and webhooks into your app — checking each step before it moves to the next.

Plan, execute, verify

Antigravity is an agentic IDE: it can plan multi-step work, run terminal commands and edit files. The Vistara prompt contains a step-by-step workflow, so Antigravity typically plans the work like this:

  1. Confirm the API key is set (without printing it) and list your agents.
  2. Build or improve the voice agent and save its prompt in the repository.
  3. Place a test call to your number and fetch the result.
  4. Add a Vistara client, a webhook endpoint and a calls table to your app.
  5. Trigger calls from your app's events and verify a webhook end to end.
  6. Walk through the go-live checklist.

After each task it checks the evidence — the agent ID returned, the test call's result, the webhook received — and only then moves on.

Where it stops and asks you

Autonomy stops where your judgement matters. Antigravity asks you what the agent should say and capture, fills business facts only from what you tell it (anything unknown stays marked [TO FILL]), confirms the destination number before every call, and gets your go-ahead before anything goes live. Calls cost money, so it only calls numbers you have given it for testing.

Triggering calls from events in your app

Most products don't need a "Call" button — they need calls to start when something happens. Ask Antigravity to wire triggers like these:

  • New lead — call within minutes, with the lead's details in metadata.
  • Renewal or payment due — a scheduled job picks due records and starts calls inside the 09:00–20:00 IST calling window.
  • Delivery to confirm — call before dispatch and store the answer.

Whatever you put in metadata is shown to the agent during the call, so the keys must match the agent's prompt exactly. Use flat snake_case keys and YYYY-MM-DD dates:

{
  "phone": "+919876543210",
  "agentId": "AGENT_UUID",
  "name": "Ravi",
  "metadata": { "plan_name": "Gold Annual", "renewal_due_date": "2026-10-15", "lead_id": "L-1042" }
}

Verifying the webhook end to end

Antigravity can prove the whole loop works: expose your local server with a tunnelling tool, set that URL with its secret token on a test agent, place a test call, and confirm the result was stored. A good final check is sending the same webhook body twice — the second delivery should be recognised and ignored, because Vistara may deliver an event more than once.

Frequently Asked Questions

Can Antigravity run the whole setup by itself?
It plans the work and runs the API calls in the terminal, but it still asks you for the decisions that matter — what the agent says, which facts it may state, and which number to call — and confirms the number before any call is placed.
How does Antigravity know each step worked?
It checks the evidence before moving on: the agent ID returned when the agent is created, the finished test call's result fetched from the API, and the webhook stored by your app.
What should I put in metadata?
The per-customer details the agent needs during the call — plan, due date, amount, branch, order — as flat snake_case keys with simple values and YYYY-MM-DD dates, plus your own record ID so you can match the result.
Does Antigravity need my API key in the chat?
No. Set VISTARA_API_KEY in the environment; Antigravity checks that it is set without printing it and never writes it into your files.

Related Reading