praisonai-bot package. praisonai bot serve still works exactly as documented here; for a standalone install see praisonai-bot Migration.streaming: true is a shortcut. For unified per-platform defaults and overrides, use Display Policy.TypeError: achat() got an unexpected keyword argument 'stream_callback'. Upgrade to the latest release if you hit that error.Quick Start
Enable with one flag (CLI)
Enable in YAML
Enable in Python
How It Works
agent.stream_emitter, not as a stream_callback kwarg to astart(). The bot adds a temporary callback for the duration of the run and removes it on completion (and on timeout/cancel).Configuration Options
Per-channel streaming support
Advanced configuration (StreamingConfig)
Forprogress mode, custom placeholder text, or fine-grained min_delta control, use the lower-level StreamingConfig API.
Streaming Modes
Four modes are available to match different use cases:draft mode) works on Telegram, Slack, and Discord — each adapter honours its own edit_rate_limit and text_limit from Channel Capabilities. WhatsApp and Email can’t edit (live_edit=False): an explicit draft/progress mode degrades to off there, now logged at WARNING so the fallback is visible. Use auto to opt into “stream where supported, otherwise single-message” without raising a warning. The simple streaming: true / --stream form enables draft mode automatically.Auto mode
auto picks the right mode per channel: it streams (draft) where the channel can edit and falls back to off where it can’t — one config, no per-channel branching.
The same StreamingConfig runs on both an editable and a non-editable channel. Telegram streams live; WhatsApp delivers a single final message.
INFO ... 'auto' resolved to 'draft' for Telegram, WARNING ... 'auto' resolved to 'off' for WhatsApp.
At init time, auto resolves against the channel’s can_edit capability and logs the outcome:
auto only rewrites mode. All your other settings — min_interval, min_delta, placeholder_text, strip_reasoning_tags, … — are preserved via dataclasses.replace(). Earlier degradation reset the whole config to defaults; that no longer happens.StreamingConfig options
Progress feed style
Setprogress_style: feed to render tool calls as a bounded rolling multi-line status view instead of a single overwritten label.
A research agent on Telegram chains web_search, fetch_url, and summarize. With the default progress_style="line", each tool overwrites the last, so a failed fetch_url vanishes. With feed, every step keeps its own line and outcome glyph:
⏳ running, ✓ done, ✗ error — instead of one label that overwrites itself.
When to use which style
How one tool flows through the feed
A tool’s start event and its matching finish event share one correlation id, so the line updates in place instead of duplicating.feed style activates only when mode: progress and progress_style: feed. The default progress_style="line" preserves the existing single-line behaviour bit-for-bit — feed is strictly opt-in per channel.Flood-control
Your Telegram bot is streaming a long answer during peak hours. Telegram starts returning 429 after the third edit. The streamer doubles its edit interval (1.5s → 3s → 6s → capped atmax_interval). After disable_progressive_edits_after consecutive failures it stops editing entirely and waits — when finalize() fires it delivers the completed answer as a fresh message. The user never sees a stuck placeholder, never sees a partial reply, and the rest of your bot’s chats are unaffected because the backoff is per-stream.
_current_min_interval is mutated on the stream instance, not the shared StreamingConfig. A flood in one chat will never slow streaming in another.Reasoning-tag filtering
Default ON.<think> and <reasoning> spans (case-insensitive, multi-line) are stripped from both streamed and final output. A trailing unclosed opening tag is also dropped so internal reasoning never leaks mid-stream while a block is still being produced. Set strip_reasoning_tags: false to opt out (for example, on a reasoning-transparency bot).
YAML vs Python vs CLI
YAML Configuration
Add to yourbot.yaml under the channel configuration:
Python API
Configure streaming programmatically with theconfigure_streaming() method:
Manual Streamer Usage
For advanced use cases, you can useDraftStreamer directly:
Best Practices
Start with `--stream` — tune `stream_edit_interval_ms` only if needed
Start with `--stream` — tune `stream_edit_interval_ms` only if needed
700ms interval works well on Telegram. If you hit “message is not modified” or 429 errors on a shared/busy channel, raise it to 1000–2000. On Discord (stricter limits), prefer 2000 or use the advanced StreamingConfig form.Tune min_interval to your platform's edit rate limit
Tune min_interval to your platform's edit rate limit
chat_update API is more generous. Set min_interval to match your platform’s limits to avoid 429 errors.Use progress mode for tool-heavy agents
Use progress mode for tool-heavy agents
progress mode keeps users informed about what’s happening instead of showing a static “thinking” message.Use `feed` when your agent chains many tools
Use `feed` when your agent chains many tools
progress_style: feed turns a black-box “still thinking…” indicator into a live per-step audit trail. Every tool call keeps its own line with a ⏳/✓/✗ glyph, so users see which step failed instead of watching one label overwrite itself. See the line-vs-feed comparison.Keep `progress_max_lines` small on mobile channels
Keep `progress_max_lines` small on mobile channels
progress_max_lines to 4–6 so the feed stays readable — older lines scroll off the top of the window while the newest steps stay visible.Streaming is off by default — opt in per channel
Streaming is off by default — opt in per channel
streaming: configuration will use the new behavior. All other channels continue with the original single-message approach.Final delivery is guaranteed even when edits are flooded
Final delivery is guaranteed even when edits are flooded
finalize() runs, the streamer first tries to edit the placeholder with the full answer. If that edit fails (or progressive editing was already disabled by a flood-control strike), the streamer falls back to a fresh send_message so you always receive the completed answer. No stale ”🤔 Thinking…” placeholder is left behind.Troubleshooting
Used to see `<think>` or `<reasoning>` spans in your chat?
Used to see `<think>` or `<reasoning>` spans in your chat?
praisonai to get the fix automatically.Bot reply got stuck mid-edit on a busy chat?
Bot reply got stuck mid-edit on a busy chat?
disable_progressive_edits_after / flood_backoff_factor / max_interval per channel if your platform’s rate limits differ.My `progress_style: feed` config was rejected at startup
My `progress_style: feed` config was rejected at startup
"line" or "feed". Any other value raises Invalid progress_style '<v>'. Must be one of: feed, line at load time. Check for typos like feeds or multiline.An errored tool still shows the ✓ glyph
An errored tool still shows the ✓ glyph
error (✗) the compositor never downgrades it to done (✓), and a late done event never overwrites an error. If you ever see this, please file a bug against praisonai.Why is my channel not streaming even though I set `streaming: true`?
Why is my channel not streaming even though I set `streaming: true`?
draft/progress on a channel without live_edit support (WhatsApp, Email) degrades to off, now logged at WARNING: Channel <id> doesn't support live editing; degrading streaming mode '<mode>' to 'off'. Switch to mode: auto so the fallback is expected — auto resolves to off there without treating it as an error you configured wrong.How do I tell whether `auto` resolved to `draft` or `off`?
How do I tell whether `auto` resolved to `draft` or `off`?
Channel <id> streaming mode 'auto' resolved to '<mode>' (can_edit=<bool>). It’s logged at INFO when it resolves to draft (can_edit=True) and at WARNING when it resolves to off (can_edit=False).
