microsoft / microsoft/agent-framework

.NET & Python: [Feature]: Automatic compaction of chat history to stay within durable backend size limit

Open
#6,808 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.NET compaction durabletask python
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

Description

Description:

The Durable extension persists chat history in a durable entity. Durable backends cap entity state size (e.g., 1 MB on some providers), so long conversations eventually fail to persist and break the agent.

Add an automatic compaction mechanism that monitors the serialized history size and compacts it (summarize or evict older turns) before it hits the backend limit, keeping recent context and letting conversations run indefinitely.

Code Sample

Language/SDK

Both

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by tracing durable entity persistence and serialized chat-history handling in both the Python and .NET SDKs, then identify how backend size limits are measured. Done means long conversations remain persistable by retaining recent context while compacting history before the limit is reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
ai, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.