agent-framework 1.22.0__tar.gz → 1.24.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agent_framework-1.22.0 → agent_framework-1.24.0}/PKG-INFO +48 -11
- {agent_framework-1.22.0 → agent_framework-1.24.0}/README.md +46 -8
- {agent_framework-1.22.0 → agent_framework-1.24.0}/pyproject.toml +23 -14
- {agent_framework-1.22.0 → agent_framework-1.24.0}/LICENSE +0 -0
- {agent_framework-1.22.0 → agent_framework-1.24.0}/agent_framework_meta/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agent-framework
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.24.0
|
|
4
4
|
Summary: Microsoft Agent Framework for building AI Agents with Python. This package contains core and a curated set of optional integrations.
|
|
5
5
|
Author-email: Microsoft <af-support@microsoft.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -9,7 +9,6 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -17,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.15
|
|
18
17
|
Classifier: Typing :: Typed
|
|
19
18
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: agent-framework-core[all]==1.
|
|
19
|
+
Requires-Dist: agent-framework-core[all]==1.24.0
|
|
21
20
|
Project-URL: homepage, https://aka.ms/agent-framework
|
|
22
21
|
Project-URL: issues, https://github.com/microsoft/agent-framework/issues
|
|
23
22
|
Project-URL: release_notes, https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true
|
|
@@ -65,14 +64,14 @@ This selective approach is useful when you know which integrations you need, and
|
|
|
65
64
|
|
|
66
65
|
Supported Platforms:
|
|
67
66
|
|
|
68
|
-
- Python: 3.
|
|
67
|
+
- Python: 3.11–3.15
|
|
69
68
|
- OS: Windows, macOS, Linux
|
|
70
69
|
|
|
71
|
-
Python 3.10
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
Python 3.10 is no longer supported because it has reached upstream end of life.
|
|
71
|
+
Package metadata still permits Python 3.10 installation, but CI no longer runs
|
|
72
|
+
unit or integration tests on it and compatibility is not guaranteed. Use
|
|
73
|
+
Python 3.11–3.15 for supported environments, subject to integration-specific
|
|
74
|
+
limits below. Raising the installation minimum will be handled separately.
|
|
76
75
|
|
|
77
76
|
### Python 3.15 limitations
|
|
78
77
|
|
|
@@ -83,8 +82,6 @@ not provide exactly the same feature set as Python 3.14:
|
|
|
83
82
|
| --- | --- |
|
|
84
83
|
| Declarative Power Fx | `agent-framework-declarative` is installed, but its `powerfx` dependency is not. YAML values beginning with `=` produce a warning and remain unchanged instead of being evaluated. Declarative agents or workflows that rely on expressions may therefore use invalid literal values or fail later. |
|
|
85
84
|
| Redis | `agent-framework-redis` is omitted from the standard install because RedisVL declares `Requires-Python <3.15`. Redis imports and Redis-backed history, context, and vector storage are unavailable. |
|
|
86
|
-
| Hyperlight | `agent-framework-hyperlight` is omitted because no compatible Python 3.15 sandbox backend wheel is published. Hyperlight CodeAct and its `execute_code` tool are unavailable. |
|
|
87
|
-
| AG-UI A2UI | The base `agent-framework-ag-ui` package works, but pip cannot install its optional `a2ui` extra because `ag-ui-a2ui-toolkit` declares `Requires-Python <3.15`. |
|
|
88
85
|
|
|
89
86
|
## 1. Setup API Keys
|
|
90
87
|
|
|
@@ -186,6 +183,46 @@ async def main():
|
|
|
186
183
|
asyncio.run(main())
|
|
187
184
|
```
|
|
188
185
|
|
|
186
|
+
### Connection and credential lifetimes
|
|
187
|
+
|
|
188
|
+
Chat clients support async context managers for deterministic cleanup:
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
from agent_framework import Agent, Message
|
|
192
|
+
from agent_framework.openai import OpenAIChatClient
|
|
193
|
+
|
|
194
|
+
async with OpenAIChatClient() as client:
|
|
195
|
+
response = await client.get_response([Message("user", ["Hello!"])])
|
|
196
|
+
|
|
197
|
+
# Alternatively, let the agent enter and exit its chat client's context.
|
|
198
|
+
async with Agent(client=OpenAIChatClient(), instructions="Be helpful.") as agent:
|
|
199
|
+
response = await agent.run("Hello!")
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Calling clients without a context manager remains supported; use `await client.close()` when finished.
|
|
203
|
+
Context exit releases connections created by the connector, including on exceptions. Caller-supplied SDK clients,
|
|
204
|
+
HTTP transports, and credentials remain caller-owned. In particular, closing an Azure SDK connection does not
|
|
205
|
+
close the credential supplied to it. Scope credentials outside the agent or client that uses them:
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
from azure.identity.aio import AzureCliCredential
|
|
209
|
+
|
|
210
|
+
async with AzureCliCredential() as credential:
|
|
211
|
+
async with OpenAIChatClient(
|
|
212
|
+
azure_endpoint="https://YOUR-RESOURCE.openai.azure.com",
|
|
213
|
+
model="YOUR-DEPLOYMENT",
|
|
214
|
+
credential=credential,
|
|
215
|
+
) as client:
|
|
216
|
+
response = await client.get_response([Message("user", ["Hello!"])])
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Treat closing a resource-owning client as the end of its lifetime; reopening is SDK-dependent. Avoid overlapping
|
|
220
|
+
agent contexts sharing a connector-owned connection, since exiting either agent closes that connection. To share
|
|
221
|
+
an SDK client across agents, inject it into their chat clients and manage its lifetime outside those agent contexts.
|
|
222
|
+
`BaseChatClient` provides default context methods and a no-op `close()`, so custom subclasses do not need to
|
|
223
|
+
implement lifecycle methods unless they own resources. Protocol-only chat clients do not need context methods.
|
|
224
|
+
Inherited context exit also supports existing subclasses whose `close()` is synchronous.
|
|
225
|
+
|
|
189
226
|
## 4. Build an Agent with Tools and Functions
|
|
190
227
|
|
|
191
228
|
Enhance your agent with custom tools and function calling:
|
|
@@ -39,14 +39,14 @@ This selective approach is useful when you know which integrations you need, and
|
|
|
39
39
|
|
|
40
40
|
Supported Platforms:
|
|
41
41
|
|
|
42
|
-
- Python: 3.
|
|
42
|
+
- Python: 3.11–3.15
|
|
43
43
|
- OS: Windows, macOS, Linux
|
|
44
44
|
|
|
45
|
-
Python 3.10
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
Python 3.10 is no longer supported because it has reached upstream end of life.
|
|
46
|
+
Package metadata still permits Python 3.10 installation, but CI no longer runs
|
|
47
|
+
unit or integration tests on it and compatibility is not guaranteed. Use
|
|
48
|
+
Python 3.11–3.15 for supported environments, subject to integration-specific
|
|
49
|
+
limits below. Raising the installation minimum will be handled separately.
|
|
50
50
|
|
|
51
51
|
### Python 3.15 limitations
|
|
52
52
|
|
|
@@ -57,8 +57,6 @@ not provide exactly the same feature set as Python 3.14:
|
|
|
57
57
|
| --- | --- |
|
|
58
58
|
| Declarative Power Fx | `agent-framework-declarative` is installed, but its `powerfx` dependency is not. YAML values beginning with `=` produce a warning and remain unchanged instead of being evaluated. Declarative agents or workflows that rely on expressions may therefore use invalid literal values or fail later. |
|
|
59
59
|
| Redis | `agent-framework-redis` is omitted from the standard install because RedisVL declares `Requires-Python <3.15`. Redis imports and Redis-backed history, context, and vector storage are unavailable. |
|
|
60
|
-
| Hyperlight | `agent-framework-hyperlight` is omitted because no compatible Python 3.15 sandbox backend wheel is published. Hyperlight CodeAct and its `execute_code` tool are unavailable. |
|
|
61
|
-
| AG-UI A2UI | The base `agent-framework-ag-ui` package works, but pip cannot install its optional `a2ui` extra because `ag-ui-a2ui-toolkit` declares `Requires-Python <3.15`. |
|
|
62
60
|
|
|
63
61
|
## 1. Setup API Keys
|
|
64
62
|
|
|
@@ -160,6 +158,46 @@ async def main():
|
|
|
160
158
|
asyncio.run(main())
|
|
161
159
|
```
|
|
162
160
|
|
|
161
|
+
### Connection and credential lifetimes
|
|
162
|
+
|
|
163
|
+
Chat clients support async context managers for deterministic cleanup:
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
from agent_framework import Agent, Message
|
|
167
|
+
from agent_framework.openai import OpenAIChatClient
|
|
168
|
+
|
|
169
|
+
async with OpenAIChatClient() as client:
|
|
170
|
+
response = await client.get_response([Message("user", ["Hello!"])])
|
|
171
|
+
|
|
172
|
+
# Alternatively, let the agent enter and exit its chat client's context.
|
|
173
|
+
async with Agent(client=OpenAIChatClient(), instructions="Be helpful.") as agent:
|
|
174
|
+
response = await agent.run("Hello!")
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Calling clients without a context manager remains supported; use `await client.close()` when finished.
|
|
178
|
+
Context exit releases connections created by the connector, including on exceptions. Caller-supplied SDK clients,
|
|
179
|
+
HTTP transports, and credentials remain caller-owned. In particular, closing an Azure SDK connection does not
|
|
180
|
+
close the credential supplied to it. Scope credentials outside the agent or client that uses them:
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
from azure.identity.aio import AzureCliCredential
|
|
184
|
+
|
|
185
|
+
async with AzureCliCredential() as credential:
|
|
186
|
+
async with OpenAIChatClient(
|
|
187
|
+
azure_endpoint="https://YOUR-RESOURCE.openai.azure.com",
|
|
188
|
+
model="YOUR-DEPLOYMENT",
|
|
189
|
+
credential=credential,
|
|
190
|
+
) as client:
|
|
191
|
+
response = await client.get_response([Message("user", ["Hello!"])])
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Treat closing a resource-owning client as the end of its lifetime; reopening is SDK-dependent. Avoid overlapping
|
|
195
|
+
agent contexts sharing a connector-owned connection, since exiting either agent closes that connection. To share
|
|
196
|
+
an SDK client across agents, inject it into their chat clients and manage its lifetime outside those agent contexts.
|
|
197
|
+
`BaseChatClient` provides default context methods and a no-op `close()`, so custom subclasses do not need to
|
|
198
|
+
implement lifecycle methods unless they own resources. Protocol-only chat clients do not need context methods.
|
|
199
|
+
Inherited context exit also supports existing subclasses whose `close()` is synchronous.
|
|
200
|
+
|
|
163
201
|
## 4. Build an Agent with Tools and Functions
|
|
164
202
|
|
|
165
203
|
Enhance your agent with custom tools and function calling:
|
|
@@ -4,7 +4,7 @@ description = "Microsoft Agent Framework for building AI Agents with Python. Thi
|
|
|
4
4
|
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.24.0"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
urls.homepage = "https://aka.ms/agent-framework"
|
|
10
10
|
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
|
|
@@ -15,7 +15,6 @@ classifiers = [
|
|
|
15
15
|
"Development Status :: 5 - Production/Stable",
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
|
-
"Programming Language :: Python :: 3.10",
|
|
19
18
|
"Programming Language :: Python :: 3.11",
|
|
20
19
|
"Programming Language :: Python :: 3.12",
|
|
21
20
|
"Programming Language :: Python :: 3.13",
|
|
@@ -24,12 +23,12 @@ classifiers = [
|
|
|
24
23
|
"Typing :: Typed",
|
|
25
24
|
]
|
|
26
25
|
dependencies = [
|
|
27
|
-
"agent-framework-core[all]==1.
|
|
26
|
+
"agent-framework-core[all]==1.24.0",
|
|
28
27
|
]
|
|
29
28
|
|
|
30
29
|
[dependency-groups]
|
|
31
30
|
dev = [
|
|
32
|
-
"uv==0.13.
|
|
31
|
+
"uv==0.13.5",
|
|
33
32
|
"pytest==9.1.1",
|
|
34
33
|
"pytest-asyncio==1.4.0",
|
|
35
34
|
"pytest-cov==7.1.0",
|
|
@@ -37,12 +36,12 @@ dev = [
|
|
|
37
36
|
"pytest-timeout==2.4.0",
|
|
38
37
|
"pytest-retry==1.7.0",
|
|
39
38
|
"azure-monitor-opentelemetry>=1.8.10,<2",
|
|
40
|
-
"mcp
|
|
39
|
+
"mcp",
|
|
41
40
|
# Optional SDK used by the agent-hooks tests and isolated source checks.
|
|
42
|
-
"agent-hooks-sdk>=0.1.
|
|
41
|
+
"agent-hooks-sdk>=0.1.0b2,<0.2",
|
|
43
42
|
"opentelemetry-sdk",
|
|
44
43
|
# Task runtime used by every supported Python version.
|
|
45
|
-
"poethepoet==0.
|
|
44
|
+
"poethepoet==0.49.0",
|
|
46
45
|
]
|
|
47
46
|
tool-runtime = [
|
|
48
47
|
"packaging==26.3",
|
|
@@ -50,7 +49,7 @@ tool-runtime = [
|
|
|
50
49
|
'tomli==2.5.0; python_version < "3.11"',
|
|
51
50
|
]
|
|
52
51
|
tool-hooks = [
|
|
53
|
-
"prek==0.5.
|
|
52
|
+
"prek==0.5.7",
|
|
54
53
|
]
|
|
55
54
|
tool-markdown = [
|
|
56
55
|
"pygments==2.21.0",
|
|
@@ -59,9 +58,14 @@ tool-markdown = [
|
|
|
59
58
|
[tool.uv]
|
|
60
59
|
package = false
|
|
61
60
|
prerelease = "if-necessary"
|
|
62
|
-
required-version = "==0.13.
|
|
61
|
+
required-version = "==0.13.5"
|
|
63
62
|
# Security floors for transitive dependencies.
|
|
64
|
-
override-dependencies = [
|
|
63
|
+
override-dependencies = [
|
|
64
|
+
"certifi>=2026.10.19",
|
|
65
|
+
"mcp>=2.2.0,<3",
|
|
66
|
+
"uvicorn[standard]>=0.34.0",
|
|
67
|
+
"python-multipart>=0.0.31",
|
|
68
|
+
]
|
|
65
69
|
environments = [
|
|
66
70
|
"sys_platform == 'darwin'",
|
|
67
71
|
"sys_platform == 'linux'",
|
|
@@ -103,6 +107,7 @@ agent-framework-mem0 = { workspace = true }
|
|
|
103
107
|
agent-framework-mistral = { workspace = true }
|
|
104
108
|
agent-framework-mongodb = { workspace = true }
|
|
105
109
|
agent-framework-monty = { workspace = true }
|
|
110
|
+
agent-framework-nvidia = { workspace = true }
|
|
106
111
|
agent-framework-ollama = { workspace = true }
|
|
107
112
|
agent-framework-openai = { workspace = true }
|
|
108
113
|
agent-framework-oracle = { workspace = true }
|
|
@@ -349,10 +354,6 @@ sequence = [
|
|
|
349
354
|
]
|
|
350
355
|
args = [{ name = "project", default = "*", options = ["-P", "--package"] }]
|
|
351
356
|
|
|
352
|
-
[tool.poe.tasks.publish]
|
|
353
|
-
help = "Publish built distributions with uv."
|
|
354
|
-
cmd = "uv publish"
|
|
355
|
-
|
|
356
357
|
# Dependency maintenance
|
|
357
358
|
[tool.poe.tasks.upgrade-dev-dependency-pins]
|
|
358
359
|
help = "Repin exact workspace development dependencies and on-demand tool requirements."
|
|
@@ -384,6 +385,14 @@ help = "Run the exhaustive workspace dependency-bound test+typing matrix, option
|
|
|
384
385
|
shell = "python -m scripts.dependencies.validate_dependency_bounds --mode test --package \"$project\""
|
|
385
386
|
args = [{ name = "project", default = "*", options = ["-P", "--package"] }]
|
|
386
387
|
|
|
388
|
+
[tool.poe.tasks.prepare-python-release]
|
|
389
|
+
help = "Generate .github/release-<fulltag>.json from version changes against the same base as release validation."
|
|
390
|
+
cmd = "python -m scripts.prepare_release --base-ref ${base_ref} --tag ${tag}"
|
|
391
|
+
args = [
|
|
392
|
+
{ name = "base_ref", options = ["-B", "--base-ref"] },
|
|
393
|
+
{ name = "tag", options = ["--tag"] },
|
|
394
|
+
]
|
|
395
|
+
|
|
387
396
|
[tool.poe.tasks.validate-python-release]
|
|
388
397
|
help = "Refresh uv.lock, then run lower/upper import probes for changed package metadata on each package closure's minimum Python."
|
|
389
398
|
executor = "simple"
|
|
File without changes
|
|
File without changes
|