Skip to main content
Bot platform adapters now ship in the praisonai-bot package. praisonai bot serve still works exactly as documented here; for a standalone install see praisonai-bot Migration.
With allow_silence: true, an agent can return NO_REPLY (or a custom token) to send nothing β€” no message, no typing indicator, no error.
Both NO_REPLY (this page) and BotLoopGuard live in praisonaiagents/bots/silence.py. Where NO_REPLY lets an agent opt out of a single reply, BotLoopGuard lets the gateway opt out of an entire runaway bot-to-bot exchange.
from praisonaiagents import Agent

agent = Agent(name="group-bot", instructions="Reply in group chats only when helpful.")
agent.start("Should I respond to this off-topic message?")
The user posts in a group chat; with allow_silence: true, the agent can return NO_REPLY so nothing is sent.

Quick Start

1

YAML

channels:
  telegram:
    token: ${TELEGRAM_BOT_TOKEN}
    group_policy: respond_all
    allow_silence: true
2

Python

from praisonai.bots import Bot
from praisonaiagents import Agent

agent = Agent(
    name="Group Helper",
    instructions="Reply only when asked a direct question. Otherwise return exactly NO_REPLY.",
)
bot = Bot("telegram", agent=agent, allow_silence=True)
bot.run()

How It Works

MarkerHonoured when allow_silence=true
NO_REPLYβœ… default token
[SILENT]βœ…
SILENTβœ…
Custom silence_tokenβœ… exact match only
Prose containing β€œNO_REPLYβ€βŒ not treated as silence

Configuration

FieldTypeDefaultDescription
allow_silenceboolfalseHonour silence markers (opt-in)
silence_tokenstrNoneOverride marker; when set, only this exact string triggers silence
Combine with group_policy: respond_all so the agent may respond, then chooses silence via NO_REPLY.

Best Practices

allow_silence defaults to false β€” existing bots behave unchanged.
Instructions should say when to return exactly NO_REPLY vs a normal reply.
Reduces noise when the bot listens to everything but should rarely speak.

Bot Loop Protection

Break runaway bot-to-bot reply loops

Gateway

Channel configuration reference

Messaging Bots

Multi-platform bot setup

Bot Loop Protection

Break runaway bot-to-bot reply loops with a sliding-window pair budget