# Migrate from Vapi

> Complete guide to migrate your AI voice agents from Vapi to Edesy

Source: https://edesy.in/docs/voice-agent/migration/from-vapi

This guide walks you through migrating your Vapi voice agents to Edesy. Most migrations complete in 3-5 days with our support.

## Why Switch from Vapi?

| Feature | Vapi | Edesy |
|---------|------|-------|
| Pricing | $0.05-0.17/min | ₹4/min (~$0.07) |
| Indian Languages | Limited | 22+ native |
| Response Latency | 500-800ms | <500ms |
| Setup | Code-required | No-code + API |
| India Telephony | Twilio (US) | Exotel + Twilio |
| Support | US timezone | India timezone |

## Pre-Migration Checklist

Before you start, gather these from your Vapi account:

- [ ] System prompts for all assistants
- [ ] Function definitions (if using function calling)
- [ ] Phone numbers you want to port
- [ ] Webhook URLs you're using
- [ ] CRM integration details
- [ ] Voice/TTS configuration

## Step 1: Create Your Edesy Account

1. Go to [voice-agent.edesy.in](https://voice-agent.edesy.in/)
2. Sign up with email or Google
3. Complete onboarding wizard

## Step 2: Convert Your System Prompt

Vapi and Edesy both use system prompts, but with some differences.

### Vapi Prompt Structure
```json
{
  "model": {
    "provider": "openai",
    "model": "gpt-4",
    "systemPrompt": "You are a helpful assistant..."
  }
}
```

### Edesy Prompt Structure
```
You are a helpful assistant...

[Your complete system prompt here]
```

In Edesy, the system prompt is plain text entered in the Agent Setup page. No JSON wrapping required.

### Prompt Conversion Tips

1. **Remove JSON structure** - Just copy the text content
2. **Add language instructions** - If targeting Indian users, add language preferences
3. **Update company references** - Replace Vapi-specific mentions
4. **Keep function instructions** - Function calling syntax is similar

### Example Conversion

**Vapi:**
```json
{
  "systemPrompt": "You are Alex, a sales assistant for TechCorp. Qualify leads by asking about company size, budget, and timeline. Be friendly but professional."
}
```

**Edesy:**
```
You are Alex, a sales assistant for TechCorp.

ROLE:
Qualify leads by asking about company size, budget, and timeline.

PERSONALITY:
Be friendly but professional. Speak naturally and conversationally.

LANGUAGE:
Respond in the same language the customer uses. You support English, Hindi, and other Indian languages.
```

## Step 3: Configure Voice Settings

### Vapi Voice Config
```json
{
  "voice": {
    "provider": "11labs",
    "voiceId": "rachel"
  }
}
```

### Edesy Equivalent

In Edesy Dashboard:
1. Go to Agent Setup > Voice Settings
2. Select TTS Provider (ElevenLabs, OpenAI, Google, etc.)
3. Choose voice from dropdown
4. Test with preview

### Voice Mapping

| Vapi Voice | Edesy Equivalent |
|------------|------------------|
| 11labs - Rachel | ElevenLabs - Rachel |
| 11labs - Adam | ElevenLabs - Adam |
| openai - alloy | OpenAI TTS - Alloy |
| openai - nova | OpenAI TTS - Nova |
| azure - en-US-JennyNeural | Azure - en-US-JennyNeural |

For Indian languages, Edesy offers additional options:
- **Sarvam Bulbul** - Best for Hindi, Tamil, Telugu
- **Azure Neural** - Good for most Indian languages
- **Google TTS** - Broad language coverage

## Step 4: Set Up Function Calling

Vapi and Edesy both support OpenAI-style function calling.

### Vapi Function Definition
```json
{
  "functions": [
    {
      "name": "book_appointment",
      "description": "Book an appointment for the customer",
      "parameters": {
        "type": "object",
        "properties": {
          "date": { "type": "string" },
          "time": { "type": "string" }
        }
      }
    }
  ]
}
```

### Edesy Function Definition

In Edesy, add functions in the Agent Setup > Functions section:

```json
{
  "name": "book_appointment",
  "description": "Book an appointment for the customer",
  "parameters": {
    "type": "object",
    "properties": {
      "date": {
        "type": "string",
        "description": "Date in YYYY-MM-DD format"
      },
      "time": {
        "type": "string",
        "description": "Time in HH:MM format"
      }
    },
    "required": ["date", "time"]
  }
}
```

The format is identical - you can copy functions directly.

### Webhook Configuration

Set your webhook URL in Agent Setup > Webhooks:
- **Function webhook URL**: Receives function calls
- **Call status webhook**: Receives call events

## Step 5: Telephony Setup

### Option A: Use Edesy Numbers (Recommended)

1. Go to Phone Numbers in dashboard
2. Purchase a new number or request porting
3. Assign to your agent

### Option B: Keep Your Twilio Numbers (BYOP)

1. Go to Phone Numbers > BYOP
2. Enter Twilio credentials:
   - Account SID
   - Auth Token
   - Phone Number
3. Configure Twilio to forward to Edesy webhook

### Option C: Use Exotel (India)

For India-specific numbers:
1. Go to Phone Numbers > BYOP
2. Select Exotel as provider
3. Enter API credentials
4. Map your Exotel numbers

## Step 6: Migrate Webhooks

### Vapi Webhook Events
- `call-start`
- `call-end`
- `transcript`
- `function-call`

### Edesy Webhook Events

| Vapi Event | Edesy Equivalent |
|------------|------------------|
| call-start | call.started |
| call-end | call.ended |
| transcript | transcript.final |
| function-call | function.called |

Update your webhook handlers to use Edesy's event format. See [Webhooks Documentation](https://edesy.in/docs/voice-agent/features/webhooks) for payload details.

## Step 7: Test Your Migration

Before going live:

1. **Test inbound calls** - Call your Edesy number
2. **Test outbound calls** - Use the web dialer
3. **Verify functions** - Trigger each function
4. **Check webhooks** - Confirm events are received
5. **Test languages** - Try Hindi and other languages

### Testing Checklist

- [ ] Agent answers calls correctly
- [ ] System prompt behavior matches Vapi
- [ ] Functions execute successfully
- [ ] Webhooks fire correctly
- [ ] Voice quality is acceptable
- [ ] Latency feels natural
- [ ] Indian languages work well

## Step 8: Go Live

### Cutover Options

**Option 1: Instant Switch**
- Point phone numbers to Edesy
- Decommission Vapi immediately

**Option 2: Gradual Migration**
- Route percentage of calls to Edesy
- Increase over time
- Monitor metrics at each stage

**Option 3: New Number First**
- Get new numbers on Edesy
- Test with real traffic
- Port old numbers later

## Common Issues

### "My agent sounds different"

Voice quality varies by provider. Try different TTS providers or voices to match your preferred sound.

### "Latency feels higher/lower"

Edesy is optimized for low latency. If you experience issues:
- Check your STT/TTS provider selection
- Try Gemini Live for native audio (lowest latency)
- Contact support for latency optimization

### "Functions aren't working"

- Verify webhook URL is accessible
- Check function parameter types match
- Review webhook logs in dashboard

### "Indian languages don't work well"

- Ensure you've selected appropriate STT/TTS for the language
- See [Language Configuration](https://edesy.in/docs/voice-agent/languages) for recommended providers

## Feature Comparison

| Vapi Feature | Edesy Status |
|--------------|--------------|
| System Prompts | ✅ Supported |
| Function Calling | ✅ Supported |
| Call Transfer | ✅ Supported |
| Call Recording | ✅ Supported |
| Webhooks | ✅ Supported |
| Multiple Assistants | ✅ Supported |
| Custom Voices | ✅ Supported |
| Squad (multi-agent) | 🔄 Coming Soon |

## Need Help?

Our migration team is happy to assist:

- **Free migration consultation**: [Book a call](https://voice-agent.edesy.in/)
- **Email**: support@edesy.in
- **Documentation**: Continue reading our docs

We've helped many teams migrate from Vapi and know the common challenges.
