+
REM Labs · AutoGen

Memory that persists across every AutoGen GroupChat

AutoGen's ConversableAgent carries message history in Python memory for the life of a run — then it's gone. REM attaches a shared, persistent substrate so every assistant, user proxy, and critic in the GroupChat reads from and writes to the same long-term store.

Free tier · No credit card · Works with pyautogen and autogen-agentchat

Why AutoGen + REM

What a persistent substrate adds to a GroupChat pattern.

Continuity across sessions

Reset the GroupChat tomorrow — the assistants wake up knowing what happened yesterday. No checkpoint, no serializer.

9 Dream Engine strategies

Between runs, REM summarizes the GroupChat transcript, dedupes redundant turns, and surfaces the salient decisions. Your next GroupChat starts from insight, not noise.

Cross-tool portability

What AutoGen's critic writes, a LangChain reviewer reads. A CrewAI researcher queries the same namespace. Same substrate, every framework.

Install in 60 seconds

AutoGen already supports tool calling. REM attaches as two registered functions.

The Python SDK is in private beta. The requests pattern below is production-ready today. Request SDK access in Discord.

1

Get your API key

Sign up at remlabs.ai/console. Copy the sk-rem-... key and export it.

pip install pyautogen requests # export REM_API_KEY="sk-rem-..."
2

Define recall and remember

Plain Python functions — nothing AutoGen-specific. register_function exposes them to every agent.

3

Register on your GroupChat

Every ConversableAgent that should see memory gets recall/remember. Scope by namespace per GroupChat.

Common patterns

Three shapes: shared memory tools, pre-chat context injection, and persistent GroupChatManager history.

1. Memory tools registered for a GroupChat

Python

All agents in the group can call recall or remember. One shared namespace.

import os, requests import autogen REM = "https://remlabs.ai/v1" H = {"Authorization": f"Bearer {os.environ['REM_API_KEY']}", "Content-Type": "application/json"} NS = "autogen-groupchat-alpha" def recall(query: str) -> str: """Search the shared long-term memory for prior context.""" r = requests.post(f"{REM}/memory-search-semantic", headers=H, json={"namespace": NS, "query": query, "limit": 8}).json() return "\n".join(f"- {m['value'][:240]}" for m in r.get("results", [])) or "(empty)" def remember(fact: str) -> str: """Save a fact or decision for all agents (now and future runs).""" requests.post(f"{REM}/memory-set", headers=H, json={"namespace": NS, "key": fact[:40], "value": fact}) return "stored" cfg = {"config_list": [{"model": "gpt-4o", "api_key": os.environ["OPENAI_API_KEY"]}]} assistant = autogen.AssistantAgent("assistant", llm_config=cfg) critic = autogen.AssistantAgent("critic", llm_config=cfg, system_message="You check the assistant's claims against shared memory via recall().") user = autogen.UserProxyAgent("user", human_input_mode="NEVER", code_execution_config={"use_docker": False}) for agent in (assistant, critic): autogen.register_function(recall, caller=agent, executor=user, description="Search the shared persistent memory.") autogen.register_function(remember, caller=agent, executor=user, description="Store a fact for the whole group and future runs.") group = autogen.GroupChat(agents=[user, assistant, critic], messages=[], max_round=8) manager = autogen.GroupChatManager(groupchat=group, llm_config=cfg) user.initiate_chat(manager, message="Research and decide: which framework for the new agent?")

2. Inject recalled context at the start of each chat

Python

Prepend a digest to the first user message — the group wakes up knowing what happened last time.

def kickoff_with_memory(topic: str): digest = recall(topic) preamble = f"RELEVANT PRIOR CONTEXT:\n{digest}\n\nTASK: {topic}" user.initiate_chat(manager, message=preamble) kickoff_with_memory("Finalize pricing for the Pro tier.")

3. Persist the full GroupChat transcript

Python

After each run, dump the groupchat.messages into REM so the Dream Engine can consolidate overnight.

def persist_transcript(groupchat): for i, m in enumerate(groupchat.messages): requests.post(f"{REM}/memory-set", headers=H, json={ "namespace": NS, "key": f"msg_{i}_{m.get('name','anon')}", "value": f"[{m.get('name')}] {m.get('content','')[:2000]}", "metadata": {"role": m.get("role"), "ts": i}, }) persist_transcript(group) # Tomorrow, `recall('pricing')` will return a consolidated digest, not raw turns.

What you get

Everything AutoGen's in-process message list leaves on the table.

Cross-session memory

One namespace per GroupChat. Rebuilds, cold starts, and different machines all resolve to the same institutional history.

Semantic search under 180ms

Vector + FTS5 fusion. Fast enough to call mid-turn without blowing the latency budget.

Overnight consolidation

Your Dream Engine summarizes sprawling GroupChat transcripts into actionable digests. Next run opens with the answers, not the arguments.

Shared across all your agents

The AutoGen GroupChat writes once; your LangChain reviewer, CrewAI researcher, and Cursor MCP all read it back.

Give your AutoGen GroupChats a real memory

Free tier, no credit card. Ship a GroupChat that remembers across runs in under a minute.

Get API key Read full docs