Cursor logoVistara AI + Cursor Integration

Add AI Calling to Your App with Cursor

Integrate conversational voice telephony directly from Cursor's Agent with a single prompt. Effortlessly equip your project with low-latency (450–600 ms) conversational telephony simply by copying and pasting the master prompt below into Cursor.

Cursor AI IDE Master Prompt
Production Telephony & Voice Agent Prompt Ready

The prompt contains complete knowledge of the Vistara Connect REST API, low-latency Hindi telephony defaults, voice agent craftsmanship guidelines, and an automated flow to trigger a live test call to your personal mobile phone.

Download as .md File

Coding agents work best with the file: save it in your project (for example as VISTARA.md) and ask Cursor to follow it.

1-Click Copy No Manual SDK Config Required Live Phone Call Experience Included Up to ₹100 Free Credit on Signup

Using a different AI tool or editor?

Switch to dedicated integration pages for your favorite coding assistant:

View All AI Tools
Interactive Telephony Workflow

What Happens When You Paste This Prompt into Cursor

Step 01

Account Verification

Cursor asks if you are registered at app.vistaraai.in. If new, it guides you through phone OTP sign-up — ₹100 free credit with GSTIN (₹50 without); only connected minutes are billed, so unanswered test calls cost nothing.
Step 02

Agent Query & Selection

Uses your API key to list your existing voice agents. You can pick an active agent or let Cursor construct a brand new dedicated persona.
Step 03

Voice Prompt Craftsmanship

Constructs a 10-section prompt with native Devanagari Hindi spoken text, phone conversation mechanics, objection handling, and CRM deliverables.
Step 04

Live Phone Test Call

Asks for your mobile number and dispatches a priority test call (x-call-type: test). Your phone rings immediately so you experience the AI conversation live!
Step 05

Codebase Scaffolding

Scaffolds clean outbound call dispatchers, webhook receivers for post-call transcripts, rate-limiting guards, and .env files directly in your repository.
Developer Telephony Specs

Under the Hood: Vistara Connect REST Architecture

Everything Cursor will wire up into your backend application:

Programmatic Agent Management (GET, POST, PUT /api/v1/agents)

Manage conversational agent lifecycles via REST. Agents default to Hindi with native Indian speech synthesis (meera or Aoede).

// Create Voice Agent (100 req/min limit)
curl -X POST https://app.vistaraai.in/api/v1/agents \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support RM",
    "language": "Hindi",
    "calling_method": "traditional",
    "voice": "meera",
    "first_message": "नमस्ते {{customer_name}} जी! मैं आपकी क्या सहायता कर सकती हूँ?",
    "system_instruction": "You are a courteous, expert AI support assistant...",
    "deliverables": [
      { "question": "Was customer interested?", "type": "fixed", "options": "Yes, No", "isGoal": true, "goalValue": "Yes" }
    ]
  }'

Step-by-Step Guide: Cursor + Vistara AI

The short answer: open your project in Cursor, save the prompt from vistaraai.in/integration/cursor as VISTARA.md, and in Agent mode ask: "Follow @VISTARA.md to add Vistara AI voice calling to this project." Cursor checks your API key, helps you build and test a voice agent with a live call to your phone, then edits your project so it can start calls and receive their results by webhook.

Agent mode or Ask mode?

ModeWhat Cursor does
AgentRuns the Vistara API calls in the terminal, reads the responses and edits files across the project. Recommended.
AskExplains and gives you the commands and code to apply yourself; you paste the responses back.

Set up in two minutes

  • Create a Vistara AI account at app.vistaraai.in (₹100 free credit with a GSTIN, ₹50 without; unanswered calls are never charged).
  • Copy your API key from the Connect page and keep it in the environment as VISTARA_API_KEY — exported in the terminal Cursor uses, or in a .env file listed in .gitignore.
  • Download the prompt from the Cursor page and save it in the project root as VISTARA.md, so you can reference it with @VISTARA.md.

