Dmytro Struk and GitHub
f87e55ba33
Python: Fixed use_agent_middleware calling private _normalize_messages ( #3264 )
...
* Fix use_agent_middleware calling private _normalize_messages
* Fixed A2A and Copilot Studio agent
2026-01-19 12:50:14 +00:00
Dmytro Struk and GitHub
9bfa1a913c
Python: Fixed Azure chat client for asynchronous filtering ( #3260 )
...
* Fixed Azure chat client for asynchronous filtering
* Updated test
2026-01-19 12:49:23 +00:00
Dmytro Struk and GitHub
b773830e4b
Create/Get Agent API - fixes and example improvements ( #3246 )
2026-01-16 04:36:34 +00:00
Dmytro Struk and GitHub
b5ca0c8eda
Python: Create/Get Agent API for OpenAI Assistants ( #3208 )
...
* Added provider implementation
* Added example with response format
* Small improvements
2026-01-15 22:52:32 +00:00
Dmytro Struk and GitHub
6e9420f614
Updated DurableAIAgent and fixed integration tests ( #3241 )
2026-01-15 21:43:26 +00:00
Evan Mattson and GitHub
ffe2e787ba
Python: fix(core): correct FunctionResultContent ordering in WorkflowAgent.merge_updates ( #3168 )
...
* fix(core): simplify FunctionResultContent ordering in WorkflowAgent.merge_updates
* improve comment
* Fix name
2026-01-15 01:54:44 +00:00
Tao Chen and GitHub
6c956ec596
Python: Add more specific exceptions to Workflow ( #3188 )
...
* Add more specifc workflow exceptions
* Fix tests
* AI comments
* Misc
2026-01-14 20:10:52 +00:00
Eduard van Valkenburg and GitHub
d8cf8361bd
renamed all ( #3207 )
2026-01-14 05:54:07 +00:00
Tao Chen and GitHub
0b152418b6
[BREAKING] Python: Refactor orchestrations ( #3023 )
...
* Group chat refactoring Part 1; Next: HIL and handoff
* Add agent approval flow; next samples
* WIP: samples
* WIP: HIL samples
* Group chat HIL working; next: handoff
* Fix group chat tool approval sample
* WIP: refactor handoff; next handoff handling
* Handoff done; next handoff samples and concurrent and sequential
* Handoff samples, concurrent, and sequential done; next Magentic
* WIP: magentic; next test with samples + HIL
* Magentic Working; next fix all samples and tests
* Fix handoff samples; next tests
* WIP: fixing tests; some orchestration as agent samples are failing
* Group chat unit tests done
* Handoff unit tests done
* Remove old orchestration_request_info and fix related tests
* Magentic unit tests done
* Fix samples
* Fix test
* Fix test 2
* mypy
* Address comments
* Update readme
* Address comments
* Address comments 2
* Replace display name
2026-01-13 18:40:26 +00:00
Eduard van Valkenburg and GitHub
3e97425245
Python: [BREAKING]: Introducing Options as TypedDict and Generic ( #3140 )
...
* WIP typeddict for options
* updated all clients and ChatAgents
* updated everything
* added ADR
* fix mypy
* proper typevar imports
* fixed import
* fixed other imports
* slight update in the sample
* updated from feedback
* fixes
* fixed missing covariants and test fixes
* fixed typing
* updated anthropic thinking config
* ruff fixes
* fixed int tests
* fix tests and mypy
* updated integration tests
* updated docstring and test fix
* improved options handling in obser
* mypy fix
* updated a host of integration tests
* fix tests
* bedrock fix
2026-01-13 16:41:05 +00:00
Evan Mattson and GitHub
9c094573e8
Python: Add declarative workflow runtime ( #2815 )
...
* Further support for declarative python workflows
* Add tests. Clean up for typing and formatting
* Improvements and cleanup
* Typing cleanup. Improve docstrings
* Proper code in docstrings
* Fix malformed code-block directive in docstring
* Remove dead links
* PR feedback
* Address PR feedback
* Address PR feedback
* Remove sl
* Update devui frontend
* More cleanup
* Fix uv lock
* Skip Py 3.14 tests as powerfx doesn't support it
* Fix mypy error
* Fix for tool calls
* Removed stale docstring
* Fix lint
* Standardize on .NET namespaces. Revert DevUI changes (bring in later)
* Implement remaining items for Python declarative support to match dotnet
2026-01-13 07:11:21 +00:00
Eduard van Valkenburg and GitHub
b2893fbc00
Python: MCP Improvements: improved connection loss behavior, pagination for loading and a param to control representation ( #3154 )
...
* pagination support (#2848 ) added a parse_tool_result param and connection loss (#2884 )
* fix #3153
* improved connection handling
* improved logic
2026-01-13 04:09:33 +00:00
Eduard van Valkenburg and GitHub
203fb7b1c4
Python: [BREAKING]: removed display_name, renamed context_providers, middleware and AggregateContextProvider ( #3139 )
...
* removed display_name, renamed context_providers, middleware and AggregateContextProvider
* fixes
* fixed test
* testfix
* removed mistakenly put back test
* updated new test
* rename middlewares to middleware
* middleware fixes
2026-01-13 02:24:07 +00:00
e63c148fc7
Python: Fix MCPStreamableHTTPTool to use new streamable_http_client API ( #3088 )
...
* Fix MCPStreamableHTTPTool to use new streamable_http_client API with proper httpx client cleanup
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Update docstring to reflect new streamable_http_client API usage
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Refactor MCPStreamableHTTPTool to accept optional http_client parameter and delegate client creation to streamable_http_client
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Update mcp package minimum version to 1.24.0 for streamable_http_client API support
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Fix critical bugs: apply headers/timeout/sse_read_timeout when creating httpx client, add version constraint <2, and properly manage client lifecycle
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Simplify implementation: remove headers/timeout/sse_read_timeout params, remove kwargs, remove close() override per feedback
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Add back **kwargs parameter for backward compatibility (accepted but not used)
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Remove unused httpx import from test file
Note: The uv.lock file needs to be updated with 'uv sync' to reflect the mcp version constraint change (>=1.24.0,<2)
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* cicd fixes
* udpated samples with headers examples
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
Co-authored-by: eavanvalkenburg <github@vanvalkenburg.eu >
2026-01-12 17:26:53 +00:00
Evan Mattson and GitHub
d28ad2d7df
Track agent name with updates for workflow agent ( #3146 )
2026-01-09 08:23:32 +00:00
3f7ea350dc
Python: Add tool call/result content types and update connectors and samples ( #2971 )
...
* Add new AI content types and image tool support
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Add Python content types for tool calls/results and image generation tool support
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Address review feedback for tool content and samples
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Tighten image generation typing and sample tools list
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Align image generation output typing
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Handle MCP naming, image options mapping, and connector tool content
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Allow MCP call in function approval request
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Remove raw image_generation tool remapping
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Restore Anthropic tool_use to function calls unless code execution
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Fix lint issues for hosted file docstring and MCP parsing
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Import ChatResponse types in Anthropic client
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Fix Anthropics citation type imports and MCP typing for handoff/tools
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* Skip lightning tests without agentlightning and fix function call import
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
* fix lint on lab package
* rebuilt anthropic parsing
* redid anthropic parsing
* typo
* updated parsing and added missing docstrings
* fix tests
* mypy fixes
* second mypy fix
* add new class to other samples
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
Co-authored-by: eavanvalkenburg <github@vanvalkenburg.eu >
2026-01-08 19:46:32 +00:00
Evan Mattson and GitHub
e9d97ce6b7
Python: fix(azure-ai): Fix response_format handling for structured outputs ( #3114 )
...
* fix(azure-ai): read response_format from chat_options instead of run_options
* refactor: use explicit None checks for response_format
* Fix mypy error
* Mypy fix
2026-01-07 23:11:28 +00:00
claude89757 and GitHub
db283cd396
Python: Fix MCP tool result serialization for list[TextContent] ( #2523 )
...
* Fix MCP tool result serialization for list[TextContent]
When MCP tools return results containing list[TextContent], they were
incorrectly serialized to object repr strings like:
'[<agent_framework._types.TextContent object at 0x...>]'
This fix properly extracts text content from list items by:
1. Checking if items have a 'text' attribute (TextContent)
2. Using model_dump() for items that support it
3. Falling back to str() for other types
4. Joining single items as plain text, multiple items as JSON array
Fixes #2509
* Address PR review feedback for MCP tool result serialization
- Extract serialize_content_result() to shared _utils.py
- Fix logic: use texts[0] instead of join for single item
- Add type annotation: texts: list[str] = []
- Return empty string for empty list instead of '[]'
- Move import json to file top level
- Add comprehensive unit tests for serialization
* Address PR review feedback: fix type checking and double serialization
- Add isinstance(item.text, str) check to ensure text attribute is a string
- Fix double-serialization issue by keeping model_dump results as dicts
until final json.dumps (removes escaped JSON strings in arrays)
- Improve docstring with detailed return value documentation
- Add test for non-string text attribute handling
- Add tests for list type tool results in _events.py path
* Simplify PR: minimal changes to fix MCP tool result serialization
Addresses reviewer feedback about excessive refactoring:
- Reset _events.py to original structure
- Only add import and use serialize_content_result in one location
- All review comments addressed in serialize_content_result():
- Added isinstance(item.text, str) check
- Use model_dump(mode="json") to avoid double-serialization
- Improved docstring with explicit return value documentation
- Empty list returns "" instead of "[]"
* Refactor: Move MCP TextContent serialization to core prepare_function_call_results
Per reviewer feedback, moved the TextContent serialization logic from
ag-ui's serialize_content_result to the core package's
prepare_function_call_results function.
Changes:
- Added handling for objects with 'text' attribute (like MCP TextContent)
in _prepare_function_call_results_as_dumpable
- Removed serialize_content_result from ag-ui/_utils.py
- Updated _events.py and _message_adapters.py to use
prepare_function_call_results from core package
- Updated tests to match the core function's behavior
* Fix failing tests for prepare_function_call_results behavior
- test_tool_result_with_none: Update expected value to 'null' (JSON serialization of None)
- test_tool_result_with_model_dump_objects: Use Pydantic BaseModel instead of plain class
* Fix B903 linter error: Convert MockTextContent to dataclass
The ruff linter was reporting B903 (class could be dataclass or namedtuple)
for the MockTextContent test helper classes. This commit converts them to
dataclasses to satisfy the linter check.
2026-01-07 00:47:26 +00:00
Evan Mattson and GitHub
24c822590f
fix: tool_choice parameter not being honored when passed to agent.run() ( #3095 )
2026-01-06 22:51:20 +00:00
Evan Mattson and GitHub
844d345106
Python: Fix ExecutorInvokedEvent and ExecutorCompletedEvent observability data ( #3090 )
...
* Fix ExecutorInvokedEvent.data mutation bug
* Fix bug related to not yielding output type
2026-01-06 09:12:26 +00:00
Eduard van Valkenburg and GitHub
deea844bc7
fix and extra int test ( #3037 )
2026-01-05 04:35:10 +00:00
Hao Luo and GitHub
defe0f1a89
Python: Added response.created and response.in_progress event process to OpenAIBaseResponseClient ( #2975 )
...
* added response.created and response.in_progress to include response.id
* better doc string
* added tests for the new streaming event types
2025-12-19 17:50:15 +00:00
Evan Mattson and GitHub
e15eab7da6
Python: Bump Py version to 1.0.0b251218 for a release. Update CHANGELOG ( #2968 )
...
* Bump Py version to 1.0.0b251218 for a release. Update CHANGELOG
* update lock
* Fix formatting
* Fix ChatKit typing
2025-12-19 01:31:57 +00:00
Evan Mattson and GitHub
b0a7a1fcb8
Python: Fix WorkflowAgent event handling and kwargs forwarding ( #2946 )
...
* Fix kwargs propagation through workflow.as_agent()
* Fix WorkflowAgent to respect AgentExecutor output_response setting
2025-12-18 19:35:07 +00:00
Eduard van Valkenburg and GitHub
e5c11d38d6
Python: cleanup and refactoring of chat clients ( #2937 )
...
* refactoring and unifying naming schemes of internal methods of chat clients
* set tool_choice to auto
* fix for mypy
* added note on naming and fix #2951
* fix responses
* fixes in azure ai agents client
2025-12-18 12:02:23 +00:00
Evan Mattson and GitHub
360839782c
Pass kwargs into subworkflows ( #2923 )
2025-12-18 04:34:33 +00:00
Ege Ozan Özyedek and GitHub
ee53fe4666
Python: Correction of MCP image type conversion in _mcp.py ( #2901 )
...
* Correction of MCP image type conversion in _mcp.py
* Added a new overload to the init function of the DataContent() type of the Agent Framework, edited the test case to correctly test the usage of the data and uri fields while using DataContent()
* Fixed tests related to the changes of the DataContent type, added testing for both string and byte representations
2025-12-17 16:11:39 +00:00
Evan Mattson and GitHub
06cdcb93f0
Fix Pydantic error when using Literal type for tool params ( #2893 )
2025-12-17 00:27:01 +00:00
Evan Mattson and GitHub
6adcac2e97
Python: Flow custom kwargs to agents via Workflow SharedState ( #2894 )
...
* Flow custom kwargs to agents via SharedState
* Address Copilot feedback
* Improve sample typing
* Fix test
2025-12-17 00:04:00 +00:00
Tao Chen and GitHub
8fca71e5ad
[BREAKING] Python: Add factory pattern to handoff orchestration builder ( #2844 )
...
* WIP: Factory pattern to handoff
* Add factory pattern to concurrent orchestration builder; Next: tests and sample verification
* Add tests and improve comments
* Fix mypy
* Simplify handoff_simple.py
* Simplify handoff_autonoumous.py and bug fix
* Update readme
* Address Copilot comments
2025-12-16 23:38:33 +00:00
Evan Mattson and GitHub
958a488f96
Python: Fix context duplication in handoff workflows when restoring from checkpoint ( #2867 )
...
* Fix context duplication in handoff workflows when restoring from checkpoint
* Address Copilot PR review
2025-12-16 09:52:59 +00:00
Evan Mattson and GitHub
11d6dcfe80
Python: Fix middleware terminate flag to exit function calling loop immediately ( #2868 )
...
* Fix middleware terminate flag to exit function calling loop immediately
* Eliminating duck typing
* Improve function exec result handling
* Fix race condition
* Fix mypy issues
2025-12-16 09:52:52 +00:00
Eduard van Valkenburg and GitHub
3139347526
Python: [BREAKING] Observability updates ( #2782 )
...
* fixes Python: Add env_file_path parameter to setup_observability() similar to AzureOpenAIChatClient
Fixes #2186
* WIP on updates using configure_azure_monitor
* improved setup and clarity
* fixed root .env.example
* revert changes
* updated files
* updated sample
* updated zero code
* test fixes and fixed links
* fix devui
* removed planning docs
* added enable method and updated readme and samples
* clarified docstring
* add return annotation
* updated naming
* update capatilized version
* updated readme and some fixes
* updated decorator name inline with the rest
* feedback from comments addressed
2025-12-16 06:56:30 +00:00
Evan Mattson and GitHub
a7298757f5
Python: Fix WorkflowAgent to emit yield_output as agent response ( #2866 )
...
* Fix WorkflowAgent to emit yield_output as agent response
* use raw_representation
* Raw representation handling
2025-12-16 01:14:26 +00:00
Tao Chen and GitHub
e0ff153ee9
Python: Remove warnings from workflow builder on not using factories ( #2808 )
...
* Revert concurrent
* Fix comments
2025-12-12 07:56:16 +00:00
Evan Mattson and GitHub
0fc7933a92
Fix WorkflowAgent to include thread convo history. Enable checkpointing. ( #2774 )
2025-12-12 04:04:31 +00:00
Dmytro Struk and GitHub
d7434d59ce
Python: Added custom args and thread object to ai_function kwargs ( #2769 )
...
* Added an example of using kwargs in ai_function
* Added thread object to ai_function kwargs
* Updated docs
* Small fix
* Added thread parameter filtering
2025-12-12 01:53:04 +00:00
Eduard van Valkenburg and GitHub
c376868ec9
Python: added more complete parsing for mcp tool arguments ( #2756 )
...
* added more complete parsing for mcp tool arguments
* fixed mypy
* added nonlocal model counter, and some fixes
* fixes in naming logic
* extracted json parsing function, added parametrized test and checked coverage
2025-12-11 17:24:08 +00:00
Evan Mattson and GitHub
3481914981
Capture file IDs from code interpreter in streaming responses ( #2741 )
2025-12-11 07:30:19 +00:00
Tao Chen and GitHub
191779ce80
Python: Add factory pattern to concurrent orchestration builder ( #2738 )
...
* Add factory pattern to concurrent orchestration builder
* Update readme
* Address AI comments
* Fix unit tests
* Fix import
* Prevent multiple calls to set participants or factories
* Add comments
* Mitigate warnings
* Fix mypy
* Address comments
* Address Copilot comments
* Fix tests
2025-12-11 01:23:28 +00:00
Tao Chen and GitHub
523305ac62
Python: Add factory pattern to sequential orchestration builder ( #2710 )
...
* Add factory pattern to sequential orchestration builder
* Use temp list to avoid override
* Add sample and some other fixes
* Fix comments
* Small fix
* Update readme
2025-12-10 18:16:10 +00:00
Evan Mattson and GitHub
b378ca75d1
Python: extend HITL support for all orchestration patterns ( #2620 )
...
* Support HITL for orchestration patterns
* Cleanup around naming
* Fix typing issues
* Clean up
* Naming clean up
* Updates to HITL to make it cleaner
* Rename human input hook to orchestration request info
* Clean up per PR feedback
2025-12-10 15:59:29 +00:00
Giles Odigwe and GitHub
f5f909f2e2
Python: Added Azure OpenAI Responses File Search sample + Integration test update ( #2645 )
...
* added azure responses file search sample + int test update
* sample update to use token credential
2025-12-05 19:01:48 +00:00
Evan Mattson and GitHub
b78a2b6d2e
Python: Support an autonomous handoff flow ( #2497 )
...
* Support an autonomous handoff flow.
* Simplify public API
* Address feedback
2025-12-05 07:13:22 +00:00
Tao Chen and GitHub
f2ed5b55f6
Python: WorkflowBuilder registry ( #2486 )
...
* Add workflow builder factory pattern
* Add internal edge groups to registered executors; next samples
* Update samples: Part 1
* register -> register_executor
* update hil samples
* Update other samples
* Update agent samples
* Update doc string
* Add new sample
* Fix mypy
* Address comments
* Fix mypy
2025-12-05 05:26:10 +00:00
Evan Mattson and GitHub
19ac6e57c0
Python [BREAKING]: support magentic agent tool call approvals and plan stalling HITL behavior ( #2569 )
...
* Provide way for HITL with magentic
* support tool call approvals and hitl stall replan
* human plan intervention sample
* Clean up
* Improve loging
* updates
2025-12-04 05:13:27 +00:00
292a2078fa
Python: Fix: AgentRunResponse.created_at returns local datetime labeled as UTC ( #2590 )
...
* Initial plan
* Fix created_at to use UTC datetime and add unit tests
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com >
* Address code review feedback: move datetime imports to top of test files
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com >
* Add UTC timestamp test for OpenAIResponsesClient._create_response_content
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com >
* Fix lint issue
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com >
Co-authored-by: Evan Mattson <evan.mattson@microsoft.com >
2025-12-04 05:09:52 +00:00
ae06c9e4bb
Add support for Pydantic BaseModel as function call result ( #2606 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com >
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com >
2025-12-04 01:41:47 +00:00
Evan Mattson and GitHub
f7a9005235
Python: Add executor I/O data to ExecutorInvokedEvent and ExecutorCompletedEvent ( #2591 )
...
* Add executor I/O data to ExecutorInvokedEvent and ExecutorCompletedEvent
* Sample cleanup
2025-12-04 01:41:40 +00:00
d774b64df0
Python: added inline yaml sample ( #2582 )
...
* added inline yaml sample
* fixed some typos and added intro comment
* added description params and pass through to client
* add azure assistants
* fix tests
* observabiltiy mypy fix
* for some reason mypy doesn't accept a subclass
---------
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com >
2025-12-04 01:30:56 +00:00