Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/agent-framework
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: python-1.1.1
Choose a base ref
...
head repository: microsoft/agent-framework
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: python-1.2.0
Choose a head ref
  • 19 commits
  • 144 files changed
  • 16 contributors

Commits on Apr 23, 2026

  1. Python: (chore): update changelog (#5438)

    * update changelog
    
    * Update python/CHANGELOG.md
    
    Co-authored-by: Copilot <[email protected]>
    
    * Update python/CHANGELOG.md
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    moonbox3 and Copilot authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    9ca55dc View commit details
    Browse the repository at this point in the history
  2. Automated issue triage workflow (#5419)

    * Automated issue triage workflow
    
    * Bump dependencies
    
    * Fix issue-triage workflow: security, reliability, and testability
    
    Address six review comments on the issue-triage workflow:
    
    1. Change trigger from issues:opened to issues:labeled so the
       secret-backed triage flow is only triggered by a maintainer-
       controlled signal.
    
    2. Include inputs.issue_number in the concurrency group so
       workflow_dispatch runs for the same issue are properly
       de-duplicated.
    
    3. Improve team membership error handling to fail closed: verify
       the team exists before checking membership, and only treat a
       404 as 'not a member' (all other errors fail the job).
    
    4. Use optional chaining (issue.user?.login) for the API-fetched
       issue to handle deleted GitHub accounts without crashing.
    
    5. Extract the inline github-script into a testable module at
       .github/scripts/check_team_membership.js with 10 tests in
       .github/tests/test_check_team_membership.js covering all
       code paths (payload/API author resolution, deleted accounts,
       team lookup failure, 404 vs non-404 membership errors).
    
    6. Make the spam gate actually stop the job by exiting non-zero
       instead of just logging, so future steps cannot accidentally
       run for spam issues.
    
    Co-authored-by: Copilot <[email protected]>
    
    * Make issue-triage workflow manually triggered only for initial testing
    
    Remove the 'issues' event trigger, keeping only 'workflow_dispatch' so the
    workflow can be tested manually before enabling automatic triggers.
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    3 people authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    c9e6033 View commit details
    Browse the repository at this point in the history
  3. Propagate integration-test model credentials to issue-triage repro (#…

    …5443)
    
    Scopes the triage job to the integration GitHub Environment, adds
    the azure/login OIDC step, and exposes the same OpenAI / Azure
    OpenAI / Foundry / Anthropic env vars the integration test
    workflow uses. This lets the triage agent write repro code that
    constructs model clients from the environment without any secrets
    entering the agent prompt or generated-code literals.
    
    Azure OpenAI and Foundry continue to authenticate via AAD
    (DefaultAzureCredential), so there is no API key to leak for
    those providers.
    moonbox3 authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    fbbc2eb View commit details
    Browse the repository at this point in the history
  4. .NET: Update Aspire package to be preview (#5444)

    * Update Aspire package to be preview
    
    * Also update readme file
    
    * Include README.md in pack
    westey-m authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    dfca81f View commit details
    Browse the repository at this point in the history
  5. .NET: Add dynamic tool expansion sample (#5425)

    * Add dynamic tool expansion sample
    
    * Address PR comments
    
    * Remove tool names from tool call response to avoid confusing LLM
    westey-m authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    6851a9c View commit details
    Browse the repository at this point in the history
  6. .NET: Fix off-thread RunStatus race where GetStatusAsync can return R…

    …unning after ResumeAsync halts (#5412)
    
    * Fix off-thread RunStatus race where GetStatusAsync can return Running after ResumeAsync halts
    
    * Apply suggestion from @Copilot
    
    Co-authored-by: Copilot <[email protected]>
    
    * Simplify test comment.
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    peibekwe and Copilot authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    69adf6d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4d3e4f8 View commit details
    Browse the repository at this point in the history
  8. .NET: Add streaming support to A2A agent handler (#5427)

    * update a2a agent to the latest a2a sdk (#5257)
    
    * Move A2A samples from 04-hosting to 02-agents (#5267)
    
    Move the A2A sample projects (A2AAgent_AsFunctionTools and
    A2AAgent_PollingForTaskCompletion) from samples/04-hosting/A2A/ to
    samples/02-agents/A2A/ to better align with the sample directory
    structure. Update solution file and samples README accordingly.
    
    Co-authored-by: Copilot <[email protected]>
    
    * .NET: Fix stream reconnection for A2AAgent (#5275)
    
    * Add SSE stream reconnection support to A2AAgent
    
    Implement automatic reconnection for SSE streams that disconnect mid-task,
    using the Last-Event-ID header to resume from where the stream left off.
    
    Changes:
    - Add InvokeStreamingWithReconnectAsync method to A2AAgent with configurable
      max retries and delay between attempts
    - Add new log messages for reconnection events
    - Add A2AAgent_StreamReconnection sample demonstrating the feature
    - Update existing polling sample to use simplified SendMessageAsync API
    - Add unit tests for stream reconnection logic
    
    Co-authored-by: Copilot <[email protected]>
    
    * address comments
    
    * Address PR review feedback
    
    - Dispose SSE enumerator before GetTaskAsync fallback to release HTTP connection
    - Wrap StreamWriter in using blocks with leaveOpen:true and explicit UTF-8 encoding
    - Print update.Text instead of update object in stream reconnection sample
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    
    * .NET: Use IA2AClientFactory to create A2AClient (#5277)
    
    * Refactor A2A extensions to use IA2AClientFactory and add ProtocolSelection sample
    
    - Update A2AAgentCardExtensions to accept IA2AClientFactory instead of A2AClientOptions
    - Update A2ACardResolverExtensions to accept IA2AClientFactory
    - Update A2AClientExtensions to accept IA2AClientFactory
    - Update A2AAgent to use IA2AClientFactory for client creation
    - Add A2AAgent_ProtocolSelection sample demonstrating protocol selection
    - Add comprehensive unit tests for all changes
    - Update README files with new sample reference
    
    Co-authored-by: Copilot <[email protected]>
    
    * Reorder params: options before loggerFactory in A2A extensions
    
    Move A2AClientOptions parameter before ILoggerFactory in AsAIAgent
    and GetAIAgentAsync extension methods to follow the repo convention
    of keeping LoggerFactory and CancellationToken as the last parameters.
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    
    * .NET: Migrate A2A hosting to A2A SDK v1 (#5363)
    
    * .NET: Migrate A2A hosting to A2A SDK v1
    
    Co-authored-by: Copilot <[email protected]>
    
    * remove unused agent card
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    
    * .NET: Split A2A endpoint mapping into protocol-specific methods (#5413)
    
    * .NET: Refactor A2A hosting registration into A2AServerServiceCollectionExtensions
    
    - Rename A2AHostingOptions to A2AServerRegistrationOptions
    - Move server registration logic from A2AEndpointRouteBuilderExtensions
      and AIAgentExtensions into new A2AServerServiceCollectionExtensions
    - Remove A2AProtocolBinding and AIAgentExtensions (consolidated)
    - Update samples and tests to use the new registration API
    
    Co-authored-by: Copilot <[email protected]>
    
    * address copilot comments
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    
    * Remove unnecessary using directive in AgentWebChat.AgentHost
    
    Co-authored-by: Copilot <[email protected]>
    
    * restore AsyncEnumerable package version
    
    * address copilot initial feedback
    
    * address automated code review and formatting issues
    
    * fix formatting issues
    
    * Add streaming support to A2A agent handler
    
    Add HandleNewMessageStreamingAsync to A2AAgentHandler that routes
    StreamingResponse requests through RunStreamingAsync, enqueuing an A2A
    Message for each AgentResponseUpdate.
    
    Add MessageConverter.ToParts(AgentResponseUpdate) extension to convert
    streaming update contents to A2A Parts with unsupported-content filtering.
    
    Add CreateMessageFromUpdate to map AgentResponseUpdate to A2A Message.
    
    Add 16 new tests covering the streaming path and converter.
    
    Co-authored-by: Copilot <[email protected]>
    
    * Add streaming edge-case tests for A2AAgentHandler
    
    Add two tests covering gaps in the streaming path:
    
    - ExecuteAsync_Streaming_WhenNoUpdates_EnqueuesNoMessagesAndSavesSessionAsync:
      Verifies that when RunStreamingAsync yields an empty async enumerable,
      no messages are enqueued and only SaveSessionAsync runs.
    
    - ExecuteAsync_Streaming_CancellationTokenIsPropagatedToRunStreamingAsyncAsync:
      Verifies that the CancellationToken from ExecuteAsync is propagated
      through to the inner agent's RunCoreStreamingAsync call.
    
    Co-authored-by: Copilot <[email protected]>
    
    * address copilot comments
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    SergeyMenshykh and Copilot authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    0dbcc9f View commit details
    Browse the repository at this point in the history
  9. .NET: dotnet: Add server-side Foundry Toolbox support and fix SDK bet…

    …a.4 br… (#5450)
    
    * dotnet: Add server-side Foundry Toolbox support and fix SDK beta.4 breaking changes
    
    Add FoundryToolbox and AIProjectClient extensions to Microsoft.Agents.AI.Foundry.Hosting
    for server-side toolbox tool integration matching Python's FoundryChatClient.get_toolbox()
    pattern. Tools are fetched from the Foundry project SDK and passed as server-side tools
    in the Responses API request.
    
    New files:
    - FoundryToolbox.cs: Core implementation using AgentAdministrationClient SDK
    - AIProjectClientToolboxExtensions.cs: Extension methods on AIProjectClient
    - Agent_Step25_ToolboxServerSideTools sample with create helper and combine flow
    - 19 unit tests covering param validation, conversion, sanitization, and extensions
    
    SDK breaking changes (Azure.AI.AgentServer.Responses beta.3 -> beta.4):
    - FunctionToolCallOutputResource renamed to OutputItemFunctionToolCallOutput
    - AzureAIAgentServerResponsesModelFactory made internal, replaced with direct constructors
    - ResponseUsage constructor now requires non-null token details parameters
    
    Co-authored-by: Copilot <[email protected]>
    
    * fix: reuse endpoint variable in CreateSampleToolboxAsync
    
    Co-authored-by: Copilot <[email protected]>
    
    * fix: pass endpoint through static local functions to avoid capture
    
    Static local functions cannot capture top-level variables. Thread the
    endpoint parameter through Main, CombineToolboxes, and CreateSampleToolboxAsync.
    
    Co-authored-by: Copilot <[email protected]>
    
    * refactor: remove unused projectClient param from CreateSampleToolboxAsync
    
    Co-authored-by: Copilot <[email protected]>
    
    * Update dotnet/samples/02-agents/AgentsWithFoundry/Agent_Step25_ToolboxServerSideTools/README.md
    
    Co-authored-by: Copilot <[email protected]>
    
    * Update dotnet/samples/02-agents/AgentsWithFoundry/Agent_Step25_ToolboxServerSideTools/Program.cs
    
    Co-authored-by: westey <[email protected]>
    
    * Update dotnet/samples/02-agents/AgentsWithFoundry/Agent_Step25_ToolboxServerSideTools/Program.cs
    
    Co-authored-by: westey <[email protected]>
    
    * Removing GetToolbocVersion.
    
    * Removing tests for GetToolboxVersion
    
    * fix: map cached/reasoning token counts in ConvertUsage instead of hardcoding zeros
    
    Extract InputTokenDetails.CachedTokenCount and OutputTokenDetails.ReasoningTokenCount
    from UsageDetails.AdditionalCounts, matching the pattern in AgentResponseExtensions.
    Also accumulate detail counts when merging with existing usage.
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: alliscode <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: westey <[email protected]>
    5 people authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    5fe8941 View commit details
    Browse the repository at this point in the history
  10. Python: (foundry): stop emitting [TOOLBOXES] warning for every Foundr…

    …yChatClient call (#5440)
    
    * Python: Foundry: make response tool sanitizer internal, drop TOOLBOXES warning
    
    sanitize_foundry_response_tool runs on every tool passed to the Foundry
    Responses API, so its @experimental(TOOLBOXES) decorator was emitting a
    [TOOLBOXES] ExperimentalWarning for any FoundryChatClient call, even when
    no toolbox was involved. The function isn't in __all__ and has no external
    callers. Rename to _sanitize_foundry_response_tool and drop the decorator;
    the actual toolbox-facing public helpers remain gated.
    
    * Python: Foundry: silence pyright on intentional cross-module private import
    moonbox3 authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    b084d04 View commit details
    Browse the repository at this point in the history
  11. Python: Fix user agent prefix (#5455)

    * Fix hosting user agent missing
    
    * Fix other providers
    
    * Add more tests
    
    * comments
    
    * Fix tests
    TaoChenOSU authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    0989e68 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2026

  1. Python: Fix AG-UI reasoning role and multimodal media parsing to foll…

    …ow specification (#5389)
    
    * Fix AG-UI reasoning role and multimodal media value field parsing
    
    Fix two spec compliance issues in the AG-UI integration:
    
    1. ReasoningMessageStartEvent now uses role='reasoning' instead of
       role='assistant', matching the AG-UI specification for reasoning
       messages.
    
    2. _parse_multimodal_media_part now reads the 'value' field from source
       dicts (with fallback to 'data' for backward compatibility), matching
       the current AG-UI InputContentSource specification.
    
    Bump ag-ui-protocol dependency from ==0.1.13 to >=0.1.16,<0.2 to pick
    up the SDK fix that accepts role='reasoning' in ReasoningMessageStartEvent.
    
    Fix pre-existing pyright reportMissingImports errors for orjson in sample
    files, and fix import ordering in foundry-hosted-agents sample.
    
    Fixes #5340
    
    Co-authored-by: Copilot <[email protected]>
    
    * Python: Fix AG-UI reasoning role and multimodal media parsing to follow specification
    
    Fixes #5340
    
    * Remove unintended .maf-runtime-ready marker file
    
    Address PR review feedback: the .maf-runtime-ready file is not referenced anywhere in the repo and was left over from automation.
    
    Fixes #5340
    
    * Python: Fix duplicate AG-UI multimodal 'value' parsing in snapshot path
    
    The snapshot normalization path used a second copy of the multimodal source
    parsing logic that still read the deprecated 'data' field. When clients sent
    base64 media with source={"type": "base64", "value": ...}, the snapshot event
    emitted by the server dropped the payload, causing AG-UI-compatible clients
    to crash on ingest.
    
    Extract the shared source-field extraction into _extract_multimodal_source_fields
    so both _parse_multimodal_media_part and the snapshot _legacy_binary_part stay
    in sync with the AG-UI spec. Add snapshot-path regression tests covering
    value-only, value-preferred-over-data, and the legacy data-field fallback.
    
    Addresses review feedback on #5389 from @Rickyneer.
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    3 people authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    932cedd View commit details
    Browse the repository at this point in the history
  2. Python: Upgrade hosting server dependency and add more type support (#…

    …5459)
    
    * Upgrade hosting server dependency and add more type support
    
    * Comments
    TaoChenOSU authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    4adfd24 View commit details
    Browse the repository at this point in the history
  3. Python: feat: Add Agent Framework to A2A bridge support (#2403)

    * feat: Add Agent Framework to A2A bridge support
    
    - Implement A2A event adapter for converting agent messages to A2A protocol
    - Add A2A execution context for managing agent execution state
    - Implement A2A executor for running agents in A2A environment
    - Add comprehensive unit tests for event adapter, execution context, and executor
    - Update agent framework core A2A module exports and type stubs
    - Integrate thread management utilities for async execution
    - Add getting started sample for A2A agent framework integration
    - Update dependencies in uv.lock
    
    This integration enables agent framework agents to communicate and execute within the A2A (Agent to Agent) infrastructure.
    
    * fix: Update references from agent_thread_storage to _agent_thread_storage in A2A executor tests
    
    * Refactor A2A agent framework and improve code structure
    
    - Reordered imports in various files for consistency and clarity.
    - Updated `__all__` definitions to maintain a consistent order across modules.
    - Simplified method signatures by removing unnecessary line breaks.
    - Enhanced readability by adjusting formatting in several sections.
    - Removed redundant comments and example scenarios in the execution context.
    - Improved handling of agent messages in the event adapter.
    - Added type hints for better clarity and type checking.
    - Cleaned up test cases for better organization and readability.
    
    * fix: Lint fix new line added
    
    * test: Add unit tests for AgentThreadStorage and InMemoryAgentThreadStorage
    
    * refactor: Update type hints to use new syntax for Union and List
    
    * fix: Validate RequestContext for context_id and message before execution
    
    * Refactor tests and remove A2aExecutionContext references
    
    - Deleted the test file for A2aExecutionContext as it is no longer needed.
    - Updated A2aExecutor tests to remove dependencies on A2aExecutionContext and adjusted method calls accordingly.
    - Modified event adapter tests to use ChatMessage instead of AgentRunResponseUpdate.
    - Removed A2aExecutionContext from imports in agent_framework.a2a module and updated type hints accordingly.
    
    * Refactor A2AExecutor tests and remove event adapter
    
    - Updated test cases to use A2AExecutor instead of A2aExecutor for consistency.
    - Removed mock_event_adapter fixture and related tests as A2aEventAdapter is deprecated.
    - Consolidated event handling tests into TestA2AExecutorEventAdapter.
    - Adjusted imports in various files to reflect the removal of deprecated components.
    - Ensured all references to A2aExecutor are updated to A2AExecutor across the codebase.
    
    * refactor: Remove AgentThreadStorage and InMemoryAgentThreadStorage classes from threads and tests
    
    * feat: A2AExecutor to have its own override able save and get threads methods for persistent storage.
    
    * fix: linter bugs
    
    * removed unnecessary changes form core package
    
    * new line added
    
    * Refactor A2AExecutor tests and update imports
    
    - Consolidated mock agent fixtures in test_a2a_executor.py to simplify agent mocking.
    - Removed redundant tests related to thread storage and agent types, focusing on A2AExecutor's core functionality.
    - Updated test assertions to reflect changes in message handling with new Message and Content classes.
    - Enhanced integration tests to ensure compatibility with the new agent framework structure.
    - Added A2AExecutor to the module exports in __init__.py and __init__.pyi for better accessibility.
    
    * Update A2A documentation: enhance usage examples for A2AAgent and A2AExecutor
    
    * Updated uv lock
    
    * Fix metadata assertion in TestA2AExecutorHandleEvents and reorder load_dotenv call in agent_framework_to_a2a.py
    
    * Update agent card configuration: add default input and output modes, and fix agent creation method
    
    * Fix assertion for metadata in TestA2AExecutorHandleEvents
    
    * Fix formatting issues in TestA2AExecutorExecute and TestA2AExecutorIntegration
    
    * Enhance A2AExecutor documentation with examples and clarify agent execution process
    
    * Revert uv lock to main
    
    * Refactor A2AExecutor: Improve formatting and streamline constructor parameters
    
    * Apply suggestions from code review
    
    Co-authored-by: Eduard van Valkenburg <[email protected]>
    
    * Refactor A2AExecutor to use SupportsAgentRun and enhance logging; update agent framework sample for flight and hotel booking capabilities
    
    * Enhance A2AExecutor with streaming support and custom run arguments; update tests for initialization and execution scenarios
    
    * Enhance A2AExecutor event handling with streamed artifact tracking; update tests for new behavior
    
    * Refactor A2AExecutor to enforce type hints for stream and run_kwargs attributes
    
    * Refactor A2AExecutor and tests: replace AsyncMock with MagicMock for response stream handling; clean up imports in agent_framework_to_a2a.py
    
    * refactor: streamline imports and improve code readability across multiple files
    
    * feat: enhance A2AExecutor cancel method with context validation and fixed review comments
    
    * feat: implement get_uri_data utility function for extracting base64 data from data URIs and update references
    
    * fix: update import path for get_uri_data utility function in A2AExecutor and A2AAgent
    
    * fix: correct error message handling in A2AExecutor and update test assertions
    
    ---------
    
    Co-authored-by: Eduard van Valkenburg <[email protected]>
    Shubham-Kumar-2000 and eavanvalkenburg authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    b00465d View commit details
    Browse the repository at this point in the history
  4. Python: Add OpenTelemetry integration for GitHubCopilotAgent (#5142)

    * Python: Add OpenTelemetry integration for GitHubCopilotAgent
    
    - Split GitHubCopilotAgent into RawGitHubCopilotAgent (core, no OTel) and
      GitHubCopilotAgent(AgentTelemetryLayer, RawGitHubCopilotAgent) with tracing
    - Add default_options property to expose model for span attributes
    - Export RawGitHubCopilotAgent from all public namespaces
    - Add github_copilot_with_observability.py sample and update README
    
    * Python: Fix OTEL_SERVICE_NAME default in GitHub Copilot README
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
    
    * Python: Add unit tests for RawGitHubCopilotAgent.default_options property
    
    * Python: Address review feedback on GitHubCopilotAgent OTel integration
    
    - Add middleware param to GitHubCopilotAgent.run() overloads so per-call
      middleware is explicitly forwarded through AgentTelemetryLayer
    - Remove github_copilot_with_observability.py sample per feedback; replace
      with inline snippet + link to observability samples in README
    
    * Python: Address review feedback on log_level and session kwargs typing
    
    - Add middleware param to RawGitHubCopilotAgent.run() overloads for interface
      compatibility with AgentTelemetryLayer
    - Fix import in README observability snippet to use agent_framework.github
    
    * Python: Add AgentMiddlewareLayer to GitHubCopilotAgent MRO
    
    Follow FoundryAgent pattern: AgentMiddlewareLayer runs outside the telemetry
    span so middleware execution time is not captured in traces. Overloads removed
    as AgentMiddlewareLayer.run() handles dispatch via MRO.
    
    * Python: Add explicit __init__ to GitHubCopilotAgent for auto-complete and docstrings
    
    * Python: Address review feedback on middleware warning and test assertions
    
    - Add assert "timeout" not in opts to test_default_options_includes_model_for_telemetry
      to document the intentional asymmetry where timeout is extracted into _settings
      and not returned in default_options.
    - Replace silent del middleware with a logged warning when per-run middleware is
      passed to RawGitHubCopilotAgent, making it clear that the GitHub Copilot SDK
      handles tool execution internally and chat/function middleware cannot be injected.
    
    * Python: Use Self for __aenter__ return type in RawGitHubCopilotAgent
    
    Address review feedback: use typing.Self (3.11+) / typing_extensions.Self
    (3.10) for __aenter__ so subclasses like GitHubCopilotAgent get the correct
    return type from async context manager usage.
    
    ---------
    
    Co-authored-by: Claude Sonnet 4.6 <[email protected]>
    droideronline and claude authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    63c0a51 View commit details
    Browse the repository at this point in the history
  5. Python: update FoundryAgent for hosted agent sessions (#5447)

    * fixes to FoundryAgent to connect to new hosted agents
    
    Co-authored-by: Copilot <[email protected]>
    
    * fix mypy
    
    Co-authored-by: Copilot <[email protected]>
    
    * Python: remove Foundry service session helpers
    
    Remove the public hosted-agent service session CRUD helpers from FoundryAgent and drop the related feature-stage inventory entry.
    
    Update the hosted-agent sample to create and delete service sessions directly through the preview AIProjectClient APIs, and tighten a few test harnesses surfaced by full workspace validation.
    
    Co-authored-by: Copilot <[email protected]>
    
    * fix from merge
    
    * fix hosted env detection
    
    Co-authored-by: Copilot <[email protected]>
    
    * reverted sample update
    
    * fix tests and code
    
    Co-authored-by: Copilot <[email protected]>
    
    * remove aenter
    
    * skipping some tests
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    3 people authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    62e02da View commit details
    Browse the repository at this point in the history
  6. Python: (core): Add functional workflow API (#4238)

    * Add functional workflow api
    
    * cleanup
    
    * More cleanup
    
    * address copilot feedback
    
    * Address PR feedbacK
    
    * updates
    
    * PR feedback
    
    * Address review comments on functional workflow samples
    
    - Swap 05/06 get-started samples: agent workflow first (motivates
      why workflows exist), simple text workflow second
    - Rename text_pipeline → text_workflow, poem_pipeline → poem_workflow
    - Add @step to agent workflow sample (05) to demonstrate caching
    - Switch agent samples to AzureOpenAIResponsesClient with Foundry
    - Remove .as_agent() from agent_integration.py to focus on the key
      difference between inline agent calls vs @step-cached calls
    - Add commented-out Agent.run example in hitl_review.py
    - Add clarifying comment in _functional.py that event streaming is
      buffered (not true per-token streaming)
    - Add naive_group_chat.py functional sample: round-robin group chat
      as a plain Python loop
    - Update READMEs to reflect new file names and group chat sample
    
    Co-authored-by: Copilot <[email protected]>
    
    * Fix pyright type errors
    
    * Address PR review comments on functional workflow API
    
    1. Allow request_info inside @step: Auto-inject RunContext into step
       functions that declare a RunContext parameter (by type or name 'ctx'),
       and expose get_run_context() for programmatic access.
    
    2. Handle None responses: Log a warning when a response value is None,
       and document the behavior in request_info docstring.
    
    3. Add executor_bypassed event type: Replace executor_invoked +
       executor_completed with a single executor_bypassed event when a step
       replays from cache, making cached vs live execution explicit.
    
    Co-authored-by: Copilot <[email protected]>
    
    * Add regression tests for PR review comments on functional workflow API
    
    The three review comments (request_info in @step, None response handling,
    executor_bypassed event type) were already addressed in 7da7db4. This
    commit adds cross-cutting regression tests that exercise the interactions
    between these features:
    
    - HITL in step with caching: preceding step bypassed on resume
    - Full checkpoint lifecycle with HITL step (interrupt -> resume -> restore)
    - None response inside step-level request_info logs warning
    - WorkflowInterrupted from step does not emit executor_failed
    
    Co-authored-by: Copilot <[email protected]>
    
    * Address PR #4238 review comments on functional workflow API
    
    Comment 1 (request_info in @step): Already supported. Added comment in
    StepWrapper.__call__ explaining why WorkflowInterrupted (BaseException)
    safely bypasses the except Exception handler.
    
    Comment 2 (None response): Added docstring to _get_response clarifying
    the (found, value) return tuple semantics and None handling.
    
    Comment 3 (bypass event type): executor_bypassed is already a dedicated
    event type in WorkflowEventType. Updated comment at the bypass site to
    make the deliberate event type choice explicit.
    
    Co-authored-by: Copilot <[email protected]>
    
    * Add experimental API warnings to functional workflow module
    
    Mark all public classes and decorators (workflow, step, RunContext,
    FunctionalWorkflow, StepWrapper, FunctionalWorkflowAgent) as
    experimental and subject to change or removal.
    
    * Address PR #4238 review comments from @eavanvalkenburg
    
    - RunContext docstring leads with purpose (opt-in handle for HITL,
      custom events, state) so readers importing it from the public surface
      understand its role before the mechanics (#2993513452).
    - Rename `06_first_functional_workflow.py` to
      `06_functional_workflow_basics.py`; the previous filename was
      confusing since it followed `05_functional_workflow_with_agents.py`
      (#2993531979).
    - Simplify `05_functional_workflow_with_agents.py` to call agents
      directly without a @step wrapper; the step-vs-no-step contrast lives
      in `03-workflows/functional/agent_integration.py`, keeping the
      get-started sample minimal (#2993525532).
    - Switch functional samples to `FoundryChatClient` for consistency with
      the rest of 01-get-started and 03-workflows (follow-up on #2876988570).
    - Use walrus in `hitl_review.py` final-state assertion (#2993572182).
    - Add expected-output block to `basic_streaming_pipeline.py` (#2993557609).
    - Clarify in `parallel_pipeline.py` that `@step` composes with
      `asyncio.gather` (#2993597282).
    - `naive_group_chat.py` threads `list[Message]` between turns instead
      of stringifying the transcript, preserving role/authorship (#2993583231).
    
    Drive-by: pre-commit hook sorts an unrelated import block in
    `samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/main.py`.
    
    * Fix 10 functional-workflow API bugs from /ultrareview pass
    
    - bug_001: `ctx.request_info()` without an explicit `request_id` now derives
      a deterministic `auto::<index>` id from the call-counter, so HITL resume
      works correctly on the documented default path.  A uuid was regenerated on
      every replay, making resume impossible.
    
    - bug_002: `StepWrapper.__call__` no longer deepcopies arguments on the
      cache-hit replay branch.  The copy is only performed on the live-execution
      path (for the event log) and falls back to the original mapping if deepcopy
      fails, so steps whose args aren't deepcopyable (locks, sockets, sessions)
      can still resume from checkpoint.
    
    - bug_007: `_set_responses` now prunes each resolved `request_id` from
      `_pending_requests`, and the cache-hit branch in `request_info` does the
      same.  Previously, answered requests were re-serialized into every
      subsequent checkpoint and the final checkpoint falsely claimed pending
      requests even after the workflow completed.
    
    - bug_008: `_compute_signature_hash` now mixes the function's `co_code` and
      `co_names` into the checkpoint signature, so changes to the workflow body
      invalidate older checkpoints even when steps are accessed via module /
      class attributes (which `_discover_step_names` can't see statically).
      `RunContext._record_observed_step` records observed step names for
      diagnostics.
    
    - bug_010: `FunctionalWorkflow.run()` docstring corrected — says "at least
      one of message/responses/checkpoint_id" and explicitly notes `responses`
      may be combined with `checkpoint_id` (the validator already allowed this).
    
    - bug_013: `FunctionalWorkflowAgent` now surfaces `request_info` events as
      `FunctionApprovalRequestContent` items (mirroring graph `WorkflowAgent`),
      threads `responses=` and `checkpoint_id=` through to the underlying
      workflow, and exposes `pending_requests`.  Previously `.as_agent()`
      returned empty `AgentResponse` for HITL workflows — effectively unusable.
    
    - bug_014: `FunctionalWorkflow` now clears `_last_message`,
      `_last_step_cache`, and `_last_pending_request_ids` on clean completion.
      `run()` validates that `responses=` keys intersect the currently-pending
      request set (or raises with a clear error) instead of silently replaying
      against stale singleton state from a prior run.
    
    - bug_015: `FunctionalWorkflow.as_agent` signature now matches graph
      `Workflow.as_agent`: accepts `name`, `description`, `context_providers`,
      and `**kwargs`.  `FunctionalWorkflowAgent` stores the overrides.
    
    - bug_017: `RunContext.set_state` raises `ValueError` for underscore-
      prefixed keys (the framework's `_step_cache` / `_original_message` keys
      would silently clobber user state on checkpoint save and user
      underscore-prefixed state was dropped on restore).  Docstring documents
      the reserved prefix.
    
    - merged_bug_003: Workflow function arity is validated at decoration time.
      Multiple non-ctx parameters raise `ValueError` immediately (previously
      every arg past the first was silently dropped at call time).  Passing a
      non-None `message` to a ctx-only workflow raises `ValueError` instead of
      silently discarding the message.
    
    Test coverage: +18 regression tests covering every fix.  Full workflow
    suite now 766 passed, 1 skipped, 2 xfailed; full core suite 2338 passed.
    
    * Deslop functional.py fix commit
    
    - Remove dead instrumentation added in the prior commit that was never
      consumed: `RunContext._observed_step_names`,
      `RunContext._record_observed_step`, `FunctionalWorkflow._runtime_step_names`,
      and `FunctionalWorkflowAgent._extra_kwargs`.  The signature hash relies on
      `co_code` alone, which covers the attribute-access case without the
      collection-scaffolding.
    - Trim over-explanatory comments that restated what the code does or what
      it no longer does.  Keep only the comments that answer "why" for the
      non-obvious bits (deterministic id contract, defensive deepcopy, stale
      replay guard).
    - Compress the `_compute_signature_hash` and FunctionalWorkflow `__init__`
      block docstrings without losing the user-facing reasoning.
    
    Net -49 lines.  Regression lock preserved (766 passed, 1 skipped, 2 xfailed).
    
    * Fix functional workflow review feedback
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    3 people authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    da32e8c View commit details
    Browse the repository at this point in the history
  7. Python: Surface oauth_consent_request events from Responses API in …

    …Foundry clients (#5070)
    
    * Fix Foundry clients not surfacing oauth_consent_request events (#5054)
    
    Override _parse_chunk_from_openai in both RawFoundryChatClient and
    RawFoundryAgentChatClient to intercept response.output_item.added
    events with item.type == 'oauth_consent_request'. The consent link
    is validated (HTTPS required) and converted to
    Content.from_oauth_consent_request, which the AG-UI layer already
    knows how to emit as a CUSTOM event.
    
    Co-authored-by: Copilot <[email protected]>
    
    * Address PR review feedback for #5054 OAuth consent parsing
    
    - Extract shared helper (try_parse_oauth_consent_event) to avoid
      duplicated logic between RawFoundryChatClient and
      RawFoundryAgentChatClient
    - Use urllib.parse.urlparse() for HTTPS validation instead of
      case-sensitive startswith check
    - Sanitize log messages to avoid leaking consent_link tokens;
      log only item id
    - Add model=self.model to ChatResponseUpdate to match parent behavior
    - Add assertions on role, raw_representation, and model in happy-path
      tests
    - Add test for empty-string consent_link
    - Add test verifying non-oauth events delegate to super()
    
    Co-authored-by: Copilot <[email protected]>
    
    * Handle response.oauth_consent_requested top-level event (#5054)
    
    Add support for the top-level response.oauth_consent_requested stream
    event in addition to the response.output_item.added variant. The
    service may emit either form; handle both so the consent link is
    reliably surfaced.
    
    Extract _validate_consent_link helper within _oauth_helpers.py to
    reduce nesting.
    
    Co-authored-by: Copilot <[email protected]>
    
    * Address review feedback for #5054: Python: [Bug]: `FoundryAgent` (Responses API) Does Not Surface `oauth_consent_request` as a CUSTOM AG-UI Event
    
    * Address review feedback: defensive getattr and dedicated helper tests (#5054)
    
    - Use getattr(event, 'type', None) in try_parse_oauth_consent_event
      for defensive access against malformed events without a type attribute
    - Add test_oauth_helpers.py with unit tests for _validate_consent_link
      and try_parse_oauth_consent_event covering edge cases:
      - HTTPS URL with empty netloc (https:///path)
      - Warning log messages for rejected consent links
      - Event objects missing 'type' attribute
    
    Co-authored-by: Copilot <[email protected]>
    
    * Address review feedback for #5054: Python: [Bug]: `FoundryAgent` (Responses API) Does Not Surface `oauth_consent_request` as a CUSTOM AG-UI Event
    
    * Fix mypy: match _parse_chunk_from_openai signature with superclass
    
    Add seen_reasoning_delta_item_ids parameter to _parse_chunk_from_openai
    overrides in both RawFoundryChatClient and RawFoundryAgentChatClient to
    match the updated superclass signature on main. Update super() calls and
    test assertions accordingly.
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    Co-authored-by: Evan Mattson <[email protected]>
    4 people authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    7b70f80 View commit details
    Browse the repository at this point in the history
  8. Python: Bump Python package versions for 1.2.0 release (#5468)

    * Bump Python package versions for 1.2.0 release
    
    Released tier bumps 1.1.1 -> 1.2.0 (core, openai, foundry, root) to
    reflect additive public APIs landed since 1.1.0: functional workflow API
    (#4238) and FunctionTool SKIP_PARSING sentinel (#5424). All beta packages
    stamped 1.0.0b260424, alpha packages 1.0.0a260424. All 26 non-core
    agent-framework-core floors raised to >=1.2.0,<2. CHANGELOG consolidates
    the never-tagged 1.1.1 entries with the post-merge additions into [1.2.0].
    
    * Update CHANGELOG footer links for 1.2.0
    
    Advance [Unreleased] comparison base from python-1.1.0 to python-1.2.0
    and add a [1.2.0] reference link comparing python-1.1.0...python-1.2.0
    so the heading links resolve correctly.
    
    * Fix CHANGELOG: restore [1.1.1] section and add proper [1.2.0]
    
    Previous commit incorrectly renamed the [1.1.1] header to [1.2.0], which
    wiped the historical 1.1.1 entries and wrongly attributed them to 1.2.0.
    This restores [1.1.1] to its origin/main content and adds a new [1.2.0]
    section above containing only the commits in python-1.1.1..HEAD:
    
    - #4238 functional workflow API
    - #5142 GitHub Copilot OpenTelemetry
    - #2403 A2A bridge support
    - #5070 oauth_consent_request events in Foundry clients
    - #5447 FoundryAgent hosted agent sessions
    - #5459 hosting server dependency upgrade + types
    - #5389 AG-UI reasoning/multimodal parsing fix
    - #5440 stop [TOOLBOXES] warning spam
    - #5455 user agent prefix fix
    
    Also corrects the [1.2.0] compare base to python-1.1.1 (not 1.1.0) and
    adds the missing [1.1.1] reference link.
    moonbox3 authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    0b69d7f View commit details
    Browse the repository at this point in the history
Loading