Skip to main content
NiadraMemoryProcessor is a FrameProcessor that sits between aggregators.user() and the LLM. On every LLMContextFrame it reads the context and places it; observe(aggregators) records the turns. Python only: the Pipecat pipeline, where the model call happens, runs in Python; the JavaScript packages of Pipecat and Daily are browser clients, where a Niadra key must never go.

Install

The five primitives

conversation_for_call(niadra, call_sid, caller) opens the conversation with the CallSid as id and the customer’s number as subject.

Minimal example

The same code is in examples/pipecat_bot.py.

Agent memory

With agent_memory=True (or {"write": True, "max_tokens": 300, "tags": [...]}), the agent’s own notes go right before the customer’s context, in the same message, and history_tools(conversation, agent_memory=...) adds search_agent_memory (and remember). See Agent memory.

Limits

  • The processor always passes the frame on, even when Niadra fails: the pipeline never stops because of the memory.
  • It uses LLMContext and LLMContextFrame, Pipecat’s universal context since 1.9; OpenAILLMContext and LLMMessagesFrame are no longer in Pipecat’s main and are not handled.
  • Python 3.11 or newer only, because Pipecat asks for it. The pipecat and crewai extras pin incompatible versions of a shared dependency; install one per environment.
  • The shape of the processor follows Pipecat’s own Mem0 memory service (BSD 2-Clause, credited in the file); the reading is Niadra’s: one pinned pack per conversation, not a search per message.
  • Tested against pipecat-ai 1.11.0 with a real pipeline, a fake LLM and frames pushed by hand, without audio and without network.

Next steps

Voice agents

context before hello, network attestation and handoff.

Twilio

the call webhook and StirVerstat as proof.