Uh oh!
There was an error while loading. Please reload this page.
.NET: Add orchestration ID to durable agent entity state - #2137
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds orchestration ID tracking to durable agent entity state, enabling bidirectional correlation between orchestrations and agent requests. This allows tools like the DTS Dashboard to trace individual agent requests back to their originating orchestration.
- Adds
OrchestrationIdproperty to capture the orchestration context when agents are invoked - Updates the durable agent state schema version to 1.1.0 to reflect the backward-compatible change
- Includes comprehensive test coverage for both orchestration and non-orchestration scenarios
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| schemas/durable-agent-entity-state.json | Adds optional orchestrationId field to the agentRequest schema definition |
| dotnet/src/Microsoft.Agents.AI.DurableTask/RunRequest.cs | Adds internal OrchestrationId property to track orchestration context |
| dotnet/src/Microsoft.Agents.AI.DurableTask/State/DurableAgentStateRequest.cs | Adds OrchestrationId property and maps it from RunRequest during conversion |
| dotnet/src/Microsoft.Agents.AI.DurableTask/State/DurableAgentState.cs | Bumps schema version from 1.0.0 to 1.1.0 for the new optional field |
| dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAIAgent.cs | Sets OrchestrationId from the orchestration context when creating agent requests |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.UnitTests/State/DurableAgentStateRequestTests.cs | Adds unit test for serialization/deserialization of OrchestrationId |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/AgentEntityTests.cs | Adds integration test validating OrchestrationId is set during orchestrations and null otherwise |
| dotnet/src/Microsoft.Agents.AI.DurableTask/Microsoft.Agents.AI.DurableTask.csproj | Grants integration tests access to internal members via InternalsVisibleTo |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
a625097 to
00bc248Compare
Chris (crickman)
left a comment
There was a problem hiding this comment.
Phillip Hoff (@philliphoff) - Does Python require a corresponding update?
Description
Updates durable agent calls made within the context of an orchestration so that the orchestration ID gets propagated to the agent's underlying entity state. This allows tools that analyze agent state (such as the DTS Dashboard) to correlate individual requests to an agent back to the orchestration from which the request was made. (Currently that correlation can be done only one way, from the orchestration to the agent, but not vice-versa.)
Contribution Checklist