Vapi Calls - Agent Instructions
Use this skill to perform any task that requires voice interaction over the phone.
Configuration & Network Requirements
⚠️ IMPORTANT: This skill requires your machine to be reachable from the internet to receive real-time call updates.
1. Environment Variables
Configure these in your OpenClaw
config.json (or Gateway env):
- -
VAPI_API_KEY: Your Vapi Private API Key. - INLINECODE2 : The ID of the Vapi Assistant to use as a base.
- INLINECODE3 : The ID of the Vapi Phone Number.
- INLINECODE4 : Crucial. The public HTTPS URL where this agent is reachable (e.g.,
https://my-claw.com or https://xyz.ngrok-free.app). Do not include a trailing slash. - INLINECODE7 (Optional): The local port to listen on (Default:
4430). - INLINECODE9 : (Optional) Provider for Custom Mode (Default:
openai). - INLINECODE11 : (Optional) Model for Custom Mode (Default:
gpt-4o-mini).
2. Connectivity Setup
You must expose the
WEBHOOK_PORT (default 4430) to the internet.
Option A: Cloudflare Tunnel (Recommended)
INLINECODE14
Option B: Ngrok
INLINECODE15
Set WEBHOOK_BASE_URL to the generated URL (e.g., https://random-name.trycloudflare.com).
Usage
Custom Mission (Dynamic)
Provide a specific
system_prompt. The system will automatically use
GPT-4o Mini and enable the
endCall tool. The AI will be able to hang up autonomously.
Native Agent (Static)
Pass
"DEFAULT" for
first_message,
system_prompt, and
end_message. The system will use the exact configuration (Model, Voice, Prompt) defined in the Vapi Dashboard.
Troubleshooting
- - Call hangs / No report: Check if
WEBHOOK_BASE_URL is reachable from the internet. The Python script spins up a temporary server on WEBHOOK_PORT only during the call. - API 400 Error: Check your
VAPI_PHONE_NUMBER_ID and VAPI_ASSISTANT_ID.
Vapi 通话 - 代理指令
使用此技能执行任何需要通过电话进行语音交互的任务。
配置与网络要求
⚠️ 重要提示: 此技能要求您的机器能够从互联网访问,以接收实时通话更新。
1. 环境变量
在您的 OpenClaw config.json(或网关环境变量)中配置以下内容:
- - VAPIAPIKEY:您的 Vapi 私有 API 密钥。
- VAPIASSISTANTID:用作基础的 Vapi 助手 ID。
- VAPIPHONENUMBERID:Vapi 电话号码的 ID。
- WEBHOOKBASEURL:至关重要。 此代理可访问的公共 HTTPS URL(例如 https://my-claw.com 或 https://xyz.ngrok-free.app)。请勿包含尾部斜杠。
- WEBHOOKPORT(可选):本地监听端口(默认值:4430)。
- VAPILLMPROVIDER:(可选)自定义模式的提供商(默认值:openai)。
- VAPILLMMODEL:(可选)自定义模式的模型(默认值:gpt-4o-mini)。
2. 连接设置
您必须将 WEBHOOK_PORT(默认 4430)暴露到互联网。
选项 A:Cloudflare 隧道(推荐)
cloudflared tunnel --url http://localhost:4430
选项 B:Ngrok
ngrok http 4430
将 WEBHOOKBASEURL 设置为生成的 URL(例如 https://random-name.trycloudflare.com)。
使用方法
自定义任务(动态)
提供特定的 system_prompt。系统将自动使用
GPT-4o Mini 并启用
endCall 工具。AI 将能够自主挂断电话。
原生代理(静态)
为 first
message、systemprompt 和 end_message 传递 DEFAULT。系统将使用 Vapi 仪表板中定义的精确配置(模型、语音、提示词)。
故障排除
- - 通话挂断/无报告: 检查 WEBHOOKBASEURL 是否可从互联网访问。Python 脚本仅在通话期间在 WEBHOOKPORT 上启动临时服务器。
- API 400 错误: 检查您的 VAPIPHONENUMBERID 和 VAPIASSISTANTID。