The flow inside Cursor

  1. Key check. Cursor lists your active agents as a table — a successful response proves the key works.
  2. The agent. Pick an existing agent, improve one, or build a new one. Cursor asks about your use case, writes the agent prompt with Vistara's Voice Agent Builder, saves it in the repository and creates the agent after you approve it.
  3. Test call. Cursor confirms your number, places a test call and, once you hang up, shows the summary, extracted answers, transcript and recording. Ask for changes and test again.
  4. Code. Cursor reads your existing code first and puts the integration where similar integrations already live. Review its diffs like any pull request before accepting them.

What the webhook handler looks like

For an Express project, the endpoint Cursor writes usually follows this shape:

app.post('/webhooks/vistara', express.json({ limit: '2mb' }), async (req, res) => {
  if (!tokenOk(req.query.token)) return res.sendStatus(401);
  const { event, callId, data } = req.body || {};
  if (!callId || !event) return res.sendStatus(400);
  const isNew = await saveCallEvent({ callId, event, data, raw: req.body });
  res.sendStatus(200);
  if (isNew) queue.add('vistara-call-result', { callId });
});

Each line has a reason. Vistara webhooks are not signed, so the secret token in the URL is what proves the request is genuine. The same event can arrive more than once, so results are saved by callId and duplicates are ignored. Vistara retries anything that isn't a quick 2xx, so the handler answers first and does the slow work — CRM updates, notifications, redials — in a background job.

Mapping call results into your product

The data points you define on the agent (Vistara calls them deliverables) come back in data.answers, keyed by each question's exact text — for example "Was customer interested in demo?": "Yes". Ask Cursor to map each one to a field in your own data model. Two things to remember: renaming a question changes its key, and a call with meaningfulConversation: false (picked up and dropped, or "call me later") should be treated like an unanswered call when you decide whether to redial.

Mistakes Cursor will steer you away from

  • Calling Vistara from browser code — the key would be exposed. Calls always go through your backend.
  • Retrying "start call" after a timeout — the customer could get two calls.
  • Assuming webhooks arrive exactly once and in order.
  • Registering a localhost webhook URL — use a tunnelling tool during development.

Cursor Integration FAQ

How do I add AI calling to my app with Cursor?
Copy the Vistara AI integration prompt on this page and paste it into Cursor, or save it in your project as VISTARA.md and ask Cursor to follow it. Cursor then checks your Vistara account and API key, helps you create a voice agent, places a test call to your own phone, and writes the code that starts calls and receives each call's transcript, summary and extracted answers by webhook.
Should I use Cursor's Agent mode or Ask mode?
Agent mode works best: Cursor runs the Vistara API calls in the terminal and edits your files directly. In Ask mode Cursor gives you the commands and code to apply yourself.
Is my Vistara API key safe?
The prompt never contains your key. Cursor is told to read it from the VISTARA_API_KEY environment variable, keep it out of source files, examples and logs, and use it only on the server — never in browser or mobile app code.
How much does it cost to try?
The prompt is free. New Vistara AI accounts get ₹100 free credit with GSTIN (₹50 without); only connected minutes are billed, so unanswered test calls cost nothing. After that, calls are billed per connected minute from your prepaid wallet.
Does it work in Cursor's Ask mode?
Yes, but Agent mode is smoother. In Ask mode Cursor gives you the commands and code to apply yourself and you paste each response back.
Can Cursor use an agent I already built in the Vistara dashboard?
Yes. It lists your agents first, and you can use one as it is or ask Cursor to improve it — it fetches the agent, rewrites the prompt with the Voice Agent Builder and saves the update.
How do I test webhooks while developing in Cursor?
Run your server locally, expose it with a tunnelling tool, and set that public URL plus the secret token as your test agent's webhook URL. Then place a test call and watch the webhook arrive.
What stack will Cursor generate?
Your project's own. The prompt tells Cursor to follow the existing structure, language and conventions rather than introduce a new framework.

Ready to integrate voice AI into your product?

Sign up in under 60 seconds with your mobile number and get your live API key — plus ₹100 free credit with GSTIN (₹50 without); only connected minutes are billed, so unanswered test calls cost nothing.

Claim Free Credit