Skip to content

AutoGen + PersistMemory

Memory for AutoGen that outlives the conversation

Give an AutoGen group a memory that survives the run, so the second conversation does not re-derive what the first one established.

What AutoGen forgets

An AutoGen group holds its conversation and nothing else. When the run ends, what the agents worked out ends with it, and the next run pays for the same reasoning again. Sharing between agents means passing more context, which is the cost you were trying to avoid.

  • The second run reads what the first established instead of re-deriving it.

  • Every agent in the group reads one store, with no handoff format between them.

  • Recall stays a handful of memories however many runs there have been.

Connecting it

Python, rather than a config file. Query before the group starts and write what it concluded, so recall is a few memories instead of a growing transcript.

from persistmemory import PersistMemory

client = PersistMemory()

known = client.search.query(query=task, limit=5)
context = "\n".join(f"- {r.memory.content}" for r in known.results)

# Hand it to the group as system context, then write back the outcome.
client.memories.remember(text=result.summary)

You sign in with your own account, and the connection is revocable from your dashboard. One live connection per platform: authorising AutoGen again replaces the previous one rather than adding a second.