Skip to main content

Agent Transport

PyPI npm Build Python Build Node Test License: MIT

Transport library (SIP/RTP & Audio Streaming) for voice AI agents to be used with frameworks like LiveKit Agents and Pipecat.

Agent Transport provides signaling and media primitives that AI agent frameworks need to make and receive voice calls. The core is written in Rust for efficient, low-jitter packet processing — audio pacing, RTP handling, and jitter buffering. Framework adapters for LiveKit Agents and Pipecat are provided as drop-in plugins. Bindings in Python and TypeScript/Node.js are also available for other use cases.

Transports

SIP/RTP — Register with any SIP provider, make and receive calls over RTP. G.711 codecs (PCMU/PCMA), DTMF (RFC 2833), NAT traversal (TCP signaling with Via alias, STUN for RTP), hold/unhold, call transfer. No server required, directly connect with telephony providers over SIP like Plivo.

Audio Streaming — Websocket based audio streaming that works with cloud telephony providers like Plivo that support bidirectional audio streaming.

Both transports produce and consume the same AudioFrame format (int16 PCM, 16kHz mono), so agent code works identically regardless of transport.

Framework Adapters

LiveKit Agents

Same AgentSession pipeline -- add ctx.session = session to wire SIP/audio stream transport:

SIP/RTP:

# LiveKit WebRTC                                # Agent Transport SIP/RTP
from livekit.agents import AgentServer,         from agent_transport.sip.livekit import
    JobProcess                                      AgentServer, JobProcess
server = AgentServer()                          server = AgentServer(sip_username=..., sip_password=...)

def prewarm(proc: JobProcess):                  def prewarm(proc: JobProcess):
    proc.userdata["vad"] = silero.VAD.load()        proc.userdata["vad"] = silero.VAD.load()
server.setup_fnc = prewarm                      server.setup_fnc = prewarm

@server.rtc_session()                           @server.sip_session()
async def entrypoint(ctx):                      async def entrypoint(ctx):
    session = AgentSession(                         session = AgentSession(
        vad=ctx.proc.userdata["vad"], ...)              vad=ctx.proc.userdata["vad"], ...)
    await session.start(                            ctx.session = session
        agent=Assistant(),                          await session.start(
        room=ctx.room)                                  agent=Assistant(), room=ctx.room)
cli.run_app(server)                             server.run()

Audio Streaming:

# LiveKit WebRTC                                # Agent Transport AudioStream
from livekit.agents import AgentServer,         from agent_transport.audio_stream.livekit import
    JobProcess                                      AudioStreamServer, JobProcess
server = AgentServer()                          server = AudioStreamServer(listen_addr="0.0.0.0:8765")

def prewarm(proc: JobProcess):                  def prewarm(proc: JobProcess):
    proc.userdata["vad"] = silero.VAD.load()        proc.userdata["vad"] = silero.VAD.load()
server.setup_fnc = prewarm                      server.setup_fnc = prewarm

@server.rtc_session()                           @server.audio_stream_session()
async def entrypoint(ctx):                      async def entrypoint(ctx):
    session = AgentSession(                         session = AgentSession(
        vad=ctx.proc.userdata["vad"], ...)              vad=ctx.proc.userdata["vad"], ...)
    await session.start(                            ctx.session = session
        agent=Assistant(),                          await session.start(
        room=ctx.room)                                  agent=Assistant(), room=ctx.room)
cli.run_app(server)                             server.run()

Full examples: sip_agent.py · sip_multi_agent.py · audio_stream_agent.py · audio_stream_multi_agent.py

See LiveKit SIP Transport docs for recording, Prometheus metrics, outbound API, and full reference.

Pipecat

Same Pipeline — swap transport, everything else stays identical. Audio pacing moves from Python to Rust:

# Pipecat + Plivo (Python audio pacing)          # Agent Transport (Rust audio pacing)
from pipecat.serializers.plivo import             from agent_transport.audio_stream.pipecat \
    PlivoFrameSerializer                              .serializers.plivo import PlivoFrameSerializer
from pipecat.transports.websocket.fastapi import  from agent_transport.audio_stream.pipecat \
    FastAPIWebsocketTransport                         .transports.websocket import WebsocketServerTransport

serializer = PlivoFrameSerializer(                serializer = PlivoFrameSerializer(
    stream_id=..., call_id=...,                       auth_id=..., auth_token=...)
    auth_id=..., auth_token=...)                  server = WebsocketServerTransport(
transport = FastAPIWebsocketTransport(                serializer=serializer)
    websocket=ws, params=Params(
        serializer=serializer))                   @server.handler()
                                                  async def run_bot(transport):
pipeline = Pipeline([                                 pipeline = Pipeline([
    transport.input(), stt, llm, tts,                     transport.input(), stt, llm, tts,
    transport.output()])                                   transport.output()])
task = PipelineTask(pipeline)                         task = PipelineTask(pipeline)

@transport.event_handler("on_client_connected")       @transport.event_handler("on_client_connected")
async def on_connected(transport, client):            async def on_connected(transport):
    await task.queue_frames([LLMRunFrame()])               await task.queue_frames([LLMRunFrame()])

await PipelineRunner().run(task)                      await PipelineRunner().run(task)

                                                  server.run()

Also available for SIP/RTP: from agent_transport.sip.pipecat import SipTransport

Full examples: audio_stream_agent.py · sip_agent.py

Installation

Python

For LiveKit Agents

pip install "agent-transport[livekit]"

For Pipecat

pip install "agent-transport[pipecat]"

Minimum versions: livekit-agents>=1.5, pipecat-ai>=0.0.108

Node.js

For LiveKit Agents

npm install agent-transport @livekit/agents @livekit/rtc-node

macOS note: The ONNX runtime bundled with @livekit/agents-plugin-livekit (v1.21+) has a known mutex crash on macOS that kills the turn detection inference process. Add "overrides": { "onnxruntime-node": "1.20.1" } to your package.json to pin a working version.

Building from source | Local development

Examples

Example Description
livekit/sip_agent.py SIP voice agent with tool calling, turn detection, preemptive generation
livekit/sip_agent.ts TypeScript SIP agent with tool calling, turn detection, metrics
livekit/sip_multi_agent.py Multi-agent with greeter -> sales/support handoff and tool calling
livekit/sip_multi_agent.ts TypeScript multi-agent with class inheritance and llm.handoff()
livekit/audio_stream_agent.py LiveKit agent over Plivo audio streaming
livekit/audio_stream_agent.ts TypeScript agent over Plivo audio streaming
livekit/audio_stream_multi_agent.py Audio streaming multi-agent with handoff and tool calling
livekit/audio_stream_multi_agent.ts TypeScript audio streaming multi-agent
pipecat/sip_agent.py Pipecat pipeline over SIP/RTP with VAD
pipecat/sip_multi_agent.py Pipecat multi-agent with greeter → sales/support handoff
pipecat/audio_stream_agent.py Pipecat over Plivo audio streaming with Rust recorder + mixer
pipecat/audio_stream_multi_agent.py Pipecat audio streaming multi-agent with handoff
cli/phone.py Interactive CLI softphone with mic/speaker, DTMF, mute, hold/unhold

See also: Feature Flags & CLI Phone docs

Releasing

Publishing is label-driven. Bump the version, add release-python-sdk or release-node-sdk label to your PR, and merge — CI handles the rest. Python and Node releases are independent.

License

MIT

Metadata

Release files for agent-transport 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for agent-transport 0.2.2
File Actions
agent_transport-0.2.2-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details for agent_transport-0.2.2-cp39-abi3-win_arm64.whl
agent_transport-0.2.2-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for agent_transport-0.2.2-cp39-abi3-win_amd64.whl
agent_transport-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for agent_transport-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl
agent_transport-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for agent_transport-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl
agent_transport-0.2.2-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for agent_transport-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
agent_transport-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for agent_transport-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 34.1 MB

Release files / agent_transport-0.2.2-cp39-abi3-win_arm64.whl

Download URL agent_transport-0.2.2-cp39-abi3-win_arm64.whl
Size 5.6 MB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
b8c5911214b1f7c652206bb3de1b97c7bb8a4671ada45ab6db7c18f3ebfd805f
BLAKE2b-256 checksum
How to use checksums
b9539ece47c7af90000d67ef2f8685f2efa9804ce55a93ce9f9b04effbd2f08e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / agent_transport-0.2.2-cp39-abi3-win_amd64.whl

Download URL agent_transport-0.2.2-cp39-abi3-win_amd64.whl
Size 5.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2695fe1463fb637896267c18a0349785b4025240244552db0d9abd80e237b532
BLAKE2b-256 checksum
How to use checksums
1c9f88a214fe3ab697178bbad4e3f4b7f60b56ab507975e26ff85c3e91fb64e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / agent_transport-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL agent_transport-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl
Size 5.6 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
f4acfed28c74775e83e383c54bd29cbc1ba7b7d3dda6932ea77ca271472cec0e
BLAKE2b-256 checksum
How to use checksums
0a9dee4b26e2d395f235d4ea0e7a7413cec5f7a39b7f7de884f27039732f3c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / agent_transport-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL agent_transport-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl
Size 5.8 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
b4a8407935dd5f52b1a93a40541774b44819d5d4605706528eede11fbed33678
BLAKE2b-256 checksum
How to use checksums
158afc313009282f88ac85163dd933deeea4e16f6224fb8135163cce9941e06f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / agent_transport-0.2.2-cp39-abi3-macosx_11_0_arm64.whl

Download URL agent_transport-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
Size 5.6 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
27e33579a3922b844882b99b0f482e9685d4b9d83aa6b0f26b900baf8e0fb025
BLAKE2b-256 checksum
How to use checksums
efe36e5d6f023f064c0f6c18e26f58d0c6f2a83a6120160cc33e233de9ded376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / agent_transport-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl

Download URL agent_transport-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl
Size 5.8 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a81712bf4adf2d37cc3f61edb6d62049ab3f8b4745aadfbee5d54d94ca34b11b
BLAKE2b-256 checksum
How to use checksums
4769b1950b52dd7868f07de537cc589bf63c210abc2488b868f7e3780948e25f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Security for agent-transport 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for agent_transport-0.2.2-cp39-abi3-win_arm64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page