← 返回
开发者工具 Key 中文

Elevenlabs Twilio Memory Bridge

FastAPI personalization webhook that adds persistent caller memory and dynamic context injection to ElevenLabs Conversational AI agents on Twilio. No audio p...
FastAPI 个性化 Webhook,为 Twilio 上的 ElevenLabs 对话 AI 代理提供持久呼叫者记忆和动态上下文注入,无需音频处理。
britrik britrik 来源
开发者工具 clawhub v1.1.1 2 版本 99871.5 Key: 需要
★ 0
Stars
📥 1,555
下载
💾 12
安装
2
版本
#latest

概述

elevenlabs-twilio-memory-bridge

Personalization webhook service for ElevenLabs + Twilio voice agents with persistent caller memory.

What It Does

When a call arrives on your Twilio number, ElevenLabs' native integration triggers this webhook. The bridge looks up the caller's history, loads long-term memory facts and daily context notes, combines them with a customizable soul/personality template, and returns everything as a system prompt override so your agent greets each caller with full context.

Architecture

  • No audio proxying — ElevenLabs and Twilio handle media directly
  • Webhook only — called once per inbound call to inject context
  • File-based persistence — JSON files in ./data/, zero external dependencies
  • OpenClaw compatible — works with any OpenAI-compatible LLM endpoint

Endpoints

EndpointMethodPurpose
---------------------------
/webhook/personalizePOSTElevenLabs calls this on inbound call
/webhook/post-callPOSTOptional post-call cleanup
/api/memory/{phone_hash}POSTAdd long-term fact about a caller
/api/notesPOSTAdd global or caller-scoped context note
/healthGETHealth check

Setup

  1. Clone repo, pip install -r requirements.txt
  2. Copy .env.example to .env, fill in secrets
  3. Configure ElevenLabs agent with Custom LLM pointing to your OpenClaw instance
  4. Enable system prompt + first message overrides in agent Security settings
  5. Add webhook URL https://your-domain/webhook/personalize in ElevenLabs settings
  6. Import Twilio number in ElevenLabs dashboard
  7. Run: uvicorn app:app --host 0.0.0.0 --port 8000

Required Environment Variables

  • ELEVENLABS_API_KEY — scoped ElevenLabs key
  • ELEVENLABS_AGENT_ID — your agent ID
  • OPENCLAW_API_BASE_URL — your OpenClaw instance URL
  • PUBLIC_BASE_URL — publicly reachable URL of this service
  • ADMIN_API_KEY — secret for admin endpoint auth

Optional Environment Variables

VariableDefaultPurpose
----------------------------
WEBHOOK_SECRET_(unset)_Shared secret for HMAC webhook verification
SOUL_TEMPLATE_PATH./soul_template.mdPath to personality template file
DATA_DIR./dataDirectory for JSON persistence
ALLOWED_ORIGINS_(unset)_Comma-separated CORS origins
HOST0.0.0.0Bind address for uvicorn
PORT8000Listen port
LOG_LEVELINFOPython logging level

Security

  • All caller phone numbers are SHA-256 hashed before storage/logging
  • Secrets loaded exclusively from environment variables
  • Optional HMAC webhook signature verification
  • Safe for public GitHub repos, no secrets in source

版本历史

共 2 个版本

  • v1.1.1 当前
    2026-06-03 12:31
  • v1.0.0
    2026-03-28 23:21 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,085 📥 813,456
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,230 📥 268,140

formatferry-markdown

britrik
Local-first document-to-Markdown converter supporting 8 file types (HTML, DOCX, PDF, XLSX, CSV, JSON, XML, PPTX) and 8 o
★ 0 📥 546