- Follow the instructions in the reference documents to:
- Install LiveKit and Twilio CLI
- Configure the Twilio SIP trunk for inbound and outbound calls
- Connect the Twilio SIP trunk to LiveKit
- Set up LiveKit Cloud
- Have an AI Agent ready (either a LangGraph agent hosted at a local/public URL or a LiveKit AI Agent)
- Have all necessary API keys ready according to the .env.template file
| Agent | Description |
|---|---|
| quickstart_agent.py | A basic Livekit agent that can be used as a starting point |
| livekit_phone_calling_agent.py | A basic Livekit agent enhanced with telephony capabilities |
| langgraph_phone_calling_agent.py | A LangGraph agent enhanced with audio and telephony capabilities |
| langgraph_agent_avatar.py | A LangGraph agent enhanced with audio and AI Avatar |
-
Create and activate virtual environment:
uv venv && source .venv/bin/activate
-
Download model files (only need to do this once):
uv run langgraph_phone_calling_agent.py download-files
-
Run the agent (could be any agents provided in this repository):
uv run langgraph_phone_calling_agent.py dev
- Go to LiveKit Hosted Playground and connect to the room created in Step 1
- You can then talk with your agent
- Use the following terminal command to start the phone call:
lk dispatch create \ --new-room \ --agent-name my-telephony-agent \ --metadata '{"phone_number": "+15105550123"}' # insert your own phone number here
Refer to temp_plugin/langchain