# Build a Live Call Transcription Agent on Telnyx Edge Compute

> Source: <https://dev.to/sonam_50a41a4ced7e6b4f3fa/build-a-live-call-transcription-agent-on-telnyx-edge-compute-1ieo>
> Published: 2026-08-25 05:38:03+00:00

Call recordings are useful, but they are usually passive.

This example turns a live phone call into something your app can use right away.

The `edge-call-transcription-agent`

example answers an inbound call on Telnyx Edge Compute, starts streaming transcription, stores final transcript segments in an Agent SDK actor, summarizes the call after hangup with Telnyx AI Inference, persists the record, and sends the summary by SMS.

Code: [https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-call-transcription-agent](https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-call-transcription-agent)

The app is a TypeScript Edge Compute function with two Agent SDK actors:

`TranscribeAgent`

- one actor per call`TranscriptRegistry`

- one shared actor for listing stored transcriptsThe call flow:

``` php
call.initiated
  -> record call state
  -> answer call

call.answered
  -> speak greeting

call.speak.ended
  -> start inbound transcription

call.transcription
  -> append transcript segment

call.hangup
  -> summarize
  -> store
  -> SMS summary
```

`POST /webhooks/voice`

receives Telnyx Call Control events`GET /`

serves a lightweight dashboard`GET /transcripts`

lists recent stored transcripts`GET /transcripts/:call_control_id`

fetches one transcript`GET /debug/state?call_control_id=...`

shows live actor state`GET /health/liveness`

and `GET /health/readiness`

are health checksStreaming transcription arrives as many events.

The app needs to remember:

An actor per call makes that state easy to hold.

The source maps each `call_control_id`

to one `TranscribeAgent`

, so the transcript can build up across webhook events.

After hangup, the actor queues a finalize pipeline:

``` php
summarize -> store -> notify
```

The summary uses Telnyx AI Inference through the Edge Compute binding:

```
this.env.TELNYX.ai.openai.chat.createCompletion({
  model,
  messages: [
    { role: "system", content: SUMMARY_SYSTEM_PROMPT },
    { role: "user", content: transcript },
  ],
  max_tokens: 200,
  temperature: 0.3,
});
```

The default model is:

```
zai-org/GLM-5.2
```

The prompt asks for a concise SMS-friendly summary under 320 characters.

Once the summary is ready, the app sends it over Telnyx Messaging:

```
this.env.TELNYX.messages.send({
  from: this.env.SMS_FROM,
  to: this.env.SMS_TO,
  text: state.summary,
});
```

Use placeholders in examples and configure real numbers only as private runtime values:

```
SMS_FROM=<TELNYX_SMS_FROM>
SMS_TO=<SUMMARY_RECIPIENT>
git clone https://github.com/team-telnyx/telnyx-code-examples.git
cd telnyx-code-examples/edge-call-transcription-agent
npm install
```

Set secrets:

```
telnyx-edge secret set TELNYX_API_KEY <YOUR_TELNYX_API_KEY>
telnyx-edge secret set SMS_FROM <TELNYX_SMS_FROM>
telnyx-edge secret set SMS_TO <SUMMARY_RECIPIENT>
```

Deploy:

```
telnyx-edge ship
```

Point your Call Control app webhook to:

```
https://edge-call-transcription-agent-<id>.telnyxcompute.com/webhooks/voice
```

Then call the Telnyx number assigned to the Call Control application.

Before using this with real callers, add:

The useful pattern is simple: live call events, durable state, AI summary, and post-call notification in one edge app.

Resources:
