Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
191779c
Python: Add factory pattern to concurrent orchestration builder (#2738)
TaoChenOSU Dec 11, 2025
4c6a5d4
Python: fix: GroupChat ManagerSelectionResponse JSON Schema for OpenA…
q33566 Dec 11, 2025
3481914
Capture file IDs from code interpreter in streaming responses (#2741)
moonbox3 Dec 11, 2025
989b6eb
.NET: [BREAKING] Prevent nulls in AIAgent property (#2719)
SergeyMenshykh Dec 11, 2025
5da1c2f
code ql sm04598 (#2723)
DeagleGross Dec 11, 2025
67e8304
.NET: Add Conversation State Sample (Step05) (#2697)
Copilot Dec 11, 2025
0413f42
Bump AWSSDK.Extensions.Bedrock.MEAI from 4.0.4.7 to 4.0.4.11 (#2777)
dependabot[bot] Dec 11, 2025
194486c
Bump Azure.Identity from 1.17.0 to 1.17.1 (#2780)
dependabot[bot] Dec 11, 2025
8bb9927
Bump Azure.AI.AgentServer.AgentFramework from 1.0.0-beta.4 to 1.0.0-b…
dependabot[bot] Dec 11, 2025
c376868
Python: added more complete parsing for mcp tool arguments (#2756)
eavanvalkenburg Dec 11, 2025
8d53b20
Python: Updated package versions (#2784)
dmytrostruk Dec 11, 2025
16230d3
Bump actions/checkout from 5 to 6 (#2404)
dependabot[bot] Dec 11, 2025
eb1117f
.NET: adds support for labels in edges, fixes rendering of labels in…
joslat Dec 12, 2025
d7434d5
Python: Added custom args and thread object to ai_function kwargs (#2…
dmytrostruk Dec 12, 2025
0fc7933
Fix WorkflowAgent to include thread convo history. Enable checkpointi…
moonbox3 Dec 12, 2025
e008144
Update OpenAIResponses.yaml to match AgentSchema (#2598)
richardjortega Dec 12, 2025
e0ff153
Python: Remove warnings from workflow builder on not using factories …
TaoChenOSU Dec 12, 2025
0dcebc6
Python: Filter framework kwargs from MCP tool invocations (#2870)
moonbox3 Dec 16, 2025
a729875
Python: Fix WorkflowAgent to emit yield_output as agent response (#2866)
moonbox3 Dec 16, 2025
3c37971
Python: Use agent description in HandoffBuilder auto-generated tools …
lbbniu Dec 16, 2025
3139347
Python: [BREAKING] Observability updates (#2782)
eavanvalkenburg Dec 16, 2025
11d6dcf
Python: Fix middleware terminate flag to exit function calling loop i…
moonbox3 Dec 16, 2025
958a488
Python: Fix context duplication in handoff workflows when restoring f…
moonbox3 Dec 16, 2025
3c322c9
.NET: Update to latest Azure.AI.*, OpenAI, and M.E.AI* (#2850)
stephentoub Dec 16, 2025
a53a3c7
Bump actions/download-artifact from 6 to 7 (#2862)
dependabot[bot] Dec 16, 2025
0132cf6
Bump actions/cache from 4 to 5 (#2861)
dependabot[bot] Dec 16, 2025
1dbf3fd
Bump actions/upload-artifact from 5 to 6 (#2860)
dependabot[bot] Dec 16, 2025
2f06fe5
Python : Ollama Connector for Agent Framework (#1104)
nmoeller Dec 16, 2025
3a7047f
Skip failing IT (#2904)
rogerbarreto Dec 16, 2025
b15466f
.NET: Cosmos DB UT Fast Skip (For Non-Configured Local envs) (#2906)
rogerbarreto Dec 16, 2025
754dfb2
.NET: Add TTLs to durable agent sessions (#2679)
cgillum Dec 16, 2025
54f482d
Python: Update Mem0Provider to use v2 search API `filters` parameter…
giles17 Dec 16, 2025
e319707
Updated package versions (#2913)
dmytrostruk Dec 16, 2025
03a403d
.NET: Switch to new "Run" method name. (#2843)
philliphoff Dec 16, 2025
2bde58f
Python: Switch to new "run" method name. (#2890)
philliphoff Dec 16, 2025
8fca71e
[BREAKING] Python: Add factory pattern to handoff orchestration build…
TaoChenOSU Dec 16, 2025
6adcac2
Python: Flow custom kwargs to agents via Workflow SharedState (#2894)
moonbox3 Dec 17, 2025
06cdcb9
Fix Pydantic error when using Literal type for tool params (#2893)
moonbox3 Dec 17, 2025
ec1c5e9
Updated Ollama package version (#2920)
dmytrostruk Dec 17, 2025
d552798
Python: Azure AI Agent with Bing Grounding Citations Sample (#2892)
giles17 Dec 17, 2025
c7ddb8a
.NET: Make DelegatingAIAgent abstract (#2797)
Copilot Dec 17, 2025
3cd805f
Added additional arguments for Azure AI agent (#2922)
dmytrostruk Dec 17, 2025
ee53fe4
Python: Correction of MCP image type conversion in _mcp.py (#2901)
egeozanozyedek Dec 17, 2025
3608397
Pass kwargs into subworkflows (#2923)
moonbox3 Dec 18, 2025
ca1532c
Python: Move ollama samples to samples getting started dir (#2921)
moonbox3 Dec 18, 2025
0298e0a
Python: fix: correct BadRequestError when using Pydantic model in res…
samueljohnsiby Dec 18, 2025
a71f768
.NET: [Breaking] Delete display name property (#2758)
SergeyMenshykh Dec 18, 2025
e5c11d3
Python: cleanup and refactoring of chat clients (#2937)
eavanvalkenburg Dec 18, 2025
b4f2709
Python: Workflow add option to visualize internal executors (#2917)
TaoChenOSU Dec 18, 2025
e3f8bfc
Python: Fixes Run ID and Thread ID casing to align with AG-UI Typescr…
howlowck Dec 18, 2025
8ff34f9
Python: Add workflow cancellation sample (#2732)
victordibia Dec 18, 2025
ff9343d
.NET: Update Anthropic package to version 12.0.0 (#2914)
Copilot Dec 18, 2025
37b4cfd
Python: Add Azure Managed Redis Support with Credential Provider (#2887)
giles17 Dec 18, 2025
b0b5777
Bump CommunityToolkit.Aspire.OllamaSharp from 13.0.0-beta.440 to 13.0…
dependabot[bot] Dec 18, 2025
d46adff
Bump AWSSDK.Extensions.Bedrock.MEAI from 4.0.4.11 to 4.0.5 (#2853)
dependabot[bot] Dec 18, 2025
a841bdd
Bump Azure.AI.AgentServer.AgentFramework from 1.0.0-beta.4 to 1.0.0-b…
dependabot[bot] Dec 18, 2025
b0a7a1f
Python: Fix WorkflowAgent event handling and kwargs forwarding (#2946)
moonbox3 Dec 18, 2025
19a9e13
.NET: Use GrpcEntityRunner instead of TaskEntityDispatcher (#2759)
jviau Dec 19, 2025
e15eab7
Python: Bump Py version to 1.0.0b251218 for a release. Update CHANGEL…
moonbox3 Dec 19, 2025
8783ac5
Python: Introducing Foundry Local Chat Clients (#2915)
eavanvalkenburg Dec 19, 2025
d83cf93
Updated package versions (#2978)
dmytrostruk Dec 19, 2025
6930c0f
Python: Added GitHub MCP sample with PAT (#2967)
giles17 Dec 19, 2025
85d70f0
Python: Preserve reasoning blocks with OpenRouter (#2950)
SuperKenVery Dec 19, 2025
defe0f1
Python: Added response.created and response.in_progress event process…
howlowck Dec 19, 2025
3b77192
Python: Introducing support for Bedrock-hosted models (Anthropic, Coh…
duttastunil Dec 19, 2025
0e152a0
.NET: [Durable Agents] Reliable streaming sample (#2942)
cgillum Dec 19, 2025
8b743af
Fix typo in README.md about agent definitions (#2634)
SyChell Dec 22, 2025
a32702c
Python: latency improvements (#3014)
eavanvalkenburg Dec 23, 2025
5ab4759
Python: Updated package versions (#3024)
dmytrostruk Dec 23, 2025
4b8a545
Python: add powerfx safe mode (#3028)
eavanvalkenburg Dec 23, 2025
8b4f7d5
.NET: [Breaking] Introduce RunCoreAsync/RunCoreStreamingAsync delegat…
Copilot Dec 30, 2025
577ad4b
add issue template and additional labeling (#3006)
eavanvalkenburg Jan 5, 2026
deea844
fix and extra int test (#3037)
eavanvalkenburg Jan 5, 2026
3ef67ef
.NET: [BREAKING] Refactor ChatMessageStore methods to be similar to A…
westey-m Jan 5, 2026
0aba02c
[BREAKING] Remove unused AgentThreadMetadata (#3067)
westey-m Jan 5, 2026
928c9d5
Python: Fix AzureAIClient failure when conversation history contains …
moonbox3 Jan 5, 2026
ed5278c
Fix: Update OTLP exporter protocol conditions (#3070)
takanori-terai Jan 6, 2026
844d345
Python: Fix ExecutorInvokedEvent and ExecutorCompletedEvent observabi…
moonbox3 Jan 6, 2026
0aa0579
.NET: Seal ChatClientAgentThread (#2842)
Copilot Jan 6, 2026
7a05849
Fix broken strands urls. (#3102)
westey-m Jan 6, 2026
953fde6
.NET: Fix message ordering inconsistency when using AIContextProvider…
Copilot Jan 6, 2026
24c8225
fix: tool_choice parameter not being honored when passed to agent.run…
moonbox3 Jan 6, 2026
ea370f8
sharepoint sample fix (#3108)
giles17 Jan 6, 2026
202f557
Bump versions to 1.0.0b260106 for a release. Update CHANGELOG.md (#3109)
moonbox3 Jan 7, 2026
f49e537
Bump Bedrock version to latest (#3110)
moonbox3 Jan 7, 2026
db283cd
Python: Fix MCP tool result serialization for list[TextContent] (#2523)
claude89757 Jan 7, 2026
2e1189c
Python: Improve DevUI, add Context Inspector view as new tab under tr…
victordibia Jan 7, 2026
dd69cab
.NET: Seal factory contexts and add non JSO deserialize overloads (#3…
westey-m Jan 7, 2026
521f046
Enable blank issues in issue template configuration
markwallace-microsoft Jan 7, 2026
a118fd5
updated templates (#3106)
eavanvalkenburg Jan 7, 2026
f4ab586
Python: Streaming sample for azurefunctions (#3057)
gavin-aguiar Jan 7, 2026
e9d97ce
Python: fix(azure-ai): Fix response_format handling for structured ou…
moonbox3 Jan 7, 2026
f508f1d
Python: Bump python version to 1.0.0b260107 for a release (#3128)
moonbox3 Jan 7, 2026
299a511
Make A2AAgent public, so that it's concrete implementation methods ca…
westey-m Jan 8, 2026
3388864
.NET: Map additional props <-> A2A metadata (#3137)
SergeyMenshykh Jan 8, 2026
ab493af
Python: Fix Anthropic streaming response bugs (#3141)
sukeesh Jan 8, 2026
b88b2c3
Bump AWSSDK.Extensions.Bedrock.MEAI from 4.0.5 to 4.0.5.1 (#2994)
dependabot[bot] Jan 8, 2026
49cecf3
Bump Anthropic from 12.0.0 to 12.0.1 (#2993)
dependabot[bot] Jan 8, 2026
7aa72f6
.NET: [Breaking] Prevent loss of input messages & streamed updates wh…
SergeyMenshykh Jan 8, 2026
99fac4c
.NET: fix: Expose WorkflowErrorEvent as ErrorContent (#2762)
lokitoth Jan 8, 2026
f6086e4
Bump Microsoft.Agents.AI.Workflows from 1.0.0-preview.251125.1 to 1.0…
dependabot[bot] Jan 8, 2026
92435c6
.NET: Add Run overloads to expose ChatClientAgentRunOptions in Intell…
Copilot Jan 8, 2026
3f7ea35
Python: Add tool call/result content types and update connectors and …
Copilot Jan 8, 2026
01c5aab
Bump Google.GenAI from 0.6.0 to 0.9.0 (#2995)
dependabot[bot] Jan 8, 2026
9c04196
Bump js-yaml from 4.1.0 to 4.1.1 in /python/packages/devui/frontend (…
dependabot[bot] Jan 8, 2026
13a5b70
Updated package versions (#3144)
dmytrostruk Jan 8, 2026
50d34ae
.NET: Bump Microsoft.Agents.AI.OpenAI and Microsoft.Extensions.AI.Ope…
dependabot[bot] Jan 8, 2026
88968da
Python: fix(ag-ui): Execute tools with approval_mode, fix shared stat…
moonbox3 Jan 9, 2026
d28ad2d
Track agent name with updates for workflow agent (#3146)
moonbox3 Jan 9, 2026
6445b6b
Python: Fix AzureAIClient tool call bug for AG-UI use (#3148)
moonbox3 Jan 9, 2026
551c2c3
Python: multiple bug fixes (#3150)
eavanvalkenburg Jan 12, 2026
6e3bc21
fix(anthropic): fix duplicate ToolCallStartEvent in streaming tool ca…
chenaoxd Jan 12, 2026
bb6ecd9
.NET: [BREAKING] Change GetNewThread and DeserializeThread to async (…
westey-m Jan 12, 2026
3a5fe31
Fix Ollama model env var in documentation (#3156)
dmsuehir Jan 12, 2026
3e13909
Python: Add Pydantic request model and OpenAPI tags support to AG-UI …
claude89757 Jan 12, 2026
c7cb5be
.NET: Improve resolving `AITool` from DI (#3175)
DeagleGross Jan 12, 2026
e63c148
Python: Fix MCPStreamableHTTPTool to use new streamable_http_client A…
Copilot Jan 12, 2026
ef44fb4
azureai direct a2a endpoint support (#3127)
giles17 Jan 12, 2026
203fb7b
Python: [BREAKING]: removed display_name, renamed context_providers, …
eavanvalkenburg Jan 13, 2026
b2893fb
Python: MCP Improvements: improved connection loss behavior, paginati…
eavanvalkenburg Jan 13, 2026
9c09457
Python: Add declarative workflow runtime (#2815)
moonbox3 Jan 13, 2026
5faa285
point URL to agent, not to agentcard (#3176)
DeagleGross Jan 13, 2026
3e97425
Python: [BREAKING]: Introducing Options as TypedDict and Generic (#3140)
eavanvalkenburg Jan 13, 2026
0b15241
[BREAKING] Python: Refactor orchestrations (#3023)
TaoChenOSU Jan 13, 2026
7d2d345
Python: ADR for create/get agent API (#2618)
dmytrostruk Jan 13, 2026
655a59a
Add ignored parameter for CodeQL in workflow (#3204)
markwallace-microsoft Jan 13, 2026
04657c2
Implement IReadOnlyList on InMemoryChatMessageStore (#3205)
westey-m Jan 13, 2026
c063fc7
.NET: Make ChatMessageStore and AIContextProvider context props setta…
westey-m Jan 13, 2026
1ae0b09
Python: Add dependencies param to ag-ui FastAPI endpoint (#3191)
moonbox3 Jan 13, 2026
d8cf836
renamed all (#3207)
eavanvalkenburg Jan 14, 2026
8b14490
Python: ADR for simplified get response (#3098)
eavanvalkenburg Jan 14, 2026
c70e594
.NET: [Breaking] Rename`AgentRunResponse` and `AgentRunResponseUpdate…
SergeyMenshykh Jan 14, 2026
f56808b
.NET: [Breaking] Rename AgentRunResponseEvent and AgentRunUpdateEvent…
SergeyMenshykh Jan 14, 2026
99c5718
Python: Create/Get Agent API for Azure V2 (#3059)
dmytrostruk Jan 14, 2026
6c956ec
Python: Add more specific exceptions to Workflow (#3188)
TaoChenOSU Jan 14, 2026
77bef83
Merge with main
larohra Jan 14, 2026
9a0f2fc
Merge branch 'main' into merge-feature-with-main
larohra Jan 14, 2026
9b9a0f1
Python: Added AzureAI sample for downloading code interpreter generat…
giles17 Jan 14, 2026
cb2862d
update package versions (#3223)
giles17 Jan 14, 2026
ffe2e78
Python: fix(core): correct FunctionResultContent ordering in Workflow…
moonbox3 Jan 15, 2026
80b25a7
fix(workflows): rename WorkflowOutputEvent.source_executor_id to exec…
moonbox3 Jan 15, 2026
620da7a
Python: fix(ag-ui): add MCP tool support for AG-UI approval flows (#3…
moonbox3 Jan 15, 2026
15d0c34
Python: Properly configure structured outputs based on new options di…
moonbox3 Jan 15, 2026
3dbdece
.NET: Merge AgentRunOptions.AdditionalProperties into ChatOptions.Add…
westey-m Jan 15, 2026
e192af9
.NET: Update Google.GenAI to 0.11.0 and remove polyfill implementatio…
Copilot Jan 15, 2026
2ab859d
.NET: [BREAKING] Renamed CreateAIAgent/GetAIAgent to AsAIAgent (#3222)
dmytrostruk Jan 15, 2026
6e9420f
Updated DurableAIAgent and fixed integration tests (#3241)
dmytrostruk Jan 15, 2026
48d124e
Python: Create/Get Agent API for Azure V1 (#3192)
dmytrostruk Jan 15, 2026
dd3e2b6
Bump azure-core from 1.37.0 to 1.38.0 in /python (#3209)
dependabot[bot] Jan 15, 2026
b5ca0c8
Python: Create/Get Agent API for OpenAI Assistants (#3208)
dmytrostruk Jan 15, 2026
975884f
Python: (AG-UI) Support service-managed thread on AG-UI (#3136)
howlowck Jan 16, 2026
b773830
Create/Get Agent API - fixes and example improvements (#3246)
dmytrostruk Jan 16, 2026
15a7c9a
Fix merge conflicts
larohra Jan 16, 2026
46d3a48
Merge with main
larohra Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 13 additions & 13 deletions .github/upgrades/prompts/SemanticKernelToAgentFramework.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ After completing migration, verify these specific items:
1. **Compilation**: Execute `dotnet build` on all modified projects - zero errors required
2. **Namespace Updates**: Confirm all `using Microsoft.SemanticKernel.Agents` statements are replaced
3. **Method Calls**: Verify all `InvokeAsync` calls are changed to `RunAsync`
4. **Return Types**: Confirm handling of `AgentRunResponse` instead of `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>`
4. **Return Types**: Confirm handling of `AgentResponse` instead of `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>`
5. **Thread Creation**: Validate all thread creation uses `agent.GetNewThread()` pattern
6. **Tool Registration**: Ensure `[KernelFunction]` attributes are removed and `AIFunctionFactory.Create()` is used
7. **Options Configuration**: Verify `AgentRunOptions` or `ChatClientAgentRunOptions` replaces `AgentInvokeOptions`
Expand All @@ -119,7 +119,7 @@ Agent Framework provides functionality for creating and managing AI agents throu
Key API differences:
- Agent creation: Remove Kernel dependency, use direct client-based creation
- Method names: `InvokeAsync` → `RunAsync`, `InvokeStreamingAsync` → `RunStreamingAsync`
- Return types: `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>` → `AgentRunResponse`
- Return types: `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>` → `AgentResponse`
- Thread creation: Provider-specific constructors → `agent.GetNewThread()`
- Tool registration: `KernelPlugin` system → Direct `AIFunction` registration
- Options: `AgentInvokeOptions` → Provider-specific run options (e.g., `ChatClientAgentRunOptions`)
Expand Down Expand Up @@ -166,8 +166,8 @@ Replace these method calls:
| `thread.DeleteAsync()` | Provider-specific cleanup | Use provider client directly |

Return type changes:
- `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>` → `AgentRunResponse`
- `IAsyncEnumerable<StreamingChatMessageContent>` → `IAsyncEnumerable<AgentRunResponseUpdate>`
- `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>` → `AgentResponse`
- `IAsyncEnumerable<StreamingChatMessageContent>` → `IAsyncEnumerable<AgentResponseUpdate>`
</api_changes>

<configuration_changes>
Expand All @@ -191,8 +191,8 @@ Agent Framework changes these behaviors compared to Semantic Kernel Agents:
1. **Thread Management**: Agent Framework automatically manages thread state. Semantic Kernel required manual thread updates in some scenarios (e.g., OpenAI Responses).

2. **Return Types**:
- Non-streaming: Returns single `AgentRunResponse` instead of `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>`
- Streaming: Returns `IAsyncEnumerable<AgentRunResponseUpdate>` instead of `IAsyncEnumerable<StreamingChatMessageContent>`
- Non-streaming: Returns single `AgentResponse` instead of `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>`
- Streaming: Returns `IAsyncEnumerable<AgentResponseUpdate>` instead of `IAsyncEnumerable<StreamingChatMessageContent>`

3. **Tool Registration**: Agent Framework uses direct function registration without requiring `[KernelFunction]` attributes.

Expand Down Expand Up @@ -397,7 +397,7 @@ await foreach (AgentResponseItem<ChatMessageContent> item in agent.InvokeAsync(u

**With this Agent Framework non-streaming pattern:**
```csharp
AgentRunResponse result = await agent.RunAsync(userInput, thread, options);
AgentResponse result = await agent.RunAsync(userInput, thread, options);
Console.WriteLine(result);
```

Expand All @@ -411,7 +411,7 @@ await foreach (StreamingChatMessageContent update in agent.InvokeStreamingAsync(

**With this Agent Framework streaming pattern:**
```csharp
await foreach (AgentRunResponseUpdate update in agent.RunStreamingAsync(userInput, thread, options))
await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(userInput, thread, options))
{
Console.Write(update);
}
Expand All @@ -420,8 +420,8 @@ await foreach (AgentRunResponseUpdate update in agent.RunStreamingAsync(userInpu
**Required changes:**
1. Replace `agent.InvokeAsync()` with `agent.RunAsync()`
2. Replace `agent.InvokeStreamingAsync()` with `agent.RunStreamingAsync()`
3. Change return type handling from `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>` to `AgentRunResponse`
4. Change streaming type from `StreamingChatMessageContent` to `AgentRunResponseUpdate`
3. Change return type handling from `IAsyncEnumerable<AgentResponseItem<ChatMessageContent>>` to `AgentResponse`
4. Change streaming type from `StreamingChatMessageContent` to `AgentResponseUpdate`
5. Remove `await foreach` for non-streaming calls
6. Access message content directly from result object instead of iterating
</api_changes>
Expand Down Expand Up @@ -661,7 +661,7 @@ await foreach (var result in agent.InvokeAsync(input, thread, options))
```csharp
ChatClientAgentRunOptions options = new(new ChatOptions { MaxOutputTokens = 1000 });

AgentRunResponse result = await agent.RunAsync(input, thread, options);
AgentResponse result = await agent.RunAsync(input, thread, options);
Console.WriteLine(result);

// Access underlying content when needed:
Expand Down Expand Up @@ -689,7 +689,7 @@ await foreach (var result in agent.InvokeAsync(input, thread, options))

**With this Agent Framework non-streaming usage pattern:**
```csharp
AgentRunResponse result = await agent.RunAsync(input, thread, options);
AgentResponse result = await agent.RunAsync(input, thread, options);
Console.WriteLine($"Tokens: {result.Usage.TotalTokenCount}");
```

Expand All @@ -709,7 +709,7 @@ await foreach (StreamingChatMessageContent response in agent.InvokeStreamingAsyn

**With this Agent Framework streaming usage pattern:**
```csharp
await foreach (AgentRunResponseUpdate update in agent.RunStreamingAsync(input, thread, options))
await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(input, thread, options))
{
if (update.Contents.OfType<UsageContent>().FirstOrDefault() is { } usageContent)
{
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/merge-gatekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
timeout: 3600
interval: 30
ignored: CodeQL
2 changes: 1 addition & 1 deletion .github/workflows/python-merge-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
id: azure-functions-setup
- name: Test with pytest
timeout-minutes: 10
run: uv run poe all-tests -n logical --dist loadfile --dist worksteal --timeout 300 --retries 3 --retry-delay 10
run: uv run poe all-tests -n logical --dist loadfile --dist worksteal --timeout 600 --retries 3 --retry-delay 10
working-directory: ./python
- name: Test core samples
timeout-minutes: 10
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ agents.md
WARP.md
**/memory-bank/
**/projectBrief.md
**/tmpclaude*

# Azurite storage emulator files
*/__azurite_db_blob__.json*
Expand All @@ -227,3 +228,4 @@ local.settings.json

# Database files
*.db
python/dotnet-ref
36 changes: 18 additions & 18 deletions docs/decisions/0001-agent-run-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ foreach (var update in response.Messages)
### Option 2 Run: Container with Primary and Secondary Properties, RunStreaming: Stream of Primary + Secondary

Run returns a new response type that has separate properties for the Primary Content and the Secondary Updates leading up to it.
The Primary content is available in the `AgentRunResponse.Messages` property while Secondary updates are in a new `AgentRunResponse.Updates` property.
`AgentRunResponse.Text` returns the Primary content text.
The Primary content is available in the `AgentResponse.Messages` property while Secondary updates are in a new `AgentResponse.Updates` property.
`AgentResponse.Text` returns the Primary content text.

Since streaming would still need to return an `IAsyncEnumerable` of updates, the design would differ from non-streaming.
With non-streaming Primary and Secondary content is split into separate lists, while with streaming it's combined in one stream.
Expand Down Expand Up @@ -232,24 +232,24 @@ await foreach (var update in responses)
```csharp
class Agent
{
public abstract Task<AgentRunResponse> RunAsync(
public abstract Task<AgentResponse> RunAsync(
IReadOnlyCollection<ChatMessage> messages,
AgentThread? thread = null,
AgentRunOptions? options = null,
CancellationToken cancellationToken = default);

public abstract IAsyncEnumerable<AgentRunResponseUpdate> RunStreamingAsync(
public abstract IAsyncEnumerable<AgentResponseUpdate> RunStreamingAsync(
IReadOnlyCollection<ChatMessage> messages,
AgentThread? thread = null,
AgentRunOptions? options = null,
CancellationToken cancellationToken = default);
}

class AgentRunResponse : ChatResponse
class AgentResponse : ChatResponse
{
}

public class AgentRunResponseUpdate : ChatResponseUpdate
public class AgentResponseUpdate : ChatResponseUpdate
{
}
```
Expand All @@ -265,20 +265,20 @@ The new types could also exclude properties that make less sense for agents, lik
```csharp
class Agent
{
public abstract Task<AgentRunResponse> RunAsync(
public abstract Task<AgentResponse> RunAsync(
IReadOnlyCollection<ChatMessage> messages,
AgentThread? thread = null,
AgentRunOptions? options = null,
CancellationToken cancellationToken = default);

public abstract IAsyncEnumerable<AgentRunResponseUpdate> RunStreamingAsync(
public abstract IAsyncEnumerable<AgentResponseUpdate> RunStreamingAsync(
IReadOnlyCollection<ChatMessage> messages,
AgentThread? thread = null,
AgentRunOptions? options = null,
CancellationToken cancellationToken = default);
}

class AgentRunResponse // Compare with ChatResponse
class AgentResponse // Compare with ChatResponse
{
public string Text { get; } // Aggregation of TextContent from messages.

Expand All @@ -294,12 +294,12 @@ class AgentRunResponse // Compare with ChatResponse
public AdditionalPropertiesDictionary? AdditionalProperties { get; set; }
}

// Not Included in AgentRunResponse compared to ChatResponse
// Not Included in AgentResponse compared to ChatResponse
public ChatFinishReason? FinishReason { get; set; }
public string? ConversationId { get; set; }
public string? ModelId { get; set; }

public class AgentRunResponseUpdate // Compare with ChatResponseUpdate
public class AgentResponseUpdate // Compare with ChatResponseUpdate
{
public string Text { get; } // Aggregation of TextContent from Contents.

Expand All @@ -317,7 +317,7 @@ public class AgentRunResponseUpdate // Compare with ChatResponseUpdate
public AdditionalPropertiesDictionary? AdditionalProperties { get; set; }
}

// Not Included in AgentRunResponseUpdate compared to ChatResponseUpdate
// Not Included in AgentResponseUpdate compared to ChatResponseUpdate
public ChatFinishReason? FinishReason { get; set; }
public string? ConversationId { get; set; }
public string? ModelId { get; set; }
Expand Down Expand Up @@ -360,15 +360,15 @@ public class ChatFinishReason
### Option 2: Add another property on responses for AgentRun

```csharp
class AgentRunResponse
class AgentResponse
{
...
public AgentRun RunReference { get; set; } // Reference to long running process
...
}


public class AgentRunResponseUpdate
public class AgentResponseUpdate
{
...
public AgentRun RunReference { get; set; } // Reference to long running process
Expand Down Expand Up @@ -424,7 +424,7 @@ Note that where an agent doesn't support structured output, it may also be possi
See [Structured Outputs Support](#structured-outputs-support) for a comparison on what other agent frameworks and protocols support.

To support a good user experience for structured outputs, I'm proposing that we follow the pattern used by MEAI.
We would add a generic version of `AgentRunResponse<T>`, that allows us to get the agent result already deserialized into our preferred type.
We would add a generic version of `AgentResponse<T>`, that allows us to get the agent result already deserialized into our preferred type.
This would be coupled with generic overload extension methods for Run that automatically builds a schema from the supplied type and updates
the run options.

Expand All @@ -438,14 +438,14 @@ class Movie
public int ReleaseYear { get; set; }
}

AgentRunResponse<Movie[]> response = agent.RunAsync<Movie[]>("What are the top 3 children's movies of the 80s.");
AgentResponse<Movie[]> response = agent.RunAsync<Movie[]>("What are the top 3 children's movies of the 80s.");
Movie[] movies = response.Result
```

If we only support requesting a schema at agent creation time or where an agent has a built in schema, the following would be the preferred approach:

```csharp
AgentRunResponse response = agent.RunAsync("What are the top 3 children's movies of the 80s.");
AgentResponse response = agent.RunAsync("What are the top 3 children's movies of the 80s.");
Movie[] movies = response.TryParseStructuredOutput<Movie[]>();
```

Expand All @@ -463,7 +463,7 @@ Option 2 chosen so that we can vary Agent responses independently of Chat Client
### StructuredOutputs Decision

We will not support structured output per run request, but individual agents are free to allow this on the concrete implementation or at construction time.
We will however add support for easily extracting a structured output type from the `AgentRunResponse`.
We will however add support for easily extracting a structured output type from the `AgentResponse`.

## Addendum 1: AIContext Derived Types for different response types / Gap Analysis (Work in progress)

Expand Down
2 changes: 1 addition & 1 deletion docs/decisions/0005-python-naming-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The table below represents the majority of the naming changes discussed in issue
| *Mcp* & *Http* | *MCP* & *HTTP* | accepted | Acronyms should be uppercased in class names, according to PEP 8. | None |
| `agent.run_streaming` | `agent.run_stream` | accepted | Shorter and more closely aligns with AutoGen and Semantic Kernel names for the same methods. | None |
| `workflow.run_streaming` | `workflow.run_stream` | accepted | In sync with `agent.run_stream` and shorter and more closely aligns with AutoGen and Semantic Kernel names for the same methods. | None |
| AgentRunResponse & AgentRunResponseUpdate | AgentResponse & AgentResponseUpdate | rejected | Rejected, because it is the response to a run invocation and AgentResponse is too generic. | None |
| AgentResponse & AgentResponseUpdate | AgentResponse & AgentResponseUpdate | rejected | Rejected, because it is the response to a run invocation and AgentResponse is too generic. | None |
| *Content | * | rejected | Rejected other content type renames (removing `Content` suffix) because it would reduce clarity and discoverability. | Item was also considered, but rejected as it is very similar to Content, but would be inconsistent with dotnet. |
| ChatResponse & ChatResponseUpdate | Response & ResponseUpdate | rejected | Rejected, because Response is too generic. | None |

Expand Down
12 changes: 6 additions & 6 deletions docs/decisions/0006-userapproval.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ while (response.ApprovalRequests.Count > 0)
response = await agent.RunAsync(messages, thread);
}

class AgentRunResponse
class AgentResponse
{
...

// A new property on AgentRunResponse to aggregate the ApprovalRequestContent items from
// A new property on AgentResponse to aggregate the ApprovalRequestContent items from
// the response messages (Similar to the Text property).
public IEnumerable<ApprovalRequestContent> ApprovalRequests { get; set; }

Expand Down Expand Up @@ -251,11 +251,11 @@ while (response.UserInputRequests.Any())
response = await agent.RunAsync(messages, thread);
}

class AgentRunResponse
class AgentResponse
{
...

// A new property on AgentRunResponse to aggregate the UserInputRequestContent items from
// A new property on AgentResponse to aggregate the UserInputRequestContent items from
// the response messages (Similar to the Text property).
public IReadOnlyList<UserInputRequestContent> UserInputRequests { get; set; }

Expand Down Expand Up @@ -366,11 +366,11 @@ while (response.UserInputRequests.Any())
response = await agent.RunAsync(messages, thread);
}

class AgentRunResponse
class AgentResponse
{
...

// A new property on AgentRunResponse to aggregate the UserInputRequestContent items from
// A new property on AgentResponse to aggregate the UserInputRequestContent items from
// the response messages (Similar to the Text property).
public IEnumerable<UserInputRequestContent> UserInputRequests { get; set; }

Expand Down
16 changes: 8 additions & 8 deletions docs/decisions/0007-agent-filtering-middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class AIAgent
}
}

public async Task<AgentRunResponse> RunAsync(
public async Task<AgentResponse> RunAsync(
IReadOnlyCollection<ChatMessage> messages,
AgentThread? thread = null,
AgentRunOptions? options = null,
Expand All @@ -135,7 +135,7 @@ public class AIAgent
return context.Response ?? throw new InvalidOperationException("Agent execution did not produce a response");
}

protected abstract Task<AgentRunResponse> ExecuteCoreLogicAsync(
protected abstract Task<AgentResponse> ExecuteCoreLogicAsync(
IReadOnlyCollection<ChatMessage> messages,
AgentThread? thread,
AgentRunOptions? options,
Expand Down Expand Up @@ -190,7 +190,7 @@ internal sealed class GuardrailCallbackAgent : DelegatingAIAgent

public GuardrailCallbackAgent(AIAgent innerAgent) : base(innerAgent) { }

public override async Task<AgentRunResponse> RunAsync(IEnumerable<ChatMessage> messages, AgentThread? thread = null, AgentRunOptions? options = null, CancellationToken cancellationToken = default)
public override async Task<AgentResponse> RunAsync(IEnumerable<ChatMessage> messages, AgentThread? thread = null, AgentRunOptions? options = null, CancellationToken cancellationToken = default)
{
var filteredMessages = this.FilterMessages(messages);
Console.WriteLine($"Guardrail Middleware - Filtered messages: {new ChatResponse(filteredMessages).Text}");
Expand All @@ -202,14 +202,14 @@ internal sealed class GuardrailCallbackAgent : DelegatingAIAgent
return response;
}

public override async IAsyncEnumerable<AgentRunResponseUpdate> RunStreamingAsync(IEnumerable<ChatMessage> messages, AgentThread? thread = null, AgentRunOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default)
public override async IAsyncEnumerable<AgentResponseUpdate> RunStreamingAsync(IEnumerable<ChatMessage> messages, AgentThread? thread = null, AgentRunOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default)
{
var filteredMessages = this.FilterMessages(messages);
await foreach (var update in this.InnerAgent.RunStreamingAsync(filteredMessages, thread, options, cancellationToken))
{
if (update.Text != null)
{
yield return new AgentRunResponseUpdate(update.Role, this.FilterContent(update.Text));
yield return new AgentResponseUpdate(update.Role, this.FilterContent(update.Text));
}
else
{
Expand Down Expand Up @@ -252,7 +252,7 @@ internal sealed class RunningCallbackHandlerAgent : DelegatingAIAgent
this._func = func;
}

public override async Task<AgentRunResponse> RunAsync(IEnumerable<ChatMessage> messages, AgentThread? thread = null, AgentRunOptions? options = null, CancellationToken cancellationToken = default)
public override async Task<AgentResponse> RunAsync(IEnumerable<ChatMessage> messages, AgentThread? thread = null, AgentRunOptions? options = null, CancellationToken cancellationToken = default)
{
var context = new AgentInvokeCallbackContext(this, messages, thread, options, isStreaming: false, cancellationToken);

Expand Down Expand Up @@ -469,7 +469,7 @@ public sealed class CallbackEnabledAgent : DelegatingAIAgent
this._callbacksProcessor = callbackMiddlewareProcessor ?? new();
}

public override async Task<AgentRunResponse> RunAsync(
public override async Task<AgentResponse> RunAsync(
IEnumerable<ChatMessage> messages,
AgentThread? thread = null,
AgentRunOptions? options = null,
Expand Down Expand Up @@ -541,7 +541,7 @@ public abstract class AgentContext
public class AgentRunContext : AgentContext
{
public IList<ChatMessage> Messages { get; set; }
public AgentRunResponse? Response { get; set; }
public AgentResponse? Response { get; set; }
public AgentThread? Thread { get; }

public AgentRunContext(AIAgent agent, IList<ChatMessage> messages, AgentThread? thread, AgentRunOptions? options)
Expand Down
Loading
Loading