diff --git a/python/CHANGELOG.md b/python/CHANGELOG.md index fa637607519..ca368cf134d 100644 --- a/python/CHANGELOG.md +++ b/python/CHANGELOG.md @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.9.0] - 2026-06-18 + +### Added +- **agent-framework-core**: Add `AgentLoopMiddleware` for re-running agents in a loop ([#6174](https://github.com/microsoft/agent-framework/pull/6174)) +- **agent-framework-core**: Integrate tool approval into the harness agent ([#6522](https://github.com/microsoft/agent-framework/pull/6522)) +- **agent-framework-core**: Add tool approval middleware ([#6414](https://github.com/microsoft/agent-framework/pull/6414)) +- **agent-framework-core**: Integrate the shell tool into the harness agent ([#6451](https://github.com/microsoft/agent-framework/pull/6451)) +- **agent-framework-core**: Capture context provider instructions in agent telemetry ([#6515](https://github.com/microsoft/agent-framework/pull/6515)) +- **agent-framework-core**, **agent-framework-ag-ui**: Add opt-in AG-UI thread snapshot persistence and hydration ([#6471](https://github.com/microsoft/agent-framework/pull/6471)) +- **agent-framework-foundry-hosting**: Emit failed events for hosted agent responses ([#6502](https://github.com/microsoft/agent-framework/pull/6502)) + +### Changed +- **agent-framework-core**: [BREAKING] Add sampling guardrails to MCP tools — deny server-initiated sampling by default and add `sampling_approval_callback`, `sampling_max_tokens`, and `sampling_max_requests` parameters ([#6413](https://github.com/microsoft/agent-framework/pull/6413)) +- **agent-framework-core**: [BREAKING] Align FileAccess tools with .NET, adding directory discovery and recursive search ([#6476](https://github.com/microsoft/agent-framework/pull/6476)) +- **agent-framework-declarative**: [BREAKING] Additional fixes for declarative workflow execution ([#6489](https://github.com/microsoft/agent-framework/pull/6489)) +- **agent-framework-azure-contentunderstanding**: Adopt `azure-ai-contentunderstanding` `to_llm_input` in the CU context provider ([#5796](https://github.com/microsoft/agent-framework/pull/5796)) +- **agent-framework-orchestrations**: Promote to stable (`1.0.0`) + +### Fixed +- **agent-framework-core**: Stop forwarding the unsupported `function_invocation_configuration` kwarg from `as_agent` ([#6520](https://github.com/microsoft/agent-framework/pull/6520)) +- **agent-framework-core**: Fix MCP `allowed_tools` empty-list handling ([#6296](https://github.com/microsoft/agent-framework/pull/6296)) +- **agent-framework-core**: Disable harness compaction when max tokens are not provided ([#6410](https://github.com/microsoft/agent-framework/pull/6410)) +- **agent-framework-core**: Parse MCP `CallToolResult.structuredContent` to prevent tool results returning `None` ([#6421](https://github.com/microsoft/agent-framework/pull/6421)) +- **agent-framework-core**: Catch bare `ImportError` during hosted-environment detection so optional Foundry hosting probing cannot crash user-agent setup +- **agent-framework-anthropic**, **agent-framework-core**, **agent-framework-openai**: Fix OTel usage detail attributes ([#6493](https://github.com/microsoft/agent-framework/pull/6493)) +- **agent-framework-foundry**, **agent-framework-openai**: Fix Azure AI Search citation URLs ([#6453](https://github.com/microsoft/agent-framework/pull/6453)) +- **agent-framework-foundry**: Fix `aiohttp` dependency specification ([#6567](https://github.com/microsoft/agent-framework/pull/6567)) +- **agent-framework-declarative**: Fix declarative workflow execution ([#6468](https://github.com/microsoft/agent-framework/pull/6468)) +- **samples**: Fix harness console rendering a single streamed tool call multiple times ([#6549](https://github.com/microsoft/agent-framework/pull/6549)) +- **samples**: Fix `ollama_chat_client.py` to pass tools via the options dict ([#6480](https://github.com/microsoft/agent-framework/pull/6480)) + ## [1.8.1] - 2026-06-09 ### Added @@ -1189,7 +1220,8 @@ Release candidate for **agent-framework-core** and **agent-framework-azure-ai** For more information, see the [announcement blog post](https://devblogs.microsoft.com/foundry/introducing-microsoft-agent-framework-the-open-source-engine-for-agentic-ai-apps/). -[Unreleased]: https://github.com/microsoft/agent-framework/compare/python-1.8.1...HEAD +[Unreleased]: https://github.com/microsoft/agent-framework/compare/python-1.9.0...HEAD +[1.9.0]: https://github.com/microsoft/agent-framework/compare/python-1.8.1...python-1.9.0 [1.8.1]: https://github.com/microsoft/agent-framework/compare/python-1.8.0...python-1.8.1 [1.8.0]: https://github.com/microsoft/agent-framework/compare/python-1.7.0...python-1.8.0 [1.7.0]: https://github.com/microsoft/agent-framework/compare/python-1.6.0...python-1.7.0 diff --git a/python/PACKAGE_STATUS.md b/python/PACKAGE_STATUS.md index ae8334d2cc1..72bb1d9cac6 100644 --- a/python/PACKAGE_STATUS.md +++ b/python/PACKAGE_STATUS.md @@ -41,7 +41,7 @@ Status is grouped into these buckets: | `agent-framework-monty` | `python/packages/monty` | `alpha` | | `agent-framework-ollama` | `python/packages/ollama` | `beta` | | `agent-framework-openai` | `python/packages/openai` | `released` | -| `agent-framework-orchestrations` | `python/packages/orchestrations` | `beta` | +| `agent-framework-orchestrations` | `python/packages/orchestrations` | `released` | | `agent-framework-purview` | `python/packages/purview` | `beta` | | `agent-framework-redis` | `python/packages/redis` | `beta` | diff --git a/python/packages/ag-ui/pyproject.toml b/python/packages/ag-ui/pyproject.toml index 4f0ff83aa7b..a5646b47ee9 100644 --- a/python/packages/ag-ui/pyproject.toml +++ b/python/packages/ag-ui/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agent-framework-ag-ui" -version = "1.0.0rc4" +version = "1.0.0rc5" description = "AG-UI protocol integration for Agent Framework" readme = "README.md" license-files = ["LICENSE"] @@ -22,7 +22,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.8.1,<2", + "agent-framework-core>=1.9.0,<2", "ag-ui-protocol>=0.1.16,<0.2", "fastapi>=0.115.0,<0.133.1", "uvicorn[standard]>=0.30.0,<1" diff --git a/python/packages/anthropic/pyproject.toml b/python/packages/anthropic/pyproject.toml index 7db45674352..86400ee337f 100644 --- a/python/packages/anthropic/pyproject.toml +++ b/python/packages/anthropic/pyproject.toml @@ -4,7 +4,7 @@ description = "Anthropic integration for Microsoft Agent Framework." authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.0.0b260604" +version = "1.0.0b260618" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -23,7 +23,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.8.0,<2", + "agent-framework-core>=1.9.0,<2", "anthropic>=0.80.0,<0.80.1", ] diff --git a/python/packages/azure-contentunderstanding/pyproject.toml b/python/packages/azure-contentunderstanding/pyproject.toml index c4eea97b1df..7034a010238 100644 --- a/python/packages/azure-contentunderstanding/pyproject.toml +++ b/python/packages/azure-contentunderstanding/pyproject.toml @@ -4,7 +4,7 @@ description = "Azure Content Understanding integration for Microsoft Agent Frame authors = [{ name = "Microsoft", email = "af-support@microsoft.com" }] readme = "README.md" requires-python = ">=3.10" -version = "1.0.0a260521" +version = "1.0.0a260618" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -23,7 +23,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.6.0,<2", + "agent-framework-core>=1.9.0,<2", "agent-framework-foundry>=1.6.0,<2", "azure-ai-contentunderstanding>=1.2.0b2,<2", "aiohttp>=3.9,<4", diff --git a/python/packages/core/agent_framework/_telemetry.py b/python/packages/core/agent_framework/_telemetry.py index ab8576a305e..0e6b80f9706 100644 --- a/python/packages/core/agent_framework/_telemetry.py +++ b/python/packages/core/agent_framework/_telemetry.py @@ -76,7 +76,7 @@ def _detect_hosted_environment() -> None: try: if importlib.util.find_spec("azure.ai.agentserver.core") is None: return - except (ModuleNotFoundError, ValueError): + except (ImportError, ValueError): return with contextlib.suppress(ImportError, AttributeError): from azure.ai.agentserver.core import ( # pyright: ignore[reportMissingImports] diff --git a/python/packages/core/pyproject.toml b/python/packages/core/pyproject.toml index bc03bb02dda..0f9fb2de471 100644 --- a/python/packages/core/pyproject.toml +++ b/python/packages/core/pyproject.toml @@ -4,7 +4,7 @@ description = "Microsoft Agent Framework for building AI Agents with Python. Thi authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.8.1" +version = "1.9.0" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -58,6 +58,14 @@ all = [ "agent-framework-redis", ] +[dependency-groups] +# agent-framework-tools depends on agent-framework-core, so core cannot list it as a +# runtime dependency. It is declared here (dev only) so the harness shell-tool integration +# can be type-checked and tested in isolated environments without a circular runtime dependency. +dev = [ + "agent-framework-tools", +] + [tool.uv] prerelease = "if-necessary-or-explicit" environments = [ diff --git a/python/packages/core/tests/core/test_harness_agent.py b/python/packages/core/tests/core/test_harness_agent.py index 400ecf18335..bd1d9aa06d2 100644 --- a/python/packages/core/tests/core/test_harness_agent.py +++ b/python/packages/core/tests/core/test_harness_agent.py @@ -2,6 +2,7 @@ from __future__ import annotations +import importlib.util from collections.abc import AsyncIterator, Mapping from typing import Any @@ -566,6 +567,13 @@ def get_shell_tool(self, *, func: Any = None, **kwargs: Any) -> str: return "shell_tool_instance" +_requires_shell_tools = pytest.mark.skipif( + importlib.util.find_spec("agent_framework_tools") is None, + reason="agent-framework-tools is not installed in this environment", +) + + +@_requires_shell_tools def test_create_harness_agent_adds_shell_tool_and_provider() -> None: """Shell tool and ShellEnvironmentProvider should be added when a shell executor is supplied.""" from agent_framework_tools.shell import ShellEnvironmentProvider @@ -585,6 +593,7 @@ def test_create_harness_agent_adds_shell_tool_and_provider() -> None: assert any(isinstance(p, ShellEnvironmentProvider) for p in providers) +@_requires_shell_tools def test_create_harness_agent_shell_passes_custom_options() -> None: """Custom ShellEnvironmentProviderOptions should be forwarded to the provider.""" from agent_framework_tools.shell import ShellEnvironmentProvider, ShellEnvironmentProviderOptions @@ -603,6 +612,7 @@ def test_create_harness_agent_shell_passes_custom_options() -> None: assert provider._options is options +@_requires_shell_tools def test_create_harness_agent_shell_skipped_when_unsupported(caplog: pytest.LogCaptureFixture) -> None: """When the client lacks get_shell_tool, both the tool and provider are skipped with a warning.""" import logging @@ -623,6 +633,7 @@ def test_create_harness_agent_shell_skipped_when_unsupported(caplog: pytest.LogC assert "tools" not in agent.default_options or not agent.default_options.get("tools") +@_requires_shell_tools def test_create_harness_agent_no_shell_by_default() -> None: """No shell tool or provider should be added when shell_executor is not provided.""" from agent_framework_tools.shell import ShellEnvironmentProvider diff --git a/python/packages/declarative/pyproject.toml b/python/packages/declarative/pyproject.toml index 25f7315ebc5..378ec70f4c3 100644 --- a/python/packages/declarative/pyproject.toml +++ b/python/packages/declarative/pyproject.toml @@ -4,7 +4,7 @@ description = "Declarative specification support for Microsoft Agent Framework." authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.0.0rc1" +version = "1.0.0rc2" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -22,7 +22,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.7.0,<2", + "agent-framework-core>=1.9.0,<2", "httpx>=0.27,<1", "powerfx>=0.0.32,<0.0.35; python_version < '3.14'", "pyyaml>=6.0,<7.0", diff --git a/python/packages/foundry/pyproject.toml b/python/packages/foundry/pyproject.toml index 6c9142e2778..1d4e3d9e747 100644 --- a/python/packages/foundry/pyproject.toml +++ b/python/packages/foundry/pyproject.toml @@ -4,7 +4,7 @@ description = "Microsoft Foundry integrations for Microsoft Agent Framework." authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.8.1" +version = "1.8.2" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -23,8 +23,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.8.1,<2", - "agent-framework-openai>=1.8.1,<2", + "agent-framework-core>=1.9.0,<2", + "agent-framework-openai>=1.8.2,<2", "aiohttp>=3.9,<4", "azure-ai-inference>=1.0.0b9,<1.0.0b10", "azure-ai-projects>=2.2.0,<3.0", diff --git a/python/packages/foundry_hosting/pyproject.toml b/python/packages/foundry_hosting/pyproject.toml index 59cc347d137..12dbccff69f 100644 --- a/python/packages/foundry_hosting/pyproject.toml +++ b/python/packages/foundry_hosting/pyproject.toml @@ -4,7 +4,7 @@ description = "Foundry Hosting integration for Microsoft Agent Framework." authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.0.0a260609" +version = "1.0.0a260618" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -23,7 +23,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.8.1,<2", + "agent-framework-core>=1.9.0,<2", "azure-ai-agentserver-core>=2.0.0b3,<3", "azure-ai-agentserver-responses>=1.0.0b7,<2", "azure-ai-agentserver-invocations>=1.0.0b3,<2", diff --git a/python/packages/openai/pyproject.toml b/python/packages/openai/pyproject.toml index 46d7cc16495..0acbf930a0d 100644 --- a/python/packages/openai/pyproject.toml +++ b/python/packages/openai/pyproject.toml @@ -4,7 +4,7 @@ description = "OpenAI integrations for Microsoft Agent Framework." authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.8.1" +version = "1.8.2" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -23,7 +23,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.8.1,<2", + "agent-framework-core>=1.9.0,<2", "openai>=1.99.0,<3", ] diff --git a/python/packages/orchestrations/README.md b/python/packages/orchestrations/README.md index 63fd7ea4ee1..bbdb63a118a 100644 --- a/python/packages/orchestrations/README.md +++ b/python/packages/orchestrations/README.md @@ -5,7 +5,7 @@ Orchestration patterns for Microsoft Agent Framework. This package provides high ## Installation ```bash -pip install agent-framework-orchestrations --pre +pip install agent-framework-orchestrations ``` ## Orchestration Patterns diff --git a/python/packages/orchestrations/pyproject.toml b/python/packages/orchestrations/pyproject.toml index dba4d7f3b55..d579532cc23 100644 --- a/python/packages/orchestrations/pyproject.toml +++ b/python/packages/orchestrations/pyproject.toml @@ -4,7 +4,7 @@ description = "Orchestration patterns for Microsoft Agent Framework. Includes Se authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.0.0rc3" +version = "1.0.0" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -12,7 +12,7 @@ urls.release_notes = "https://github.com/microsoft/agent-framework/releases?q=ta urls.issues = "https://github.com/microsoft/agent-framework/issues" classifiers = [ "License :: OSI Approved :: MIT License", - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", @@ -23,7 +23,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core>=1.8.0,<2", + "agent-framework-core>=1.9.0,<2", ] [tool.uv] diff --git a/python/pyproject.toml b/python/pyproject.toml index 0a4e6f34a93..c8b44ea3ec4 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ description = "Microsoft Agent Framework for building AI Agents with Python. Thi authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" requires-python = ">=3.10" -version = "1.8.1" +version = "1.9.0" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" urls.source = "https://github.com/microsoft/agent-framework/tree/main/python" @@ -23,7 +23,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "agent-framework-core[all]==1.8.1", + "agent-framework-core[all]==1.9.0", ] [dependency-groups] diff --git a/python/uv.lock b/python/uv.lock index a7fd5e7fc15..a415199d7b4 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -115,7 +115,7 @@ wheels = [ [[package]] name = "agent-framework" -version = "1.8.1" +version = "1.9.0" source = { virtual = "." } dependencies = [ { name = "agent-framework-core", extra = ["all"], marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -185,7 +185,7 @@ requires-dist = [ [[package]] name = "agent-framework-ag-ui" -version = "1.0.0rc4" +version = "1.0.0rc5" source = { editable = "packages/ag-ui" } dependencies = [ { name = "ag-ui-protocol", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -213,7 +213,7 @@ provides-extras = ["dev"] [[package]] name = "agent-framework-anthropic" -version = "1.0.0b260604" +version = "1.0.0b260618" source = { editable = "packages/anthropic" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -243,7 +243,7 @@ requires-dist = [ [[package]] name = "agent-framework-azure-contentunderstanding" -version = "1.0.0a260521" +version = "1.0.0a260618" source = { editable = "packages/azure-contentunderstanding" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -363,7 +363,7 @@ requires-dist = [ [[package]] name = "agent-framework-core" -version = "1.8.1" +version = "1.9.0" source = { editable = "packages/core" } dependencies = [ { name = "opentelemetry-api", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -401,6 +401,11 @@ all = [ { name = "mcp", extra = ["ws"], marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] +[package.dev-dependencies] +dev = [ + { name = "agent-framework-tools", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, +] + [package.metadata] requires-dist = [ { name = "agent-framework-a2a", marker = "extra == 'all'", editable = "packages/a2a" }, @@ -435,9 +440,12 @@ requires-dist = [ ] provides-extras = ["all"] +[package.metadata.requires-dev] +dev = [{ name = "agent-framework-tools", editable = "packages/tools" }] + [[package]] name = "agent-framework-declarative" -version = "1.0.0rc1" +version = "1.0.0rc2" source = { editable = "packages/declarative" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -529,7 +537,7 @@ dev = [{ name = "types-python-dateutil", specifier = "==2.9.0.20260518" }] [[package]] name = "agent-framework-foundry" -version = "1.8.1" +version = "1.8.2" source = { editable = "packages/foundry" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -550,7 +558,7 @@ requires-dist = [ [[package]] name = "agent-framework-foundry-hosting" -version = "1.0.0a260609" +version = "1.0.0a260618" source = { editable = "packages/foundry_hosting" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -776,7 +784,7 @@ requires-dist = [ [[package]] name = "agent-framework-openai" -version = "1.8.1" +version = "1.8.2" source = { editable = "packages/openai" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -791,7 +799,7 @@ requires-dist = [ [[package]] name = "agent-framework-orchestrations" -version = "1.0.0rc3" +version = "1.0.0" source = { editable = "packages/orchestrations" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },