# telnyx-rag > Semantic search over workspace files using Telnyx Storage + AI embeddings. Index your memory, knowledge, and skills for natural language retrieval. - Author: Chief Bot - Repository: dcasem/clawdbot-recipes - Version: 20260127075829 - Stars: 2 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/dcasem/clawdbot-recipes - Web: https://mule.run/skillshub/@@dcasem/clawdbot-recipes~telnyx-rag:20260127075829 --- --- name: telnyx-rag description: Semantic search over workspace files using Telnyx Storage + AI embeddings. Index your memory, knowledge, and skills for natural language retrieval. --- # Telnyx RAG Memory Semantic search over your Clawdbot workspace using Telnyx's native embedding and similarity search APIs. ## Requirements - **Telnyx API Key** — that's it! - Get one free at [portal.telnyx.com](https://portal.telnyx.com/#/app/api-keys) ## Quick Start ```bash # Set your API key export TELNYX_API_KEY="KEY..." # Run setup cd ~/skills/telnyx-rag ./setup.sh # Search your memory ./search.py "What are my preferences?" ``` ## What It Does - **Indexes** your workspace files (MEMORY.md, memory/*.md, knowledge/, skills/) - **Embeds** content automatically using Telnyx AI - **Searches** using natural language queries - **Prioritizes** results from memory/ (your primary context) ## Setup Options ### Option 1: Environment Variable ```bash export TELNYX_API_KEY="KEY..." ./setup.sh ``` ### Option 2: .env File ```bash echo 'TELNYX_API_KEY=KEY...' > .env ./setup.sh ``` ### Custom Bucket Name ```bash ./setup.sh my-custom-bucket ``` ## Usage ### Search Memory ```bash # Basic search ./search.py "What are David's communication preferences?" # More results ./search.py "meeting notes" --num 10 # JSON output (for scripts) ./search.py "procedures" --json ``` ### Sync Files ```bash # One-time sync ./sync.py # Check status ./sync.py --status # List indexed files ./sync.py --list ``` ## Configuration Edit `config.json` to customize what gets indexed: ```json { "bucket": "clawdbot-memory", "region": "us-central-1", "workspace": ".", "patterns": [ "MEMORY.md", "memory/*.md", "knowledge/*.json", "skills/*/SKILL.md" ], "priority_prefixes": ["memory/", "MEMORY.md"] } ``` ## How It Works ``` ┌─────────────────┐ ┌─────────────────────────────┐ │ Your Workspace │ │ Telnyx Cloud │ │ ├── memory/ │────▶│ Storage: your-bucket/ │ │ ├── knowledge/ │ │ └── (your files) │ │ └── skills/ │ │ │ │ └─────────────────┘ │ ▼ auto-embed │ │ Telnyx AI Embeddings │ Query ─────────▶│ │ │ │ ▼ │ Results ◀───────│ Similarity Search │ └─────────────────────────────┘ ``` ## Clawdbot Integration Add to your `TOOLS.md`: ```markdown ## Semantic Memory Search memory semantically: \`\`\`bash cd ~/skills/telnyx-rag && ./search.py "your query" \`\`\` ``` ### Automated Sync Add to your heartbeat or cron: ```bash cd ~/skills/telnyx-rag && ./sync.py --quiet ``` ## Troubleshooting ### "Bucket not found" ```bash ./sync.py --create-bucket ``` ### "No results found" - Wait 1-2 minutes after initial sync (embeddings take time) - Check files are uploaded: `./sync.py --list` ### Credential errors - Verify `TELNYX_API_KEY` is set: `echo $TELNYX_API_KEY` - Or check `.env` file exists in skill directory ## API Reference ### From Python ```python from search import similarity_search results = similarity_search("What do I know about X?", num_docs=5) for r in results: print(r["source"], r["content"]) ``` ## Credits Built for [Clawdbot](https://github.com/clawdbot/clawdbot) using [Telnyx Storage](https://telnyx.com/products/cloud-storage) and AI APIs.