docs(telnyx): release polish — README, voice bot example, CI key - #631
Conversation
Bring the Telnyx plugin to release readiness now that it ships LLM, STT, and TTS in addition to phone transport: - README: lead Usage with a full Agent() snippet, add LLM/STT/TTS configuration tables, document TELNYX_PUBLIC_KEY, and fix the dependency list; update the pyproject description and add keywords. - Add examples/voice_bot.py (Runner/AgentLauncher, all-Telnyx pipeline with smart_turn) plus .env.example so developers can try the AI components without any phone setup. - List Telnyx under LLMs, STT, and TTS in the root README. - Add TELNYX_API_KEY to the CI test workflow so integration tests can run once the GitHub secret is configured. Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughThe PR adds a runnable Telnyx voice-bot example that uses Stream with Telnyx STT, LLM, TTS, and smart-turn detection. It expands Telnyx setup, configuration, dependency, and webhook documentation. It adds environment templates for Stream and Telnyx credentials, updates package metadata and integration listings, and exposes Mergeability Score: 🟡 Moderate · up to The new voice-bot example currently omits required dependencies and its Python compatibility range, so a fresh setup may fail before the example runs; the CI change also requires TELNYX_API_KEY configuration or Telnyx integration coverage will be skipped. Merge should wait for the dependency/documentation fix and explicit secret ownership. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/run_tests.yml (1)
81-81: 📐 Maintainability & Code Quality | 🔵 TrivialConfigure
TELNYX_API_KEYbefore relying on Telnyx integration coverage.If the secret is unavailable, the workflow passes an empty value and the Telnyx LLM, STT, and TTS integration tests skip. Configure the repository or organization secret, then rerun the Telnyx tests.
plugins/telnyx/examples/voice_bot.py (1)
34-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAnnotate both callback
**kwargsparameters.
create_agentandjoin_callaccept untyped keyword arguments. Addobjector the concrete callback value type to both annotations. Keep the catch-all only if the launcher passes extra values.As per coding guidelines, Python code must use type annotations everywhere.
Proposed annotation update
-async def create_agent(**kwargs) -> Agent: +async def create_agent(**kwargs: object) -> Agent: ... -async def join_call(agent: Agent, call_type: str, call_id: str, **kwargs) -> None: +async def join_call( + agent: Agent, call_type: str, call_id: str, **kwargs: object +) -> None:Also applies to: 52-52
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ac421c65-4048-4eff-8043-3c6e16e0908e
📒 Files selected for processing (7)
.github/workflows/run_tests.ymlREADME.mdplugins/telnyx/README.mdplugins/telnyx/examples/.env.exampleplugins/telnyx/examples/README.mdplugins/telnyx/examples/voice_bot.pyplugins/telnyx/pyproject.toml
| - cryptography | ||
| - fastapi | ||
| - aiohttp | ||
| - numpy |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
rg -n 'from dotenv|smart_turn|python-dotenv|vision-agents-plugins-smart-turn|uv add|dependencies' \
plugins/telnyx/examples/voice_bot.py \
plugins/telnyx/README.md \
plugins/telnyx/pyproject.tomlRepository: GetStream/Vision-Agents
Length of output: 962
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- plugins/telnyx/pyproject.toml ---'
cat -n plugins/telnyx/pyproject.toml
printf '%s\n' '--- plugins/telnyx/examples/voice_bot.py ---'
cat -n plugins/telnyx/examples/voice_bot.py
printf '%s\n' '--- relevant README sections ---'
sed -n '1,80p' plugins/telnyx/README.md
sed -n '310,345p' plugins/telnyx/README.md
printf '%s\n' '--- smart_turn package metadata and imports ---'
rg -n -C 3 'vision-agents-plugins-smart-turn|smart_turn|python-dotenv|dotenv' \
plugins/smart_turn plugins/telnyx pyproject.toml uv.lock 2>/dev/null || trueRepository: GetStream/Vision-Agents
Length of output: 41885
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- root project dependency declarations ---'
sed -n '1,150p' pyproject.toml
printf '%s\n' '--- smart_turn project dependency declarations ---'
cat -n plugins/smart_turn/pyproject.toml
printf '%s\n' '--- locked Telnyx and root package metadata ---'
python3 - <<'PY'
import re
from pathlib import Path
text = Path("uv.lock").read_text()
for name in ("vision-agents", "vision-agents-plugins-telnyx", "vision-agents-plugins-smart-turn"):
match = re.search(
rf'(?ms)^\[\[package\]\]\n(?:(?!^\[\[package\]\]).)*?^name = "{re.escape(name)}"\n(?:(?!^\[\[package\]\]).)*?(?=^\[\[package\]\]|\Z)',
text,
)
print(f"--- {name} ---")
print(match.group(0) if match else "NOT FOUND")
PY
printf '%s\n' '--- package exports and plugin loading ---'
rg -n -C 4 'def .*plugin|import_module|vision_agents.plugins|optional|extra' \
agents-core/vision_agents plugins/telnyx/vision_agents plugins/smart_turn/vision_agents \
2>/dev/null | head -n 240Repository: GetStream/Vision-Agents
Length of output: 38512
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- GetStream plugin metadata ---'
cat -n plugins/getstream/pyproject.toml
printf '%s\n' '--- GetStream installation documentation ---'
sed -n '1,35p' plugins/getstream/README.md
printf '%s\n' '--- Telnyx example imports versus declared package names ---'
python3 - <<'PY'
import ast
import tomllib
from pathlib import Path
def imports(path):
tree = ast.parse(Path(path).read_text())
return sorted({
node.module.split(".")[0]
for node in ast.walk(tree)
if isinstance(node, ast.ImportFrom) and node.module
} | {
alias.name.split(".")[0]
for node in ast.walk(tree)
if isinstance(node, ast.Import)
for alias in node.names
})
telnyx = tomllib.loads(Path("plugins/telnyx/pyproject.toml").read_text())
core = tomllib.loads(Path("agents-core/pyproject.toml").read_text())
getstream = tomllib.loads(Path("plugins/getstream/pyproject.toml").read_text())
smart_turn = tomllib.loads(Path("plugins/smart_turn/pyproject.toml").read_text())
print("voice_bot imports:", imports("plugins/telnyx/examples/voice_bot.py"))
print("telnyx dependencies:", telnyx["project"]["dependencies"])
print("vision-agents dependencies:", core["project"]["dependencies"])
print("getstream package:", getstream["project"]["name"])
print("smart-turn package:", smart_turn["project"]["name"])
print("smart-turn Python constraint:", smart_turn["project"]["requires-python"])
PYRepository: GetStream/Vision-Agents
Length of output: 2007
Declare the dependencies required by the new example.
vision-agents already provides python-dotenv. voice_bot.py also imports getstream and smart_turn, but the Telnyx installation does not provide vision-agents-plugins-getstream or vision-agents-plugins-smart-turn.
Add both packages to the example installation path. Document Python >=3.11,<3.14 because that is the constraint of vision-agents-plugins-smart-turn.
Source: MCP tools
Why
The
telnyxplugin now shipsLLM,STT, andTTSin addition to phone transport (#629), but the docs and examples still presented it as phone-only. This brings it to release readiness: a developer can discover and try the AI components, and the README matches the plugin guide.Changes
Agent()snippet (telnyx.STT/LLM/TTS+smart_turn); added LLM/STT/TTS configuration tables (kept audio constants separate); documentedTELNYX_PUBLIC_KEY; corrected the dependency list.keywords.Runner/AgentLauncher, all-Telnyx pipeline, no phone/ngrok/Call Control App needed — plus.env.exampleand a pointer at the top of examples/README.md.TELNYX_API_KEYto the integration test env.Test plan
uv run --no-sync ruff check plugins/telnyxpassesuv run --no-sync pytest -m "not integration" plugins/telnyx/tests— 67 passedvoice_bot.pyend to end in the browser: TTS greeting, streaming LLM response, live STT transcription, and barge-in all workedTELNYX_API_KEYsecret in the repo's GitHub Actions settings so the integration job actually runsOut of scope
telnyx.LLM/STT/TTSlive in the docs repo, not here.Made with Cursor