agent-framework 1.23.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agent-framework
3
- Version: 1.23.0
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.23.0
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.10–3.15
67
+ - Python: 3.11–3.15
69
68
  - OS: Windows, macOS, Linux
70
69
 
71
- Python 3.10 remains supported and tested for this release, but it is deprecated
72
- because upstream Python 3.10 has reached end of life. New environments should
73
- use Python 3.11 or later. A future Agent Framework release will raise the
74
- minimum version separately; this release does not remove Python 3.10 from
75
- package metadata or CI.
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
 
@@ -184,6 +183,46 @@ async def main():
184
183
  asyncio.run(main())
185
184
  ```
186
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
+
187
226
  ## 4. Build an Agent with Tools and Functions
188
227
 
189
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.10–3.15
42
+ - Python: 3.11–3.15
43
43
  - OS: Windows, macOS, Linux
44
44
 
45
- Python 3.10 remains supported and tested for this release, but it is deprecated
46
- because upstream Python 3.10 has reached end of life. New environments should
47
- use Python 3.11 or later. A future Agent Framework release will raise the
48
- minimum version separately; this release does not remove Python 3.10 from
49
- package metadata or CI.
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
 
@@ -158,6 +158,46 @@ async def main():
158
158
  asyncio.run(main())
159
159
  ```
160
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
+
161
201
  ## 4. Build an Agent with Tools and Functions
162
202
 
163
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.23.0"
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,7 +23,7 @@ classifiers = [
24
23
  "Typing :: Typed",
25
24
  ]
26
25
  dependencies = [
27
- "agent-framework-core[all]==1.23.0",
26
+ "agent-framework-core[all]==1.24.0",
28
27
  ]
29
28
 
30
29
  [dependency-groups]
@@ -39,7 +38,7 @@ dev = [
39
38
  "azure-monitor-opentelemetry>=1.8.10,<2",
40
39
  "mcp",
41
40
  # Optional SDK used by the agent-hooks tests and isolated source checks.
42
- "agent-hooks-sdk>=0.1.0a4,<0.2",
41
+ "agent-hooks-sdk>=0.1.0b2,<0.2",
43
42
  "opentelemetry-sdk",
44
43
  # Task runtime used by every supported Python version.
45
44
  "poethepoet==0.49.0",
@@ -108,6 +107,7 @@ agent-framework-mem0 = { workspace = true }
108
107
  agent-framework-mistral = { workspace = true }
109
108
  agent-framework-mongodb = { workspace = true }
110
109
  agent-framework-monty = { workspace = true }
110
+ agent-framework-nvidia = { workspace = true }
111
111
  agent-framework-ollama = { workspace = true }
112
112
  agent-framework-openai = { workspace = true }
113
113
  agent-framework-oracle = { workspace = true }
@@ -354,10 +354,6 @@ sequence = [
354
354
  ]
355
355
  args = [{ name = "project", default = "*", options = ["-P", "--package"] }]
356
356
 
357
- [tool.poe.tasks.publish]
358
- help = "Publish built distributions with uv."
359
- cmd = "uv publish"
360
-
361
357
  # Dependency maintenance
362
358
  [tool.poe.tasks.upgrade-dev-dependency-pins]
363
359
  help = "Repin exact workspace development dependencies and on-demand tool requirements."
@@ -389,6 +385,14 @@ help = "Run the exhaustive workspace dependency-bound test+typing matrix, option
389
385
  shell = "python -m scripts.dependencies.validate_dependency_bounds --mode test --package \"$project\""
390
386
  args = [{ name = "project", default = "*", options = ["-P", "--package"] }]
391
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
+
392
396
  [tool.poe.tasks.validate-python-release]
393
397
  help = "Refresh uv.lock, then run lower/upper import probes for changed package metadata on each package closure's minimum Python."
394
398
  executor = "simple"