Python: .NET & Python: [Feature]: Externalize Durable Agents conversation storage to customer-owned stores
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- backend, databases, distributed-systems
Research direction
Start by reading dotnet/src/Microsoft.Agents.AI.DurableTask/AgentEntity.cs and python/packages/durabletask/agent_framework_durabletask/_entities.py, then review the ADR-0027 design and ChatHistoryProvider.cs. Use the acceptance criteria to define done: both language implementations, migration and schema updates, read-back, documentation, and the specified exactly-once and duplicate-window tests.
Written by the indexing model from the issue text.
Description
Summary
The Durable Agents extension (Microsoft.Agents.AI.DurableTask for .NET, agent-framework-durabletask for Python) currently stores the full conversation history for every agent session inside Durable Task framework (DTF) entity state. This causes two adoption-blocking problems:
- Hard ~1 MB size ceiling. The Durable Task Scheduler (DTS) limits a single entity payload to ~1 MB by default. Because each turn re-checkpoints the full conversation history, long-running sessions hit a wall. The
LargePayloadStorageinterceptor indurabletask-dotnetraises this to ~10 MB but does not remove the underlying unbounded-growth problem. - No customer ownership of conversation data. Conversations live only inside DTF entity state, opaque to the customer's data plane. Compliance, audit, and analytics customers need transcripts in storage they own and operate (e.g., their own Cosmos DB).
Proposed solution
Introduce a pluggable DurableAgentConversationStore extension point that lets customers redirect durable-agent conversation history into a store they own, while preserving today's default in-entity-state behavior. Shipped implementations:
EntityStateConversationStore— default, preserves today's behavior (exactly-once; the store is entity state).- A first-class backend store (e.g., Cosmos) that persists an idempotency marker atomically with each turn — recommended for production (exactly-once).
ChatHistoryProviderConversationStore/HistoryProviderConversationStore— a low-friction adapter bridging to any existingChatHistoryProvider(.NET) /HistoryProvider(Python). Documented as at-least-once because the existing provider contract has no correlation-keyed backend primitive.
The contract centers on an atomic CommitTurnAsync(correlationId, request, response) primitive plus a TryGetTurnAsync(correlationId) replay check. Read-back is via a new DurableTaskClient.GetAgentConversationHistoryAsync(sessionId) extension method.
Full design, alternatives, and the idempotency analysis are captured in ADR-0027 (PR to follow).
Out of scope (tracked separately)
- Entity-level compaction (the contract reserves a
ReplaceAsyncprimitive for it). - Per-content externalization of large
AIContentitems. - Per-tool checkpointing inside a turn (to close the tool-double-execution window).
- Reconciling .NET vs. Python entity-state schema-version handling.
- A reference-holding external
HistoryProviderfor Python (none exists today).
Acceptance criteria
- ADR-0027 reviewed and accepted by deciders.
- .NET:
DurableAgentConversationStoreabstraction + default store + first-class backend store + bridge +UseConversationStoreoption + read-back extension + lazy migration + schema bump to1.2.0. - Python parity for the storage abstraction and worker configuration.
- Unit + integration tests, including the at-least-once duplicate-window negative test and exactly-once recovery test.
- Documentation under
docs/features/durable-agents/, including theLargePayloadStoragemitigation as a Phase-1 alternative.
References
dotnet/src/Microsoft.Agents.AI.DurableTask/AgentEntity.cs— current dual-storage entity.dotnet/src/Microsoft.Agents.AI.Abstractions/ChatHistoryProvider.cs— provider abstraction to bridge.python/packages/durabletask/agent_framework_durabletask/_entities.py— Python entity (same dual-storage pattern).
- Dominant language
- Python
- Stars
- 16
- Forks
- 11
- Avg merge
- 8d 3h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/agent-framework-durable-extension
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/agent-framework-durable-extension#87 · 1 comment ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/agent-framework-durable-extension#75 · 1 comment ·
Maintainers usually reply within 6 days
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
microsoft/agent-framework-durable-extension#143 ·
Maintainers usually reply within 6 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/agent-framework-durable-extension#122 ·
Maintainers usually reply within 6 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/agent-framework-durable-extension#106 ·
Maintainers usually reply within 6 days
All issues in microsoft/agent-framework-durable-extension
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
TomerAberbach/profiler-md#733 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
its-me-prash/vwgroup-connect-ha#1858 ·
Maintainers usually reply within 1 day
-
area: client bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Deleting all alarms or timers shows deleted ones until the next update when there are none leftOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
leikoilja/ha-google-home#1107 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Graphify-Labs/graphify#4524 · 1 comment ·
Maintainers usually reply within 1 day