Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Introducing Yapify

Make your agents yap.

Give the agent you've already built a voice. Yapify connects your existing Python agent to speech recognition, speech synthesis, and live audio—so people can talk to it.

You've chosen a framework, configured a model, connected tools, and worked out memory and workflows. Yapify starts with that agent. Wrap it in an adapter, choose your speech providers, and turn it into a yapper.

Built-in adapters cover Agno, Claude Agent SDK, CrewAI, Google ADK, Hugging Face smolagents, LangGraph / LangChain agents, LlamaIndex, Microsoft Agent Framework, OpenAI Agents SDK, and Pydantic AI. Custom Python agents can connect through CallableAgent or a BaseAgent subclass. See every adapter and its example.

Start with any framework—or your own agent implementation. Here, reply is your application's function that accepts user text and returns reply text or a stream of text chunks:

import asyncio

from yapify import YapWrap
from yapify.agents import CallableAgent
from yapify.stt import DeepgramSTT
from yapify.tts import CartesiaTTS
from yapify.vad import SileroVAD

from your_app import reply  # Your existing agent's text-in, text-out entry point.

yapper = YapWrap(
    agent=CallableAgent(reply),
    stt=DeepgramSTT(),
    tts=CartesiaTTS(),
    vad=SileroVAD(),
)

asyncio.run(yapper.startlocal())

Your function keeps calling your agent with its configured model, instructions, tools, and session state. It can be synchronous or asynchronous. Yapify handles listening and speaking.

You can also wrap framework objects directly with a built-in adapter. Install the voice dependencies below and keep your agent's own credentials and session configuration.

Try it locally · Try it in your browser · Find your framework · Build an adapter

Why Yapify?

Adding voice to an existing agent brings a new set of concerns: microphone input, speech recognition, turn detection, audio playback, interruptions, and keeping the conversation visible. Reusing an agent also means connecting its input, output, and session state to that voice pipeline.

Yapify puts that connection at the center of its API:

  • Bring your agent. Use an adapter around your configured agent, graph, runner, or client. Your framework continues to execute its tools and workflows.
  • Choose your speech stack. Configure STT, TTS, and voice activity detection independently of the agent.
  • Handle conversation turns. Detect speech, turn reply text into spoken phrases, and clear queued playback when the user interrupts.
  • Talk locally or in a browser. Use microphone and speakers, WebSockets, FastAPI, or WebRTC. The included clients show both sides of the conversation.
  • Extend through base classes. Add an agent, provider, or transport by implementing a small, explicit interface.

The core imports no agent framework, web framework, audio device, or model SDK. Integrations are optional.

Your voice → speech recognition → your existing agent → speech synthesis → its voice

Get talking

Python 3.10+ is required by Yapify; individual framework SDKs can require a newer version. From the repository root, install the example dependencies:

uv sync --group examples --extra local --extra web --extra silero --extra deepgram --extra cartesia

Set your provider keys. The demos use Agno with Gemini, Deepgram for recognition, Cartesia for speech, and Silero for voice activity detection.

export GOOGLE_API_KEY="your-google-key"
export DEEPGRAM_API_KEY="your-deepgram-key"
export CARTESIA_API_KEY="your-cartesia-key"
PowerShell
$env:GOOGLE_API_KEY = "your-google-key"
$env:DEEPGRAM_API_KEY = "your-deepgram-key"
$env:CARTESIA_API_KEY = "your-cartesia-key"

Start a local conversation:

uv run python -m examples.transports.local

Wait for Session online, then speak. The terminal prints your recognized words and streams the agent's reply. Press Ctrl+C to stop.

GEMINI_API_KEY is also accepted. Set GEMINI_MODEL to change the example model; the default is gemini-flash-lite-latest. These are example defaults—you choose the model and providers in your own application.

For an application using this checkout, install only the integrations you need:

python -m pip install -e ".[local,silero,deepgram,cartesia]"

Install your agent's framework and model SDK separately. This command installs Yapify's voice dependencies; the examples group above also installs Agno and Google's model SDK. See the example guide for other setups.

Choose where your agent yaps

Experience Example Run from the repository root
Microphone, speakers, and terminal transcript Local audio uv run python -m examples.transports.local
Browser voice chat and transcript FastAPI WebSocket uv run python -m examples.transports.fastapi_websocket
A socket for your own client Standalone WebSocket uv run python -m examples.transports.websocket
Browser audio over WebRTC WebRTC uv run --extra webrtc python -m examples.transports.webrtc

For either browser server, open http://localhost:8000, allow microphone access, and start a call. Run one at a time; both use port 8000. The standalone socket listens on port 8765; its browser client instructions show how to serve the HTML separately.

Every example contains an explicit yapper = YapWrap(...). Server examples construct it inside the connection handler, giving each call its own agent, speech components, and conversation state.

In your application, choose the matching entry point:

  • await yapper.startlocal() for microphone and speakers.
  • await yapper.server_ws(ws=websocket) for an accepted WebSocket connection.
  • await yapper.run(transport) for a BaseTransport implementation.

A single YapWrap instance serves one conversation at a time.

Bring your framework

Built-in adapters connect these Python agent APIs. Each linked example shows the required SDK dependencies, object types, and session setup.

