---
title: Code examples | Telnyx
canonical: https://telnyx.com/code-examples
---
# Code examples | Telnyx

Code examples

# 583 examples.  
 One clone away.

Every Telnyx build in the open, from a four line SMS send to a durable agent that runs an outage on its own. Start with a curated twelve on Edge Compute and the Voice AI Agent platform, then take the rest of the library.

[Browse the repo](https://github.com/team-telnyx/telnyx-code-examples)[Curated builds](#examples)[Edge Compute docs](https://developers.telnyx.com/docs/edge-compute)

A terminal showing the deploy flow: clone the examples repository, add your Telnyx API key as a secret, then run telnyx-edge ship to deploy the example to its own address on telnyxcompute.com. No tunnel and no server to keep running.

your terminal

# clone an example and ship it
$ git clone https://github.com/team-telnyx/telnyx-code-examples
$ cd telnyx-code-examples/edge-url-summarizer
$ telnyx-edge secrets add TELNYX_API_KEY "KEY0123..."
$ npm install && telnyx-edge ship

  edge-url-summarizer-a1b2c3.telnyxcompute.com

# no ngrok, no external server to keep warm

583open source examples

25shipped in 30 days

9languages

0servers to run

Where to start

## Builds to start from.

A curated set across Edge Compute and the Voice AI Agent platform leads, ordered from the smallest complete app to the ones that run a whole workflow on their own. The rest of the library follows.

Language

All583Python292Node.js66TypeScript35Go41Ruby40PHP38Java35C#35

Channel

All583Voice164Messaging179API and web246

12 shown · 583 matching · 583 examples in the full repo

* [Edge Compute4 AugEdge URL SummarizerFetch a URL, summarise it with AI Inference, then cache the result so the second request comes back instantly. The smallest complete Stateful Actor app in the repo, and the one to read first.Edge ComputeStateful ActorsInferenceedge-url-summarizerTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-url-summarizer)
* [Edge Compute19 AugMulti-Model Inference SwitcherChange the model behind a running agent by flipping a KV flag. No redeploy, no restart. Ships with an admin UI that switches the live model between one message and the next.Edge ComputeKVInferenceAgent SDKmulti-model-inference-switcherTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/multi-model-inference-switcher)
* [Edge Compute13 AugLangGraph Agent on EdgeA LangGraph StateGraph running inside the Agent SDK. Telnyx holds the durable state, the message history and the scheduled work. LangGraph runs the reasoning loop. Bring the framework you already use.Edge ComputeAgent SDKInferencelanggraph-agent-on-edgeTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/langgraph-agent-on-edge)
* [Edge Compute18 AugCustomer AgentOne durable actor per customer, keyed by phone number, alive across days, calls, texts and evictions. The AI Assistant is the voice harness inside it. The agent owns the state. Salesforce included.Edge ComputeVoiceMessagingAI Assistantsedge-customer-agent-typescriptTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-customer-agent-typescript)
* [Edge Compute24 AugAgent Fleet on Shared StorageFive agents collaborating through one CloudFS filesystem with ordinary POSIX reads and writes, a SQL registry of who did what, and live state pushed to a dashboard over WebSocket.Edge ComputeCloudFSSQLWebSocketagent-fleet-shared-workspaceTypeScriptREADME only](https://github.com/team-telnyx/telnyx-code-examples/tree/main/agent-fleet-shared-workspace)
* [Edge Compute25 AugNetwork Incident AgentOne durable agent owns an outage end to end. It scores severity with inference, texts affected customers, answers their calls with the incident context, writes the RCA to CloudFS, then schedules its own recurrence check for later.Edge ComputeKVCloudFSVoiceMessagingnetwork-incident-agentTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/network-incident-agent)
* [Voice AI Agent11 AugVoice Agent That Holds a CallAnswer an inbound call and run the whole speech, inference and speech loop inside a single edge location. Zero credential inference, so there is no model API key anywhere in the code.Edge ComputeVoiceInferenceedge-voice-agent-holds-callTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-voice-agent-holds-call)
* [Voice AI Agent19 AugEdge Call Transcription AgentStreams live transcription into durable state, one actor per call. On hangup it summarises the transcript, writes it to the actor's own SQL, and texts the summary out. The post-call workflow most teams build by hand.Edge ComputeVoiceInferenceMessagingedge-call-transcription-agentTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-call-transcription-agent)
* [Voice AI Agent24 AugPersistent State AgentA voice-first agent whose state outlives the call. LangGraph orchestrates inside the actor, Salesforce holds the CRM record, and the workflow survives reschedules, channel switches and days of silence.Edge ComputeVoiceMessagingSalesforcepersistent-state-agentTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/persistent-state-agent)
* [Voice AI Agent4 AugMultilingual Code-Switching AgentThe caller switches language mid-sentence and the agent follows. Five languages behind one number, with no separate speech, model and voice vendors stitched together in application code.Voice AIInferenceText to Speechai-multilingual-code-switching-agent-pythonPythonGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-multilingual-code-switching-agent-python)
* [Voice AI Agent29 JulAssistant with Client-Side ToolsThe assistant drives your actual interface. It navigates the app, opens a modal, changes the theme and fills a form by calling JavaScript in the browser during a live conversation.AI AssistantsVoice APINext.jsai-assistant-client-side-tools-nextjsTypeScriptGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-assistant-client-side-tools-nextjs)
* [Voice AI Agent29 JulLab Results Notification LineA HIPAA-aware inbound line that verifies the patient, gives a minimum necessary summary of a normal result, texts a secure portal link, and escalates anything abnormal to clinical staff.AI AssistantsVoiceMessagingai-lab-results-notification-voice-pythonPythonGuide](https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-lab-results-notification-voice-python)

Go to previous page

1/49

Go to next page

Start building

## Pick one and start.

Free tier, no card, and the same infrastructure all 583 examples run on.

[Sign up](https://telnyx.com/sign-up)[Docs](https://developers.telnyx.com)[Explore the repo](https://github.com/team-telnyx/telnyx-code-examples)

[Start building](https://telnyx.com/sign-up)

### Ask AI

* [![GPT](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/chatgpt_icon-ea55e09d.jpeg?width=92&format=webp)](https://chat.openai.com/?q=What makes Telnyx's global network different, breakdown call quality for normal phone calls and voice AI calls.)
* [![Claude](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/claude_icon-c7c8eef3.webp?width=92&format=webp)](https://claude.ai/new?q=What makes Telnyx's global network different, breakdown call quality for normal phone calls and voice AI calls.)
* [![Perplexity](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/perplexity_icon-cd5b74f1.webp?width=92&format=webp)](https://www.perplexity.ai/search?q=What makes Telnyx's global network different, breakdown call quality for normal phone calls and voice AI calls.)
* [![Gemini](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/gemini_icon-4ff1cbf4.webp?width=92&format=webp)](https://www.google.com/search?udm=50&aep=11&q=What makes Telnyx's global network different, breakdown call quality for normal phone calls and voice AI calls.)
* [![Grok](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/grok_icon-e588e5bd.webp?width=92&format=webp)](https://x.com/i/grok?text=What makes Telnyx's global network different, breakdown call quality for normal phone calls and voice AI calls.)