Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
373 changes: 349 additions & 24 deletions dotnet/src/Microsoft.Agents.AI.DurableTask/AgentEntity.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) Microsoft. All rights reserved.

namespace Microsoft.Agents.AI.DurableTask;

/// <summary>
/// The exception thrown when a durable agent is combined with unsupported stateful compaction.
/// </summary>
public sealed class DurableAgentCompactionNotSupportedException : NotSupportedException
{
private const string DefaultMessage =
"Durable .NET agents do not support directly discoverable stateful chat-history compaction. " +
"The current Agent Framework compaction state contains full message copies. Persisting it duplicates " +
"transcript content for entity, external-provider, and service-owned conversations, while discarding it " +
"loses compaction semantics. Disable stateful compaction for durable execution.";

/// <summary>
/// Initializes a new instance of the <see cref="DurableAgentCompactionNotSupportedException"/> class.
/// </summary>
public DurableAgentCompactionNotSupportedException()
: base(DefaultMessage)
{
}

/// <summary>
/// Initializes a new instance with a specified error message.
/// </summary>
public DurableAgentCompactionNotSupportedException(string? message)
: base(message)
{
}

/// <summary>
/// Initializes a new instance with a specified error message and inner exception.
/// </summary>
public DurableAgentCompactionNotSupportedException(string? message, Exception? innerException)
: base(message, innerException)
{
}
}
Loading
Loading