Commit Graph
381 Commits
Author SHA1 Message Date
Tao ChenandGitHub 31701dbb92 [BREAKING] Python: Refactor Checkpointing for runner and runner context (#1645)
* Refactor Checkpointing for runner and runner context

* exception

* Fix formatting

* Comments

* rename

* Add detailed doc string
2025-10-24 03:34:55 +00:00
Evan MattsonandGitHub b66619a544 Python: Add Handoff orchestration pattern support (#1469)
* Add Handoff orchestration pattern support

* PR feedback

* Use AOAI client in samples

* Adjust to tool

* Handoff to sub-agent via ai function

* PR feedback

* More cleanup

* Improvements

* PR feedback cleanup

* Add handoff migration sample.

* Remove type ignore

* fix markdown link formatting

* Remove readme link for non-existent sample
2025-10-22 01:51:51 +00:00
Giles OdigweandGitHub e8a7d3b1b7 Python: Added Samples for HostedCodeInterpreterTool with files (#1583)
* code interpreter with files

* import fix
2025-10-21 01:37:53 +00:00
083d0de3f3 Code clean up: Checkpoint and WorkflowBuilder (#1557)
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
2025-10-20 16:34:06 +00:00
CopilotGitHubmoonbox3copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
151efd2e80 Python: Remove deprecated add_agent() calls from workflow samples (#1508)
* Initial plan

* Remove add_agent calls from workflow samples

Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com>
2025-10-17 02:25:31 +00:00
59da578902 Python: Add Purview Middleware (#1142)
* [Py Purview] Purview Python Initial Commit

* [Py Purview] Purview Python Minor Fixes

* [Py Purview] Purview Python Comment Fixesish

* [Py Purview] Purview Python Agent Middleware Done

* [Py Purview] Purview Python Agent Middleware Done

* [Py Purview] Purview Python Lint Errors

* [Py Purview] Purview Python Final Hopefully

* [Py Purview] Purview Python Final Hopefully

* [Py Purview] Purview Python Fix ReadMe

* [Py Purview] Purview Python Fix MyPy

* [Py Purview] Purview Python Minor Updates on comments

* [Py Purview] Purview Python Fix Build Error

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-16 21:46:04 +00:00
9148392d00 Python: Enhanced documentation for dependency injection and serialization features (#1324)
* improvements in dep injection and sample

* fix for falsy default

* fix mypy

* update to use a nested dict instead of a string.

* clarify docs

* Update python/packages/core/agent_framework/_tools.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/core/agent_framework/_tools.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/core/agent_framework/_tools.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/core/agent_framework/_serialization.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* format

---------

Co-authored-by: eavanvalkenburg <github@vanvalkenburg.eu>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-13 20:34:27 +00:00
Tao ChenandGitHub fc12ab9fed Python: Refactor RequestInfoExecutor (#1403)
* Refactor RequestInfoExecutor

* Update AI script

* Fix formatting

* Address comments

* fix unit test
2025-10-13 19:18:17 +00:00
CopilotGitHubdmytrostrukcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
d1ac2d9331 Python: Update README to list all available examples (#1394)
* Initial plan

* Update Python samples README with comprehensive example tables

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Fix relative links to use ./ prefix in README

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Remove ./ prefix from link display text while keeping it in URLs

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Add missing MCP authentication example to README

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-13 17:17:03 +00:00
29cb87b805 Added example with MCP and authentication (#1389)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-10-10 19:10:24 +00:00
350cdfc1cd Python: Fix AI Search Tool Sample and improve AI Search Exceptions (#1206)
* Python: Fix AI Search Tool Sample and improve AI Search Exceptions

* Python: Fix AI Search Tool Test

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-10 18:46:57 +00:00
Victor DibiaandGitHub e032fe3993 Python: Fix Failure with Function Approval Messages in Chat Clients (#1322)
* Python: set role=tool when processing approval responses

* Python: set role=tool when processing approval responses

* Fix approval mode with OpenAIChatClient and threads: add approval requests to assistant message, fix deduplication/rejection call_id, filter approval content, add tests and example

* update test tools after change

* Rename _collect_approval_todos to _collect_approval_responses and filter empty call_ids
2025-10-10 18:38:23 +00:00
Giles OdigweandGitHub 7238cde5af Python: AzureAI Bing Connection Name Support (#1364)
* bing connection name support

* error handling + unit tests

* connection id and name handling
2025-10-09 21:13:07 +00:00
9fe4a61dd0 Python: Added function approval example with streaming (#1365)
* Added function approval example with streaming

* Update python/samples/getting_started/tools/ai_tool_with_approval.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-09 17:31:36 +00:00
3d31a4a204 Python: samples: add api_key for Ollama sample usage (#1240)
* samples: add api_key for Ollama sample usage

* Update python/samples/getting_started/agents/ollama/ollama_with_openai_chat_client.py

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>

* fix: update Ollama API key to an unused constant

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-08 20:45:24 +00:00
Dmytro StrukandGitHub 7e891fab39 Python: Included existing agent definition in requests to Azure AI (#1285)
* Fixed instructions handling for existing Azure AI agents

* Updated tool handling for existing agents

* Small update

* Added more comments
2025-10-08 20:33:57 +00:00
Victor DibiaandGitHub c341ee7ed2 Python: DevUI - Internal Refactor, Conversations API support, and per… (#1235)
* Python: DevUI - Internal Refactor, Conversations API support, and performance improvements

Comprehensive refactor of DevUI package including samples relocation,
frontend reorganization, OpenAI Conversations API support, and critical
performance and code quality improvements.

Key Changes:

Architecture & Organization
- Moved DevUI samples to python/samples/getting_started/devui/
- Consolidated with other framework samples for better discoverability
- Added .env.example files and comprehensive README
- Restructured frontend components into feature-based folders (agent, workflow, gallery, layout)
- Created new OpenAI-compliant message renderers (devui should render oai responses types primarily)

New Features
- Added _conversations.py (467 lines) - Full conversation storage abstraction, replaces the /threads endpoint to better match oai conversations api
- Implements OpenAI Conversations API for thread management, Supports in-memory and extensible storage backends

API Simplification
- Use 'model' field as entity_id (agent/workflow name) instead of extra_body
- Use standard OpenAI 'conversation' field for conversation context.

Performance & Quality Improvements
- Improved context management in MessageMapper with bounded memory (~500KB max)
- Implemented hybrid LRU + cleanup approach to prevent unbounded memory growth
- General QOL improvement - Eliminated ~150 lines of dead/duplicate code, Consolidated helper functions into _utils.py, Extracted magic numbers to module-level constants, Optimized conversation item lookups with index-based approach

Testing
- Added test_conversations.py (13 tests)
- Added test_performance_fixes.py (9 tests)
- Updated existing tests for code consolidation
- 53 tests passing

Impact: 76 files changed: +4,106 insertions, -2,373 deletions
All linting and formatting checks passing. No breaking changes - backward compatible.

Migration: Samples moved to python/samples/getting_started/devui/

* readme lint fixes

* initial support for function approval and minor ui fixes
2025-10-08 19:34:30 +00:00
Eduard van ValkenburgandGitHub f5abbc67ae Python: sample with Foundry Redteams (#1306)
* sample with evals

* remove demo output
2025-10-08 19:16:44 +00:00
Eric ZhuandGitHub 1c5e607a1f Python: fix tool call content not showing up in workflow events (#1290)
* fix tool call content not showing up in workflow events

* fix lint

* touch up

* add another sample to show function bridge

* missing sample
2025-10-08 16:39:08 +00:00
Giles OdigweandGitHub 334d52f300 Python: AzureAI Agent AI Search Sample (#1281)
* azure ai search sample

* small fix
2025-10-08 15:52:02 +00:00
Eduard van ValkenburgandGitHub 76900f0eab Python: [BREAKING] parameter naming and other fixes (#1255)
* parameter naming and other fixes

* fix test

* fix azure openai responses decorator ordering

* fix test

* fix mypy

* fixes in options handling

* fix tests

* final fixes

* exclude macos tests

* fix model param
2025-10-07 21:18:48 +00:00
a45e2ab28e Python: Added method to expose agent as MCP server (#1248)
* Added method to expose agent as MCP server

* Update python/packages/core/agent_framework/_agents.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/core/agent_framework/_agents.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Addressed PR feedback

* Updated doc string

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-07 17:21:53 +00:00
8bb1266020 Python: Add PDF file support to OpenAI content parser with filename mapping (#1121)
* Add mapping for application media type in OpenAI responses client

* Enhance multimodal input samples: Add PDF testing functionality and fix image sample

* Standardize filename handling and add multimodal samples

- Standardized filename extraction logic between chat and responses clients
- Both clients now omit filename when not provided (no default fallback)
- Added Azure Responses API multimodal sample with PDF support
- Cleaned up Azure Chat sample to focus on supported features only
- Fixed test comment placement for better code documentation
- Updated README with clear API capability differences

* Enhance multimodal input samples with image and PDF handling

- Refactor image and PDF handling in `azure_chat_multimodal.py` and `openai_chat_multimodal.py` to use new utility functions.
- Add `load_sample_pdf` and `create_sample_image` functions for better test asset management.
- Remove redundant code for creating sample images and PDFs.
- Introduce a sample PDF file in `sample_assets` for testing purposes.

* Fix formatting in OpenAI chat client

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-07 17:04:33 +00:00
Giles OdigweandGitHub 1d27b57672 Python: ollama + azureai openapi samples fix (#1244)
* ollama + azureai openapi samples fix

* small fix
2025-10-07 16:14:34 +00:00
Eric ZhuandGitHub d01d9afb92 Python: Introduce add_agent functionality and added output_response to AgentExecutor; agent streaming behavior to follow workflow invocation (#1184)
* refactor AgentExecutor, add output_response flag for switching on or off workflow output for each agent.

* introduce add_agent

* make default agent's streaming to false

* address comments

* fix test

* add is_streaming to RunnerContext and WorkflowContext

* fix add_agent return

* fix tests

* address comments

* resolve conflict

* update to address comments

* fix
2025-10-07 16:11:40 +00:00
49f25358d7 Python: Sample on integration of Azure OpenAI Responses Client with a local MCP server (#1215)
* added a sample on integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP)

* added additional comments mentioning that the Microsoft Learn MCP server can be replaced by any other desired MCP server

* corrected the MCP server type to local

* added a newline at the end

* Update python/samples/getting_started/agents/azure_openai/azure_responses_client_with_local_mcp.py

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-07 07:54:29 +00:00
Eduard van ValkenburgandGitHub fd819c6c02 Python: Introducing AI Function approval (#1131)
* support for local function approval

* small fix

* fix mypy

* added bigger test scenario's for function calling and approvals

* updated lock

* updated return message for rejection

* fix test

* updated function result content handling
2025-10-04 15:19:16 +00:00
50c532b4ae docs: Update References to Agent2Agent protocol to use correct terminology (#1162)
Should be `Agent2Agent Protocol` not `Agent-to-Agent` unless talking about general agent to agent communication

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-10-03 19:10:05 +00:00
2696de7428 docs: add missing pre flag (#1130)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-10-02 18:50:47 +00:00
Dmytro StrukandGitHub c7f20c8ec5 Python: Added Ollama example using OpenAIChatClient (#1100)
* Added Ollama example using OpenAIChatClient

* Small improvement
2025-10-02 15:14:29 +00:00
CopilotGitHubdmytrostrukcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
07db91174b Python: Fix Azure AI Getting Started samples: Improve documentation and code readability (#1089)
* Initial plan

* Fix Azure AI samples: Add dotenv support, fix async input, improve docs

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Remove dotenv.load_dotenv() and revert async input() changes per review feedback

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-02 03:22:44 +00:00
CopilotGitHubdmytrostrukcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
cd1bdc1483 Python: Fix multimodal input sample: Document required environment variables and configuration options (#1088)
* Initial plan

* Update multimodal input sample to document required environment variables

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Add examples showing how to pass deployment_name as parameter

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>
2025-10-02 01:34:31 +00:00
Evan MattsonandGitHub 4f4890cf6a Update getting started samples to reflect AF. Update a unit test. (#1093) 2025-10-02 01:20:12 +00:00
westeyandGitHub 364188c44f .NET: Add link inspector (#1062)
* Add link inspector

* Comment out excludedirs while it's empty

* Fix broken links

* More links fixes

* Push further fixes

* Fix more links
2025-10-01 16:43:17 +00:00
Giles OdigweandGitHub b0971fdec6 Python: Foundry Agent Completeness (#954)
* foundry completeness

* tests + openapi sample

* bing grounding sample

* options integration tests

* merge conflict fix

* fix failing test

* add mcp approval handling
2025-10-01 13:38:51 +00:00
Giles OdigweandGitHub b88143b686 Agents + Chat Client Samples Doctsring Updates (#1028)
* agents + chat client samples doctsring updates

* fixes
2025-10-01 07:18:53 +00:00
Evan MattsonandGitHub fb51d917fd Python: semantic-kernel to agent-framework migration code samples (#1045)
* wip migrations

* Wip: workflow migrations

* Add migration samples for sk to af

* Fix typo

* Fixes
2025-10-01 07:02:03 +00:00
Eduard van ValkenburgandGitHub 40f5b6d8fe Python: Tool definitions otel (#936)
* added tool_definitions

* removed json dump

* improved logic

* updated for pydantic
2025-09-30 20:11:54 +00:00
Eduard van ValkenburgandGitHub 54ad135914 Python: [BREAKING] added SerializationMixin and applied to contents, agents, chat client… (#1012)
* added SerializationMixin and applied to contents, agents, chat clients, removed AFBaseModel

* fix annotations type

* mypy fixes

* fix tests

* fix serializable subvalues and added large docstring

* updated indents in code block

* fixed exported urls
2025-09-30 19:53:46 +00:00
Eduard van ValkenburgandGitHub 3eb26632ce Python: fix string parsing in azure openai client (#1023)
* fix string parsing in azure openai client

* test fix

* changed setup func name and check if there is a conn string

* redid parsing in safe way
2025-09-30 19:33:12 +00:00
Tao ChenandGitHub f7e9490494 Python: Update installation instructions (#1026)
* Update installation instructions

* address comments
2025-09-30 19:28:54 +00:00
Ben ThomasandGitHub df3e12b2ed .Net: Visualizing dotnet workflows (#882)
* Adding more test for workflow vizualization.

* Improving README for sample.

* More cleanup.

* Removing rendering of workflow visualization and adding basic support for mermaid format.

* Adding basic mermaid tests.

* Improving sample. Switching to another branch.

* About to merge from main.

* Formatting.

* More fromatting.

* Removng uneeded call to ToUpper.

* Adding README.

* Moving samples under workflow to workflows.

* Removing uneeded README for map-reduce sample.
2025-09-30 16:29:19 +00:00
522bf4bf23 Python: [Doc] Update python observability sample with Grafana dashboards (#995)
* Update python observability sample with Grafana dashboards

* fix case

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-09-30 16:16:20 +00:00
Evan MattsonandGitHub b42bb700fb Python: [BREAKING] Python: Rename workflow to workflows (#1007)
* Rename workflow to workflows

* Update occurence of workflow to new name
2025-09-30 11:21:34 +00:00
CopilotGitHubdmytrostrukcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
170c2c715a Python: Update README files: Fill empty documentation and expand minimal content (#980)
* Initial plan

* Fill empty python/samples README and expand dotnet custom implementation README

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Fix broken documentation links in main README

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Fix installation instructions in Python main package README

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

* Address PR feedback: revert main README and Python package README, remove empty prerequisites section and repository link

Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>
2025-09-29 23:59:50 +00:00
b4ebafa9b1 Python: [Breaking] removed pydantic from types and workflows (#917)
* removed pydantic from types

* fix test

* fix test

* fix tests

* fix assistants client

* Remove Pydantic usage from workflow code.

* updated pydantic removal

* updated lock and test fixes

* fix mypy

* updated build system

* updated chat client parsing

* fix broken test

---------

Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
2025-09-29 21:19:58 +00:00
c102706146 Python: basic python a2a support (#906)
* basic python a2a support

* fixes

* small fixes

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-09-29 17:53:45 +00:00
Eduard van ValkenburgandGitHub 10d10364a9 Python: [BREAKING] cleanup of thread API and serialization (#893)
* cleanup of threads and serialization

* fix for sliding window

* fix redis test

* updated from comments

* updated context provider and threads

* updated lock

* add asyncio default

* fix redis tests

* fix tests

* fix tests

* renamed to invoking

* fixed tests

* fix for instructions
2025-09-29 16:22:34 +00:00
Dmytro StrukandGitHub 4cd76bf2b0 Small fixes (#969) 2025-09-29 08:43:00 +00:00
Dmytro StrukandGitHub f2f0d40437 Added structured output to agent streaming (#943) 2025-09-27 17:07:17 +00:00