background_agents.channel_summarizer module
Channel summarizer — periodically summarises recent channel activity.
Scans Redis for the 10 most-recently-used channel_msgs:* sorted sets,
fetches recent messages, generates a per-channel summary via an LLM call
(gemini-3-flash-preview), and stores the result in Redis for retrieval by
channel_summary_tools and cross_channel_query.
- async background_agents.channel_summarizer.summarise_channel(channel_id, platform, redis, openrouter, messages_limit=300)[source]
Summarise recent messages for a single channel.
Returns the parsed summary dict or
Noneif nothing to summarise.
- async background_agents.channel_summarizer.summarise_all_active(redis, max_channels=10)[source]
Summarise the most recently active channels.
Finds channels by scanning
channel_msgs:*sorted sets, picks the ones with the most recent activity, and summarises each.Returns a dict with
channels_processedandsummaries.