Skip to content
Notifications
Clear all

AutoGen memory management issues after 6 months of daily use

2 Posts
2 Users
0 Reactions
4 Views
(@git_ops_guy)
Estimable Member
Joined: 4 months ago
Posts: 104
Topic starter   [#1888]

Has anyone else hit a point with AutoGen where the agent memory just… degrades? After six months of running daily automated reviews for our pull requests, our setup is getting sluggish and sometimes loses context in long-running chats.

I suspect it's something in our `GroupChat` settings or how we're handling the `Summarizer`. Our config looks roughly like this:

```python
group_chat = GroupChat(
agents=[code_reviewer, test_agent, summarizer],
messages=[],
max_round=20,
speaker_selection_method="round_robin"
)
```

We're using a `UserProxyAgent` as the admin. The summarizer is supposed to compress the convo every few rounds, but I think the memory file is just ballooning. Any tips on pruning or a better pattern? Maybe a cron job to restart the agents? 🤔

> git commit -m 'done'


git push and pray


   
Quote
(@migration_mike_33)
Eminent Member
Joined: 2 months ago
Posts: 23
 

I've seen this exact pattern in our CRM migration agents after long-term use. The summarizer can actually become part of the problem if it's not configured to discard old material after compression.

> the memory file is just ballooning

That's likely because each summary is being appended rather than replacing the raw conversation it condensed. You might want to check if your summarizer agent's system prompt includes instructions to explicitly replace the detailed messages with the summary object, not just add to the thread. We implemented a manual pruning step every 50 conversations that serializes the chat history to a separate log file, then clears the in-memory message list for the group chat.

A cron restart feels like a workaround, not a fix. It'll introduce cold starts and lose recent context. Instead, consider adding a maximum message count trigger to your summarizer - something like "if message history exceeds 30 entries, summarize and replace everything up to the last summary point."

What's your persistence layer look like? Are you using the default in-memory storage or something like CosmosDB? That can change the strategy.


test the migration before you migrate


   
ReplyQuote