Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
autourgos-summary-memory
LLM-compressed rolling summary memory for Autourgos agents. Keeps the last N messages in full. When the buffer overflows, older messages are fed to an LLM for compression and merged into a rolling summary. The summary + recent messages are both included in every LLM prompt.
from autourgos_summary_memory import SummaryBufferedMemory
from autourgos_openaichat import OpenAIChatModel
from autourgos_agent import Agent
summarizer_llm = OpenAIChatModel(model="gpt-4o-mini") # needs OPENAI_API_KEY set
memory = SummaryBufferedMemory(llm=summarizer_llm, max_messages=10)
agent = Agent(llm=summarizer_llm, memory=memory)
agent.invoke("Start a long research task...")
Features
- Rolling LLM compression — older messages are summarized, not dropped, so context survives long conversations
- Works without an LLM too — falls back to verbatim concatenation, still prevents unbounded growth
- Pairs with
autourgos-summarizer— that package compresses the agent's reasoning scratchpad, this one compresses conversation history; different jobs, safe to use together
Table of Contents
Install
pip install autourgos-summary-memory
Quick Start
from autourgos_summary_memory import SummaryBufferedMemory
from autourgos_openaichat import OpenAIChatModel
from autourgos_agent import Agent
# Use a cheap model for summarization
summarizer_llm = OpenAIChatModel(model="gpt-4o-mini") # needs OPENAI_API_KEY set
my_llm = summarizer_llm # or any other chat-model instance for the main agent
memory = SummaryBufferedMemory(
llm=summarizer_llm,
max_messages=10, # keep last 10 messages in full; compress the rest
)
agent = Agent(llm=my_llm, memory=memory)
agent.invoke("Start a long research task...")
Without an LLM
If no LLM is provided, overflow messages are concatenated verbatim (no AI compression). Still prevents unbounded growth:
memory = SummaryBufferedMemory(max_messages=10)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
llm |
any | None |
LLM with .invoke(prompt). Falls back to raw concat if not set. |
max_messages |
int | 10 |
Recent messages kept in full before compression triggers. |
moving_summary |
str | "" |
Seed summary to start with (optional). |
What format_for_llm Returns
--- Summary of Past Conversation ---
[compressed history here]
------------------------------------
--- Recent Conversation Context ---
[2024-...] user: latest messages
[2024-...] agent: in full
-----------------------------------
License
Apache License 2.0, Copyright (c) 2026 Jitin Kumar Sengar
Metadata
Release files for autourgos-summary-memory 2.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autourgos_summary_memory-2.0.5.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autourgos_summary_memory-2.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.9 kB
Release files / autourgos_summary_memory-2.0.5.tar.gz
| Download URL | autourgos_summary_memory-2.0.5.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0af63fd36356d4d41027664a3a87dd253f5b61a0df4d042ad1c10aec9e769374
|
|
BLAKE2b-256 checksum How to use checksums |
283ff11d12020b9d56085f35678a185c3e36c627c82311360e5d9c884fce7907
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / autourgos_summary_memory-2.0.5-py3-none-any.whl
| Download URL | autourgos_summary_memory-2.0.5-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3190c6641f64e94b70ec266a3fdf66be16cd599905a17795fad9c743e69be1c6
|
|
BLAKE2b-256 checksum How to use checksums |
c76bb24d817a28164e3679d4fbf63774f5dad20386bc145bab7ba502cdd4a704
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|