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 proxying, file-based persistence, OpenClaw compatible.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- elevenlabs-twilio-memory-bridge
- tags
- [ "elevenlabs", "twilio", "voice-agent", "telephony", "conversational-ai", "memory-injection", "fastapi" ]
- emoji
- :telephone_receiver:
- author
- britrik
- version
- 1.0.0
- description
- FastAPI personalization webhook that adds persistent caller memory and dynamic context injection to ElevenLabs Conversational AI agents on Twilio. No audio proxying, file-based persistence, OpenClaw compatible.
02 资源文件 7
- 参考文档_meta.json315 B
- 脚本app.py15.8 KB
- 参考文档manifest.json2.1 KB
- 脚本memory.py6.3 KB
- 参考文档README.md8.6 KB
- 参考文档requirements.txt80 B
- 参考文档soul_template.md2.5 KB
03 SKILL.md 正文
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
| Endpoint | Method | Purpose |
|---|---|---|
/webhook/personalize |
POST | ElevenLabs calls this on inbound call |
/webhook/post-call |
POST | Optional post-call cleanup |
/api/memory/{phone_hash} |
POST | Add long-term fact about a caller |
/api/notes |
POST | Add global or caller-scoped context note |
/health |
GET | Health check |
Setup
- Clone repo,
pip install -r requirements.txt - Copy
.env.exampleto.env, fill in secrets - Configure ElevenLabs agent with Custom LLM pointing to your OpenClaw instance
- Enable system prompt + first message overrides in agent Security settings
- Add webhook URL
https://your-domain/webhook/personalizein ElevenLabs settings - Import Twilio number in ElevenLabs dashboard
- Run:
uvicorn app:app --host 0.0.0.0 --port 8000
Required Environment Variables
ELEVENLABS_API_KEY- scoped ElevenLabs keyELEVENLABS_AGENT_ID- your agent IDOPENCLAW_API_BASE_URL- your OpenClaw instance URLPUBLIC_BASE_URL- publicly reachable URL of this service
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
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.