Skip to main content
Beta. The Agent SDK is in beta. Its surface may change between releases, and the pages in this tab mark what is not finished yet.

One Platform

All agents are hosted on the Agent Runtime Platform, whether they are configured or implemented in code. Its abstraction model is described there and holds for everything in this tab.

Two Packages

The Agent SDK is two packages. The Agent Harness SDK. @telnyx/agent-harness, the harness that runs the turns. The Agent Harness SDK documents it. The Agent Runtime SDK. @telnyx/edge-runtime, the runtime the harness runs on. The Agent Client SDK ships inside it as @telnyx/edge-runtime/client, for apps that reach an agent from outside it. The Agent Runtime SDK documents it. Telnyx ships a managed harness as a reference implementation on the two SDKs. See Deploy the First Agent for detail.

Three Ways to Implement an Agent in Code

From the least work to the most. Whichever way, the user is advised to understand the reference architecture in Inside the Managed Harness first, because every class in this tab extends or replaces a part of it. Extend the Managed Harness. The user starts with the managed harness as it is, exports the project and customizes the class, which is Extending the Managed Agent. Bring a Framework. The user brings the framework that already runs their agent, LangGraph or any other, with its own harness, or takes Telnyx’s own, The Agent Harness SDK, and writes the glue code against the Agent Runtime SDK. Bring Your Own Framework shows the glue code, and the Agent class is the contract it fulfils. Write Everything. The user writes the framework, the harness and the glue code, on the runtime SDK alone. Bring Your Own Framework shows the smallest such loop. It is the most work, and the right choice only when no framework fits.

The Stack

Each layer is built on the one below it, and the pages of each layer show how it uses the one below. The layers reach other Telnyx products as they run.
  • Inference serves the model the harness calls.
  • Agent Memory gives the managed harness a person’s summary before a turn, and keeps each exchange after it.
  • STT and TTS carry a call’s speech for the runtime’s voice layer.
  • The Voice API answers each call with a media stream to the instance, and transfers and hangs up calls.
  • Messaging and Email bring texts and emails in through their webhooks, and carry the replies out.