AstrBot Memory Plugin: Summaries for Longer AI Chats

XMLans Posted on 2026-07-10 30 Views


I wrote a simple memory-enhancement plugin for AstrBot after thinking about how to make AI conversations retain useful details. If AstrBot is new to you, the original installation guide (Chinese original) explains the basic setup.

The source is on GitHub. If it helps, you can leave a star.

The plugin asks the model to summarize the conversation and updates that summary as new messages arrive. It passes the summary back through the system prompt. This adds information beyond the recent message window, although summaries can omit details or carry forward mistakes.

The default configuration compresses roughly 10,000 characters into about 3,000 when the summary grows too long. These are character counts from the original configuration, not token limits.

AstrBot memory enhancement plugin example

Commands

/记忆增强  # Toggle memory enhancement for the current session.
/查看记忆  # View the locally stored summary for this session.
/重置记忆  # Clear the session’s summary memory.

Control token costs

You can reduce AstrBot's retained conversation turns and rely more on the summary to save input tokens. For a long role-play where detailed context matters, keep a larger message window within the model's limits and use the summary as additional support. Summarization itself consumes tokens, so compare the total bill rather than assuming the plugin always saves money.

Adapted from the original Chinese article, published on July 10, 2026.

Hi! I frequently update with various articles about technology, practical tips, and cutting-edge news. I hope it will be helpful to you!
Last updated on 2026-09-30