Skip to content

Document building custom user mute strategies#742

Open
jamsea wants to merge 2 commits intomainfrom
jh/user-mute-custom-strategies
Open

Document building custom user mute strategies#742
jamsea wants to merge 2 commits intomainfrom
jh/user-mute-custom-strategies

Conversation

@jamsea
Copy link
Copy Markdown
Contributor

@jamsea jamsea commented Apr 17, 2026

Summary

  • Adds a "Building Custom Strategies" section to the User Mute Strategies reference covering the BaseUserMuteStrategy contract, which frames reach a strategy, and which frames actually get suppressed when muted.
  • Shows how to toggle a strategy at runtime from a companion FrameProcessor (for signals like LLMTextFrame that don't reach the aggregator directly), with a full wire-up example.
  • Adds a worked "mute for the first N words of the bot speaking" example and a tip about the evaluation-on-frame-arrival caveat.

Closes a Kapa.ai documentation coverage gap where the assistant couldn't answer questions about fine-grained or dynamic muting (per-word muting, runtime enable/disable, which frames strategies can observe).

Test plan

  • mint broken-links passes in CI
  • Preview renders the new section with correct anchor links and code-block highlighting
  • Internal links to #toggling-a-strategy-at-runtime resolve

🤖 Generated with Claude Code

Extends the user mute strategies reference with a "Building Custom
Strategies" section covering the BaseUserMuteStrategy contract, which
frames reach a strategy vs. which frames get suppressed when muted,
runtime toggling via a companion FrameProcessor, and a worked
"mute for first N words" example. Closes Kapa coverage gap for
fine-grained and dynamic muting questions.
@mintlify
Copy link
Copy Markdown

mintlify bot commented Apr 17, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
daily 🟢 Ready View Preview Apr 17, 2026, 8:00 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for implementing and wiring custom user mute strategies, clarifying what frames strategies can observe and what inputs are actually suppressed when muted.

Changes:

  • Adds a “Building Custom Strategies” section describing the BaseUserMuteStrategy contract and frame visibility/suppression behavior.
  • Documents how to toggle muting at runtime via a companion FrameProcessor, including a full pipeline wire-up example.
  • Adds a worked example for muting during the first N words of bot speech, plus a caveat about evaluation timing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api-reference/server/utilities/turn-management/user-mute-strategies.mdx Outdated
Comment thread api-reference/server/utilities/turn-management/user-mute-strategies.mdx Outdated
@jamsea jamsea requested a review from markbackman April 17, 2026 08:07
- Label the base-class code block as a simplified interface and drop the
  misleading import that redefined the class in the same snippet.
- Reword the toggleable-strategy intro to make clear that enable/disable
  belong to the example, not the BaseUserMuteStrategy contract.
- Bound DisclaimerGuardProcessor._buffer to a sliding window and reset it
  on BotStartedSpeakingFrame so it can't grow unbounded when the trigger
  phrase never appears.
)
```

## Building Custom Strategies
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to a guide instead of nesting it the API reference?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a good fit for pipecat/fundamentals/user-input-muting.mdx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants