Commit Graph
904 Commits
Author SHA1 Message Date
Dmytro StrukandGitHub 4b9eea906f Improved exception messages (#479) 2025-08-25 14:46:48 +00:00
b0b3fd151c Python: Adding support for nested workflows (#460)
* Adding design documents and data flow descriptions for sub-workflows

* Updating docs.

* Sub-workflow implementation #1. Stuck because of singleton RequestInfoExecutor, going to make a change to remove that restrivtion.

* Removed the singleton restriction on RequestInfoExecutor so enable sub-workflows.

* Scenarios seem to be working.

* Sample improved.

* going to have intern add generic response wrappers.

* Wrapped responses working.

* Non-hardcoded routing is working.

* Sample showing external approved and not approved.

* Cleaning up.

* Updating some samples and user guide.

* Removing old design doc.

* Cleaning up.

* Adding python-package-setup.md back.

* Update python/packages/workflow/agent_framework_workflow/_executor.py

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

* Update python/packages/workflow/agent_framework_workflow/_validation.py

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

* Removing prints.

* Fixing lint and type issues.

* Fixing lint and type issues.

* Update python/packages/workflow/agent_framework_workflow/_executor.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Adding type hints to intercepts decorator.

* Removing unused files.

* Fixing issue with sample 5 groupchat with hil.

* Removing redundent samples.

* Updates to ensure no conflicting request interceptors and to support a subflow with multiple requests in a single super step.

* Fixing pypi errors.

* clean up samples

* update samples to make it more clear

* warning for unhandled request info from sub workflow

* add logger info

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-08-23 03:21:37 +00:00
Eric ZhuandGitHub 6e9d35830f Python: Move Workflow, Edge, EdgeGroup and Executor to AFBaseModel (#472)
* Refactor workflow to introduce EdgeRunner for edge execution.

* Fix edge cases

* Convert Workflow, Edge, EdgeGroup, and Executor into AFBaseModel to support object model serialization

* format

* remove accidental file

* fix typing

* Add type information to EdgeGroup and Executor subclasses

* fix format

* Add condition_name field to Edge

* Add new fields

* remove Optional

* Update
2025-08-22 22:02:34 +00:00
Eric ZhuandGitHub 65836ab125 Python: Use generic for WorkflowContext and use its type parameters to indicate executor's output types (#444)
* Use generic for WorkflowContext and use its type parameters to indicate executor's output types

* Update

* Fix type errors and add in-line comments

* fix test

* type

* Fix executor type issues
2025-08-21 02:40:43 +00:00
123a0bca10 Python: Improved main package test coverage (#445)
* Fixed failing foundry tests and improved main coverage

* Add back mistakenly deleted code

* Update python/packages/main/tests/openai/test_openai_assistants_client.py

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

* Update python/packages/main/tests/openai/test_openai_assistants_client.py

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

* Small fix

---------

Co-authored-by: Giles Odigwe <gilesodigwe@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-08-20 20:18:48 +00:00
peterychangandGitHub feb4e908ae Python: Request cancellation sample (#459)
* request cancellation via tasks

* fix missing kwargs
2025-08-20 19:56:26 +00:00
6900d3456c Python: Workflow visualization. (#372)
* Workflow visualization.

* fix typing

* address comments

* update all samples

* Update fan in edge group visual

* fix quality check

* Update python/samples/getting_started/workflow/step_06_map_reduce.py

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

* address comment

* Catch up with changes in workflow; add to_mermaid method

* Update examples

* fix test

* add installation guide to error messages

* Remove visualization for samples except for one.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
2025-08-20 00:07:49 +00:00
peterychangandGitHub 953ed7560d Fix chat options for Responses API (#441) 2025-08-19 00:23:01 +00:00
Tao ChenandGitHub c0c49d31d0 Enable Mypy for Workflow (#433) 2025-08-15 22:57:28 +00:00
0410f51777 Python: Web search file search tools (#395)
* Add web and file search tools

* add tests

* PR comments

* Add tools support for chat and assistants clients

* fix code checks

* add tests for assistants client

* Add samples

* fix fn descriptions

* Add openai responses model id to environment variables

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-08-15 19:35:23 +00:00
ed86baa6cb Python: Workflow Edge Groups (#393)
* Introducing edge groups

* Add conditional and partitioning edge groups; next add samples and tests

* Add unit tests

* Add samples

* Address comments 1

* Address comments 2

* Update conditional edge group to take in cases and default

* Minor updates to sample

* Collapsing Paritioning Edge group and Conditional Edge group to source edge group

* Improve sample clarity

* Name consolidation

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-08-15 18:11:35 +00:00
19d91bb950 Python: Foundry Chat Client unit tests to improve coverage (#423)
* Add unit tests for Foundry Chat Client to improve coverage

* Updated Azure OpenAI endpoint and tests timeout

* Error fixes for Foundry Chat Client tests

* Error fixes

---------

Co-authored-by: Giles Odigwe <gilesodigwe@microsoft.com>
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
2025-08-15 17:45:14 +00:00
Dmytro StrukandGitHub dea736e550 Python: Thread storage and serialization (#394)
* Updates for message store support

* Added unit tests

* Added suspend-resume example

* Added example with custom chat message store

* Small fix

* Addressed PR feedback

* Renaming and documentation

* More renaming

* Addressed more PR feedback

* Small fixes in Foundry chat client and examples

* Small update

* Addressed PR feedback

* Increased timeout for Azure tests
2025-08-14 21:15:42 +00:00
Dmytro StrukandGitHub 95cb20ca40 Small fix in Foundry chat client and samples (#407) 2025-08-14 20:21:23 +00:00
4007785b66 Azure package unit tests to improve coverage (#414)
Co-authored-by: Giles Odigwe <gilesodigwe@microsoft.com>
2025-08-14 16:19:44 +00:00
Eduard van ValkenburgandGitHub ad3d8171bf Python: Introducing Local MCP Servers (#389)
* mcp parts

* mcp parts 2

* removed structured output in favor of handling in chatresponse, mcp as AITool and running samples

* updated naming

* fixed test
2025-08-13 09:48:22 +00:00
Eduard van ValkenburgandGitHub 53866218d2 Python: add better test coverage to individual tests, and all-tests task, gh … (#400)
* add better test coverage to individual tests, and all-tests task, gh action to surface

* remove cache location

* test version-file

* updated uv setup for consistency

* mypy fix

* update naming

* temporarily removed mypy from workflow
2025-08-12 18:35:36 +00:00
Eduard van ValkenburgandGitHub df9d85d1f0 Python: openai updates (#388)
* openai updates

* rebuild of openai structure

* updated responses structure

* renamed sample

* added file id support to code interpreter

* added hosted file ids to code interpretor

* mypy fixes

* removed default az cred from codebase

* updated agent name setup

* added kwargs to entra methods

* and further kwargs

* extra comment

* updated all samples

* readded custom get methods for responses

* updated int tests with ad credential

* missed one
2025-08-12 06:14:22 +00:00
Evan MattsonandGitHub 19676978e9 Python: introduce workflow checkpointing (#366)
* Add workflow checkpointing functionality.

* Reintroduce protocol that went missing during merge

* Checkpoint updates

* Fix ordering of checkpointing

* Cleanup

* Cleanup - thanks Copilot

* Cleanup - thanks Copilot

* State reset updates

* State reset updates 2

* Workflow fixes and updates. Addressed PR feedback

* A few updates
2025-08-11 22:33:46 +00:00
Eduard van ValkenburgandGitHub bbc07931c1 Python: added HostedFileContent and HostedVectorStoreContent (#379)
* added HostedFileContent and HostedVectorStoreContent

* added convenience functions for hostedcodeinterpretertools

* fix docstrings

* udpated docstring

* clarified parsing logic

* updated type names

* updated test

* and vector stores
2025-08-11 14:23:32 +00:00
Eduard van ValkenburgandGitHub 82d39bc1f7 Python: added AIAnnotation types and extra tests (#374)
* added AIAnnotation types and extra tests

* fixed typing and such

* use copy

* fix raw representation for add

* handle annotations in add

* clarified concat

* self to first
2025-08-08 20:27:31 +00:00
Eduard van ValkenburgandGitHub 8f27e63df6 Python: added create_agent and removed need for Field in annotations (#380)
* added create_agent

* add minimal sample

* allow multiple annotations

* improved docstring
2025-08-08 17:55:20 +00:00
c8694a8c76 Python: Define Workflow and Executor APIs (#272)
* Workflow init commit

* Add samples and clean up

* ExecutionContext -> WorkflowContext

* Address comments 1

* Fix mypy

* flatting folder structure, and rename contexts

* Remove add_loop

* Add map reduce sample, remove Activation conditions

* Add AgentExecutor and allow multiple handlers per executor

* Minor improvement

* Add RequestInfoExecutor

* Add unit tests part 1

* Address comments 2

* Pre-commit update

* Add run method and more unit tests

* Add xml docs

* run_stream -> run_streaming

* message_handler -> handler

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
2025-08-06 23:26:15 +00:00
f43939d803 Python: Azure Responses client (#311)
* Azure Responses client

* Fix a change made in the wrong place

* allow api_version and token_endpoint to use env vars

* Add getting started sample

* add responses deployment name env var

* update azure clients to use defaults for api_version and token_endpoint

* make tests more reliable

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
2025-08-06 14:18:38 +00:00
Dmytro StrukandGitHub c1d306ec95 Python: Azure OpenAI Assistants Chat Client and Agent (#300)
* Initial version of assistant client

* More updates to assistant client

* Finished assistant chat client implementation

* Small fixes and basic example

* Added code interpreter example

* More examples

* Added chat client example

* Small fixes

* Added tests

* Enabled telemetry

* Small fix

* Removed files temporarily

* Revert "Removed files temporarily"

This reverts commit 5cdfa0d299.

* Small fixes

* Addressed PR feedback

* Fixed tests

* Small update

* Added Azure assistants client and examples

* Added tests

* Small fix
2025-08-05 14:51:36 +00:00
Dmytro StrukandGitHub 544d2ba48f Added author name logic to ChatClientAgent (#313) 2025-08-05 05:47:52 +00:00
Eduard van ValkenburgandGitHub c39845d473 Python: small fixes in foundry (#297)
* small fixes in foundry

* other samples updated

* make it optional

* added instructions and response format to create agent

* mypy fix

* shortened main readme and improved python readme
2025-08-04 08:13:44 +00:00
Dmytro StrukandGitHub 75794b4687 Python: OpenAI Assistants Chat Client and Agent (#288)
* Initial version of assistant client

* More updates to assistant client

* Finished assistant chat client implementation

* Small fixes and basic example

* Added code interpreter example

* More examples

* Added chat client example

* Small fixes

* Added tests

* Enabled telemetry

* Small fix

* Removed files temporarily

* Revert "Removed files temporarily"

This reverts commit 5cdfa0d299.

* Small fixes

* Addressed PR feedback

* Fixed tests

* Small update
2025-08-01 12:12:41 +00:00
Eduard van ValkenburgandGitHub 42c7a59640 Python: updated doc generation setup and some slight api enhancements (#267)
* updated doc generation setup and some slight api enhancements

* small fix in index
2025-07-31 15:04:22 +00:00
caee8bfa90 Python: add agent telemetry (#283)
* add agent telemetry

* updated comments

* update AgentRunResponseUpdate

* updated create_agent var

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
2025-07-31 10:29:38 +00:00
Eduard van ValkenburgandGitHub 1ed89d4db8 Python: updated API in sync with dotnet (#269)
* updated API in sync with dotnet

* fix test

* updated name and display_name

* fixed mypy setup

* add pre-commit cache
2025-07-30 08:50:22 +00:00
Eduard van ValkenburgandGitHub dff700e469 added telemetry decorators to other chat clients (#255) 2025-07-28 17:08:58 +00:00
Dmytro StrukandGitHub c794892d79 Python: OpenAI Responses Agent - threads, code interpreter, bug fixes and examples (#242)
* Added basic example with small fix

* Added example with function tools

* Added example with thread management

* Small renaming

* Added example with code interpreter
2025-07-28 17:07:29 +00:00
Eduard van ValkenburgandGitHub f36cc40080 different secret for python tests (#248) 2025-07-28 11:37:26 +02:00
Eduard van ValkenburgandGitHub ba008cf4c0 Merge tests (#247)
* removed hardcoded model names from tests

* add debug line
2025-07-28 11:12:28 +02:00
Eduard van ValkenburgandGitHub 0ce8eb1e2f Python telemetry (#223)
* initial work on telemetry

* moved tool operation const

* missing quotes

* working otel with samples

* updated readme and other assets

* added tests

* added tests

* small updates

* updated genaiattributes docs

* updated tests

* additional warning

* cleanup of tests
2025-07-28 07:33:42 +00:00
3ee9dddfa2 Python: OpenAI responses client (#239)
* Responses client WIP

* add responses class

* fix typing errors

* move test

* streaming responses, structured outputs

* tests

* Update python/packages/main/tests/openai/test_openai_responses_client.py

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

* pr comments

* fix override import

* fix mypy

* add missing function override

* PR comments

* add docstrings

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-25 17:56:22 +00:00
Dmytro StrukandGitHub a72245287f Python: Added fixes and more examples for OpenAI and Azure chat client agents (#232)
* Added non-streaming and streaming examples

* Updated resource management

* Added examples with thread management

* Added function tools examples

* Small rename

* Added code interpreter example

* Updated example

* Addressed PR feedback

* Added more OpenAI and Azure chat completion examples

* File renaming

* Small fix in tests

* Small revert

* More renaming

* Small fix
2025-07-24 15:31:05 +00:00
Dmytro StrukandGitHub 14efb626ab Python: Added fixes and more examples for Foundry agent (#217)
* Added non-streaming and streaming examples

* Updated resource management

* Added examples with thread management

* Added function tools examples

* Small rename

* Added code interpreter example

* Updated example

* Addressed PR feedback

* Addressed PR feedback
2025-07-24 14:47:45 +00:00
Eduard van ValkenburgandGitHub 517955ce66 updated builds and release pipeline setup (without pypi publish) (#219)
* updated builds and release pipeline setup (without pypi publish)

* add label prefix action

* updated uv versions

* final uv updates

* moved uv version semver into variable
2025-07-24 07:15:00 +00:00
Eduard van ValkenburgandGitHub 27f7af2160 Python: moved prepare tools into class (#215)
* moved prepare tools into class

* moved test

* changed tool handling

* fix test

* second fix
2025-07-22 21:37:18 +00:00
Eduard van ValkenburgandGitHub 5c992eb7ae Python: move all tests under tests and initial work on int tests (#206)
* move all tests under tests and initial work on int tests

* added updated tests setup and merge tests

* without failing step

* fixed upload

* updated file names for coverage

* reenable surface tests

* removed package matrix

* simplified variables

* correct path

* removed mistake

* fix mistake in path

* fix path

* windows specific env set

* updated merge tests

* slight update in marker

* added run integration tests settings

* updated setup, moved foundry int tests and updated merge test
2025-07-22 15:26:00 +00:00
Dmytro StrukandGitHub f89c0be0ea Python: Added integration tests for FoundryChatClient (#207)
* Initial version of tests

* Updated the tests
2025-07-22 14:11:54 +00:00
Dmytro StrukandGitHub ccd7a44ec7 Python: Implemented FoundryChatClient (#193)
* Initial version of FoundryChatClient

* Updates to the tool call streaming wrapper

* Small fixes

* Small updates and addressed PR feedback

* Handle automatic client creation

* Small improvement

* Added credential parameter

* Small improvements

* Made FoundryChatClient disposable

* Small fixes

* Added unit tests

* Refactored samples

* Small improvements

* Small fix

* Addressed PR feedback

* Small fixes

* Small updates

* Small fix

* Addressed PR feedback
2025-07-18 20:10:14 +00:00
Eduard van ValkenburgandGitHub 9287572b0d Python: improved loading (#202)
* improved loading

* updated openai folder imports

* fixed import
2025-07-18 19:17:30 +00:00
f0dc661c3e Python: Azure chat client (#185)
* updated openai, fcc works, with sample

* reduced files in openai

* Add azure chat client

* fix tests

* Update python/packages/main/tests/unit/test_openai_chat_completion_base.py

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

* Update python/packages/azure/agent_framework/azure/__init__.py

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

* Update python/packages/azure/agent_framework/azure/_azure_openai_settings.py

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

* PR comments

* fix bad merge

* disable tests for now

* actually disable tests for azure

* fix tests, align test files with merge changes

* update code for new project structure

* PR comments

* add streaming integration tests. Fix flakiness

---------

Co-authored-by: eavanvalkenburg <github@vanvalkenburg.eu>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-15 18:38:09 +00:00
Eduard van ValkenburgandGitHub 2e6f6a4008 small update in init (#189) 2025-07-15 15:09:32 +00:00
Eduard van ValkenburgandGitHub 62917ee5e5 Python: simple Agent sample (#180)
* tweaks to agents and sample

* updated clients and agents

* single line run and print

* improved tool handling

* added note on setting max iterations

* fixed streaming param name

* updated tools test

* made kwargs alphabetical

* added params to run methods

* tweak to ensure right overload
2025-07-15 14:01:21 +00:00
Eduard van ValkenburgandGitHub 407ed6de70 Python: follow on work on OpenAI (#169)
* updated openai, fcc works, with sample

* reduced files in openai
2025-07-12 05:15:51 +00:00
Dmytro StrukandGitHub 94e00bd49a Python: Added ChatClientAgentThread and ChatClientAgent implementations (#150)
* Added ChatClientAgentThread

* Initial version of ChatClientAgent

* Completed ChatClientAgent

* Small fixes and unit tests

* Fixes based on pre-commit

* Small fixes

* Small renaming

* Small improvement

* Small fixes

* Addressed PR feedback

* Small fix

* Added method for AgentRunResponse from streaming conversion

* Addressed PR feedback

* Addressed PR feedback

* Addressed PR feedback

* Small fix

* More fixes
2025-07-11 18:09:09 +00:00