Skip to main content
unmute_core.pipecat puts the library’s tools, tasks, model call and telemetry in a Pipecat pipeline. Its main class, UnmuteFlows, runs the tasks of one call. You keep your transport, your speech and your model. Install the library and the plugins the quickstart uses:

Quickstart

agent.py
  1. The AgentSpec says what the agent is, the same way on Pipecat and LiveKit. See AgentSpec.
  2. UnmuteFlows adds the call’s state, hooks and telemetry. install() puts its tools on the context, and main_instruction() is the prompt the LLM starts with.
  3. The library builds no part of the pipeline. Here speech runs on SLNG: Soniox hears the caller and Fish Audio speaks. See SLNG.
To trace the call, add telemetry= and a TelemetryObserver, as Telemetry shows. For OpenAI’s realtime or live service, see Realtime.

Use your own model call

A native Pipecat LLM service gets its prompts filled by UnmuteFlows. To send each request through a ModelCall, like the SLNG Context Router, use ModelCallLLMService as the LLM:
  1. The service gets the prompts unfilled, with the prompt site of each request. The ModelCall decides who fills them.
  2. A model error after the reply began does not fail the call. The reply ends as it stands.
  3. The service closes each model call it was given when the pipeline ends.
See Model call for the interface and SLNG for the router.

Open and end the call

  1. open_call runs the ready checks and the prefetch, then queues the greeting. A failed check says the failure line and ends the call.
  2. transport= notes the caller hanging up, so the end reads caller_hung_up. Your own on_client_disconnected handler still ends the pipeline.
  3. call.end settles the steps’ held saves. Call it after runner.run() and before the telemetry closes.
To hold the caller until the greeting plays, add a GreetingHold. On a phone call, read the caller’s number with telephony_call_info. See Phone calls and The call’s life.

Add Pipecat tools, MCP and an end-call tool

native_tools are Pipecat FunctionSchemas with their own handlers. A Pipecat MCP client needs no new class:
  1. The main agent gets every tool you pass, like a handoff tool. A step gets only the names its task lists: TaskSpec(native_tools=("get_customer",), ...).
  2. The end-call tool ends the call after one model request. The goodbye rides in the reply that calls it.
  3. When that reply has no words, the tool says the goodbye you give it.

Before you ship

  1. Build one UnmuteFlows, one Telemetry and one ModelCall per call. A model call shared across calls is closed under the others.
  2. With telemetry, set PipelineParams(enable_metrics=True, enable_usage_metrics=True) and keep Pipecat’s own enable_tracing off.
  3. On a phone call over a carrier line, set the pipeline’s audio in and out sample rates to 8000.
Every other rule is in Rules to know.

Where to go next

Pipecat adapter reference

Every argument, how a call runs inside, and every rule.

Turn taking

Turn pace, interruption and idle nudges on Pipecat.

Handoffs

Move the call between agents, each with its own model and voice.

The call's life

Call start values, events, the failure line and the end.

Add one piece to your agent

Use one piece on a plain pipeline.