Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion TRANSPARENCY_FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Microsoft Agent Framework relies on existing LLMs. Using the framework retains c

**Framework-Specific Limitations**:

- **Platform Requirements**: Python 3.11–3.15 supported, subject to [integration-specific limits](python/README.md#python-315-limitations); Python 3.10 installation remains permitted, but compatibility is not guaranteed. Specific .NET versions (.NET 8.0, 9.0, 10.0, netstandard2.0, net472)
- **Platform Requirements**: Python 3.11–3.15 required, subject to [integration-specific limits](python/README.md#python-315-limitations). Specific .NET versions (.NET 8.0, 9.0, 10.0, netstandard2.0, net472)
- **API Dependencies**: Requires proper configuration of LLM provider keys and endpoints
- **Orchestration Features**: Advanced orchestration patterns including GroupChat, Sequential, and Concurrent workflows are now available in both Python and .NET implementations. See the respective language documentation for examples.
- **Privacy and Data Protection**: The framework allows for human participation in conversations between agents. It is important to ensure that user data and conversations are protected and that developers use appropriate measures to safeguard privacy.
Expand Down
4 changes: 2 additions & 2 deletions python/.github/skills/python-code-quality/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Following the "too many type checkers" approach, type checkers are split by targ
## Ruff Configuration

- Line length: 120
- Target: Python 3.10+
- Target: Python 3.11+
- Auto-fix enabled
- Rules: ASYNC, B, CPY, D, E, ERA, F, FIX, I, INP, ISC, Q, RET, RSE, RUF, SIM, T20, TD, W, T100, S
- Scripts directory is excluded from checks
Expand All @@ -125,7 +125,7 @@ Following the "too many type checkers" approach, type checkers are split by targ
excludes tests, samples, .venv, packages/devui/frontend.
- **Tests**: relaxed `basic` profile (`pyrightconfig.tests.json`) — private import/usage and
not-required TypedDict access allowed; runs as the `pyright` checker in `test-typing`.
- **Samples**: relaxed `basic` profile (`pyrightconfig.samples.json`, with a py310 variant) —
- **Samples**: relaxed `basic` profile (`pyrightconfig.samples.json`) —
runs as the `pyright` checker in `test-typing -S`.

## Parallel Execution
Expand Down
2 changes: 1 addition & 1 deletion python/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repos:
hooks:
- id: pyupgrade
name: Upgrade Python syntax
args: [--py310-plus]
args: [--py311-plus]
exclude: ^packages/lab/cookiecutter-agent-framework-lab/
- repo: local
hooks:
Expand Down
1 change: 0 additions & 1 deletion python/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@
{
"type": "pickString",
"options": [
"3.10",
"3.11",
"3.12",
"3.13",
Expand Down
2 changes: 1 addition & 1 deletion python/CODING_STANDARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ When principles compete, use this order:

## Tool-Enforced Style

Ruff is the formatter and linter. The current configuration uses a 120-character line length and targets Python 3.10
Ruff is the formatter and linter. The current configuration uses a 120-character line length and targets Python 3.11
or later. `pyproject.toml` and the other tool configuration files are the source of truth for exact values and enabled
rules.

Expand Down
11 changes: 3 additions & 8 deletions python/DEV_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,16 @@ uv run poe install
uv run poe prek-install
```

Python 3.10 is no longer supported because it has reached upstream end of life.
Package metadata still permits Python 3.10 installation, but CI no longer runs
unit or integration tests on it and compatibility is not guaranteed. Use
Python 3.11–3.15 for supported development environments, subject to the
workspace and integration-specific limits below.
Python 3.11 or later is required. Use Python 3.11–3.15 for supported development
environments, subject to the workspace and integration-specific limits below.

The checked-in root workspace lock supports the common Python 3.11–3.14
development range. CI validates the Python 3.15 boundary by temporarily
excluding workspace packages whose own Python constraints do not cover that
version; see `.github/actions/python-setup/action.yml`. For local work
specifically targeting Python 3.15, use an isolated package-scoped environment
or the corresponding CI lane rather than expecting the frozen full-workspace
install above to resolve unchanged. Python 3.10 unit and integration tests no
longer run in CI; use an isolated package-scoped environment for unsupported
compatibility work.
install above to resolve unchanged.

Alternatively, you can reinstall the venv, packages, dependencies and prek
hooks with a single command. Poe is part of the cross-version development
Expand Down
7 changes: 2 additions & 5 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@ Supported Platforms:
- Python: 3.11–3.15
- OS: Windows, macOS, Linux

Python 3.10 is no longer supported because it has reached upstream end of life.
Package metadata still permits Python 3.10 installation, but CI no longer runs
unit or integration tests on it and compatibility is not guaranteed. Use
Python 3.11–3.15 for supported environments, subject to integration-specific
limits below. Raising the installation minimum will be handled separately.
Python 3.11 or later is required. Supported environments are subject to the
integration-specific limits below.

### Python 3.15 limitations

Expand Down
10 changes: 4 additions & 6 deletions python/agent_framework_meta/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Copyright (c) Microsoft. All rights reserved.

from __future__ import annotations

import tomllib as _toml
from importlib import metadata as _metadata
from pathlib import Path as _Path
from typing import Any, cast

try:
import tomllib as _toml # type: ignore # Python 3.11+
except ModuleNotFoundError: # Python 3.10
import tomli as _toml # type: ignore


def _load_pyproject() -> dict[str, Any]:
pyproject = (_Path(__file__).resolve().parents[1] / "pyproject.toml").read_text("utf-8")
return cast(dict[str, Any], _toml.loads(pyproject)) # type: ignore
return _toml.loads(pyproject)


def _version() -> str:
Expand Down
4 changes: 2 additions & 2 deletions python/devsetup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
uv python install 3.10 3.11 3.12 3.13
# Create a virtual environment with Python 3.10 (you can change this to 3.11, 3.12 or 3.13)
uv python install 3.11 3.12 3.13 3.14 3.15
# Create a virtual environment with a supported Python version.
PYTHON_VERSION="3.13"
uv venv --python $PYTHON_VERSION
# Install AF and all dependencies
Expand Down
8 changes: 1 addition & 7 deletions python/packages/a2a/agent_framework_a2a/_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

import base64
import json
import sys
import uuid
import warnings
from collections.abc import AsyncIterable, Awaitable, Mapping, Sequence
from http.cookiejar import CookieJar, DefaultCookiePolicy
from typing import Any, Final, Literal, TypeAlias, cast, overload
from typing import Any, Final, Literal, TypeAlias, TypedDict, cast, overload

import httpx
from a2a.client import Client, ClientConfig, ClientFactory, minimal_agent_card
Expand Down Expand Up @@ -54,11 +53,6 @@
from ._feature_usage import FeatureIndex
from ._utils import AGENT_FRAMEWORK_METADATA_KEY, get_uri_data

if sys.version_info >= (3, 11):
from typing import TypedDict # pragma: no cover
else:
from typing_extensions import TypedDict # pragma: no cover

_A2A_METADATA_KEY: Final = "a2a"
_LEGACY_A2A_METADATA_KEY: Final = "a2a_metadata"

Expand Down
4 changes: 2 additions & 2 deletions python/packages/a2a/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "agent-framework-a2a"
description = "A2A integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
version = "1.0.0b261030"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
Expand Down Expand Up @@ -71,7 +71,7 @@ include = ["agent_framework_a2a"]
[tool.mypy]
plugins = ['pydantic.mypy']
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
no_implicit_optional = true
Expand Down
1 change: 0 additions & 1 deletion python/packages/ag-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pip install agent-framework-ag-ui
```

The base package and optional A2UI integration support Python 3.11–3.15.
Python 3.10 installation remains permitted, but compatibility is not guaranteed.

Install the optional A2UI integration with:

Expand Down
6 changes: 1 addition & 5 deletions python/packages/ag-ui/agent_framework_ag_ui/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import warnings
from binascii import Error as BinasciiError
from collections.abc import AsyncIterable, Awaitable, Mapping, Sequence
from typing import TYPE_CHECKING, Any, Generic, TypedDict, cast
from typing import TYPE_CHECKING, Any, Generic, Self, TypedDict, cast

import httpx
from agent_framework import (
Expand Down Expand Up @@ -44,10 +44,6 @@
from typing import override # pragma: no cover
else:
from typing_extensions import override # pragma: no cover
if sys.version_info >= (3, 11):
from typing import Self, TypedDict # pragma: no cover
else:
from typing_extensions import Self, TypedDict # pragma: no cover

if TYPE_CHECKING:
from agent_framework._middleware import ChatAndFunctionMiddlewareTypes
Expand Down
4 changes: 2 additions & 2 deletions python/packages/ag-ui/agent_framework_ag_ui/_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ async def produce_events() -> None:
reader_started.wait(),
timeout=_DETACHED_READER_START_TIMEOUT_SECONDS,
)
except asyncio.TimeoutError:
except TimeoutError:
reader_abandoned.set()
async for frame in event_generator():
if reader_abandoned.is_set():
Expand Down Expand Up @@ -459,7 +459,7 @@ async def expire_abandoned_run() -> None:
asyncio.shield(producer_task),
timeout=detached_run_timeout_seconds,
)
except asyncio.TimeoutError:
except TimeoutError:
logger.error(
"[%s] Detached run exceeded %.1f seconds after reader disconnect; cancelling",
path,
Expand Down
7 changes: 1 addition & 6 deletions python/packages/ag-ui/agent_framework_ag_ui/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from __future__ import annotations

import sys
from typing import Annotated, Any, Generic
from typing import Annotated, Any, Generic, TypedDict

from ag_ui.core import Interrupt, ResumeEntry
from agent_framework import ChatOptions
Expand All @@ -15,11 +15,6 @@
from typing import TypeVar # pragma: no cover
else:
from typing_extensions import TypeVar # pragma: no cover
if sys.version_info >= (3, 11):
from typing import TypedDict # pragma: no cover
else:
from typing_extensions import TypedDict # pragma: no cover


AGUIChatOptionsT = TypeVar("AGUIChatOptionsT", bound=TypedDict, default="AGUIChatOptions", covariant=True) # type: ignore[valid-type]
ResponseModelT = TypeVar("ResponseModelT", bound=BaseModel | None, default=None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
from typing import TypeVar # pragma: no cover
else:
from typing_extensions import TypeVar # pragma: no cover
if sys.version_info >= (3, 11):
from typing import TypedDict # pragma: no cover
else:
from typing_extensions import TypedDict # pragma: no cover

if TYPE_CHECKING:
from agent_framework import ChatOptions
Expand Down
2 changes: 1 addition & 1 deletion python/packages/ag-ui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "AG-UI protocol integration for Agent Framework"
readme = "README.md"
license-files = ["LICENSE"]
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
requires-python = ">=3.10"
requires-python = ">=3.11"
urls.homepage = "https://aka.ms/agent-framework"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
urls.release_notes = "https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true"
Expand Down
2 changes: 1 addition & 1 deletion python/packages/ag-ui/tests/ag_ui/test_ag_ui_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ def assert_first_chunk_only() -> None:

try:
if close_mode == "explicit_close":
# Keep pull and close in one task; wait_for creates a child task on Python 3.10/3.11.
# Keep pull and close in one task; wait_for creates a child task on Python 3.11.
first = await anext(stream)
assert isinstance(first, (ChatResponseUpdate, AgentResponseUpdate))
assert first.text == "first"
Expand Down
3 changes: 1 addition & 2 deletions python/packages/ag-ui/tests/ag_ui/test_approval_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
from concurrent.futures import ThreadPoolExecutor
from threading import Barrier
from time import sleep
from typing import cast
from typing import Self, cast

import pytest
from typing_extensions import Self

from agent_framework_ag_ui._approval_lifecycle import ApprovalCapacityError, ApprovalExecutionOwner
from agent_framework_ag_ui._approval_state import InMemoryAGUIApprovalStateStore, approval_state_thread_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@

from ._feature_usage import FeatureIndex

if sys.version_info >= (3, 11):
from typing import TypedDict # pragma: no cover
else:
from typing_extensions import TypedDict # pragma: no cover
if sys.version_info >= (3, 13):
from typing import TypeVar # pragma: no cover
else:
Expand Down
4 changes: 2 additions & 2 deletions python/packages/anthropic/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "agent-framework-anthropic"
description = "Anthropic integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
version = "1.0.0b261030"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
Expand Down Expand Up @@ -76,7 +76,7 @@ exclude = ['tests']
[tool.mypy]
plugins = ['pydantic.mypy']
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
no_implicit_optional = true
Expand Down
3 changes: 1 addition & 2 deletions python/packages/azure-ai-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ All three classes are available from `agent_framework.azure` or

## Installation

Supports Python 3.11–3.15. Python 3.10 installation remains permitted,
but compatibility is not guaranteed.
Supports Python 3.11–3.15.

```bash
pip install agent-framework-azure-ai-search --pre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
import importlib.metadata
import inspect
import logging
import sys
from collections.abc import Awaitable, Callable, Sequence
from typing import TYPE_CHECKING, Any, ClassVar, Literal, TypedDict, overload
from typing import TYPE_CHECKING, Any, ClassVar, Literal, Self, TypedDict, overload

from agent_framework import (
AgentSession,
Expand Down Expand Up @@ -70,10 +69,6 @@
KnowledgeRetrievalMinimalReasoningEffort as KBRetrievalMinimalReasoningEffort,
)

if sys.version_info >= (3, 11):
from typing import Self # pragma: no cover
else:
from typing_extensions import Self # pragma: no cover

# Runtime imports for agentic mode. Core knowledge base retrieval works on both the
# stable/GA SDK (api-version 2026-04-01) and the preview SDK (api-version
Expand Down
4 changes: 2 additions & 2 deletions python/packages/azure-ai-search/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "agent-framework-azure-ai-search"
description = "Azure AI Search integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
version = "1.0.0b261030"
license-files = ["LICENSE"]
urls.homepage = "https://aka.ms/agent-framework"
Expand Down Expand Up @@ -71,7 +71,7 @@ exclude = ['tests']
[tool.mypy]
plugins = ['pydantic.mypy']
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
no_implicit_optional = true
Expand Down
Loading
Loading