Your agent Yapify adapter Example
Agno AgnoAgent Agno
LangGraph / LangChain agents LangGraphAgent LangGraph
Pydantic AI PydanticAIAgent Pydantic AI
OpenAI Agents SDK OpenAIAgentsSDKAgent OpenAI Agents
Google ADK GoogleADKAgent Google ADK
Claude Agent SDK ClaudeAgentSDKAgent Claude Agent SDK
CrewAI CrewAIAgent CrewAI
LlamaIndex LlamaIndexAgent LlamaIndex
Microsoft Agent Framework MicrosoftAgentFrameworkAgent Microsoft Agent Framework
Hugging Face smolagents SmolAgentsAgent smolagents
Your own Python function or stream CallableAgent Callable

Adapters translate recognized text into framework calls and reply text into Yapify events. They work with the interfaces shown in the examples; arbitrary graph inputs, structured outputs, or application-specific events may need a custom adapter. CrewAI and smolagents currently speak the final answer.

Keep your framework's memory

Continue using your framework's session, history, and persistence mechanisms. Pass the relevant run options through its adapter—for example, an Agno session_id, a LangGraph config with a thread_id, or a LlamaIndex ctx.

Yapify does not automatically migrate or populate agent memory. Its yapper.memory records generated conversation turns and interruptions. Your application decides which framework session each voice conversation uses.

Where Yapify fits

Pipecat and LiveKit can also connect existing agent logic. Pipecat includes a LangChain processor, and LiveKit provides a LangGraph/LangChain adapter.

Yapify focuses on a direct Python integration: take an existing agent, wrap its text interface, choose speech components, and run it through a transport. It's built for developers who want to add voice while continuing to own their agent's framework, tools, and session setup.

Make it your own

Have an agent with a custom API? Use CallableAgent for a function that accepts text and returns text or a stream of text. For more control, subclass BaseAgent:

from collections.abc import AsyncIterator

from yapify import AgentEvent, BaseAgent

class MyAgent(BaseAgent):
    def __init__(self, existing_agent):
        self.existing_agent = existing_agent

    async def respond(self, text: str) -> AsyncIterator[AgentEvent]:
        # Adapt this call to your application's text-response API.
        reply = await self.existing_agent.reply(text)
        yield AgentEvent.text(reply)

Pass MyAgent(existing_agent) as the agent argument to YapWrap. Stream AgentEvent.text(delta) as text arrives when your agent supports it.

The same approach applies to the rest of the pipeline:

Base class Implement
BaseAgent respond(text) → async stream of agent events
BaseSTT transcribe(audio) → async stream of transcripts
BaseTTS synthesize(text) → async stream of PCM audio
BaseVAD process(pcm) → "start", "stop", or None
BaseTransport audio_in(), send_audio(pcm), and stop_playback()

All five classes are exported from yapify. Start with the interface contracts or run the custom components walkthrough without keys or hardware:

uv run python -m examples.custom_components

Choose dependencies per integration: local, web, websockets, webrtc, silero, webrtc-vad, deepgram, cartesia, openai, and elevenlabs are available as extras; audio adds NumPy acceleration. The all extra covers the listed runtime extras except webrtc-vad. Framework SDKs and additional provider SDKs are installed separately.

Working with real conversations

  • Audio: components exchange raw PCM16 mono at a matching sample rate, defaulting to 16 kHz. Custom transports convert their audio at the boundary.
  • Transcripts: local and browser clients display user and agent text. Custom transports can implement send_event() to receive transcript, agent_delta, and agent_complete events. The transcript records generated text; it does not confirm which audio the listener heard.
  • Interruptions: a speech start cancels the current reply and clears queued playback. Synchronous work running in a Python thread cannot be forcibly stopped. Cancellation does not undo tool actions already performed.
  • Deployment: the browser examples target localhost. Your application owns authentication, HTTPS, and any STUN/TURN configuration needed for WebRTC.
  • Validation: automated checks cover the core, adapter behavior, provider protocol messages with mock connections, browser playback, and a local WebRTC exchange. Live provider compatibility and microphone/speaker quality still need testing with your configuration. Response time depends on the agent, speech providers, and network.

Development

After installing the example dependencies:

uv run pytest -q -p no:cacheprovider
node tests/browser_client.test.cjs
uv build

Optional integration tests skip when their dependencies are absent. The build produces a wheel and source archive that include the license.

License

Apache License, Version 2.0.

Metadata

Release files for yapify 0.0.1a1

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

Source distribution (sdist)

Source distribution for yapify 0.0.1a1
File Size Uploaded Provenance
yapify-0.0.1a1.tar.gz 225.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yapify 0.0.1a1
File Interpreter ABI Platform
yapify-0.0.1a1-py3-none-any.whl Python 3 none any Details

Total release size: 288.4 kB

Release files / yapify-0.0.1a1.tar.gz

Download URL yapify-0.0.1a1.tar.gz
Size 225.6 kB
Tags Source
SHA-256 checksum
How to use checksums
20703ef645047b6fbbbbbe5c0c7c8d38cccdf8a5be082acde96dd56bc77d3bf6
BLAKE2b-256 checksum
How to use checksums
63bb97394b3f2460dc9419bd2f26bc1adbb1d24b2003e251fb169cef76b06b49
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 Oct 19, 2026.

Transparency log

Release files / yapify-0.0.1a1-py3-none-any.whl

Download URL yapify-0.0.1a1-py3-none-any.whl
Size 62.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
848f8d49b578e094fa38fbbe4b30f0949c99108c7bf70a1440be965142e0e50c
BLAKE2b-256 checksum
How to use checksums
5c9df888343dfa78a235cf1a378e5218e67a713c5cba9b19a8d5d25a08233146
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 Oct 19, 2026.

Transparency log

Security for yapify 0.0.1a1

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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for yapify-0.0.1a1.tar.gz

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 Oct 19, 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.

Release history Release notifications | RSS feed

This release
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