Skip to content

Commit 45a7f0b

Browse files
release: 0.5.0 (#7)
* chore: bump `httpx-aiohttp` version to 0.1.9 * fix(client): close streams without requiring full consumption * chore(internal/tests): avoid race condition with implicit client cleanup * chore(internal): grammar fix (it's -> its) * feat(api): manual updates added agents * release: 0.5.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent aee5ce6 commit 45a7f0b

16 files changed

Lines changed: 311 additions & 179 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.4.0"
2+
".": "0.5.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 3
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/agentbase%2Fagentbase-461274f650eccdf115b96ee1dbf1c0d4eb31485992cedc84ee0187aec72d63a5.yml
3-
openapi_spec_hash: b8fa5fd0c89d9004d608af6061d0bf28
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/agentbase%2Fagentbase-c12be3e0fb0d0456a9dfdb9ba32d89ef3ffcd3561e945b22aff45ead12453358.yml
3+
openapi_spec_hash: fea6f0cc71a01188f51a84d6a7ba7258
44
config_hash: 8d9b688cf969a1760b1300b65b80e796

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 0.5.0 (2025-11-06)
4+
5+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/AgentbaseHQ/agentbase-python/compare/v0.4.0...v0.5.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([bd37cc0](https://github.com/AgentbaseHQ/agentbase-python/commit/bd37cc02bc033ed9a02a0fe412304620b1312884))
10+
11+
12+
### Bug Fixes
13+
14+
* **client:** close streams without requiring full consumption ([600e68b](https://github.com/AgentbaseHQ/agentbase-python/commit/600e68b0722c43c174af329d83a866dba0e62e7c))
15+
16+
17+
### Chores
18+
19+
* bump `httpx-aiohttp` version to 0.1.9 ([1a2887c](https://github.com/AgentbaseHQ/agentbase-python/commit/1a2887c6b9db2682267a3a28999227c3f5d857de))
20+
* **internal/tests:** avoid race condition with implicit client cleanup ([c01d166](https://github.com/AgentbaseHQ/agentbase-python/commit/c01d166af2db0d272a571f244c088ff3dcd91bed))
21+
* **internal:** grammar fix (it's -&gt; its) ([e501e14](https://github.com/AgentbaseHQ/agentbase-python/commit/e501e1463942a61a8eea51fb86e83ed56cb76b59))
22+
323
## 0.4.0 (2025-10-11)
424

525
Full Changelog: [v0.3.1...v0.4.0](https://github.com/AgentbaseHQ/agentbase-python/compare/v0.3.1...v0.4.0)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentbase-sdk"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
description = "The official Python library for the agentbase API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -39,7 +39,7 @@ Homepage = "https://github.com/AgentbaseHQ/agentbase-python"
3939
Repository = "https://github.com/AgentbaseHQ/agentbase-python"
4040

4141
[project.optional-dependencies]
42-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
42+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
4343

4444
[tool.rye]
4545
managed = true

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ httpx==0.28.1
5656
# via agentbase-sdk
5757
# via httpx-aiohttp
5858
# via respx
59-
httpx-aiohttp==0.1.8
59+
httpx-aiohttp==0.1.9
6060
# via agentbase-sdk
6161
idna==3.4
6262
# via anyio

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ httpcore==1.0.9
4343
httpx==0.28.1
4444
# via agentbase-sdk
4545
# via httpx-aiohttp
46-
httpx-aiohttp==0.1.8
46+
httpx-aiohttp==0.1.9
4747
# via agentbase-sdk
4848
idna==3.4
4949
# via anyio

src/agentbase/_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ def run_agent(
202202
*,
203203
message: str,
204204
session: str | Omit = omit,
205+
agents: Iterable[client_run_agent_params.Agent] | Omit = omit,
205206
background: bool | Omit = omit,
206207
callback: client_run_agent_params.Callback | Omit = omit,
207208
datastores: Iterable[client_run_agent_params.Datastore] | Omit = omit,
@@ -236,6 +237,10 @@ def run_agent(
236237
session: The session ID to continue the agent session conversation. If not provided, a
237238
new session will be created.
238239
240+
agents: A set of agent configurations that enables the agent to transfer conversations
241+
to other specialized agents. When provided, the main agent will have access to
242+
seamless handoffs between agents based on the conversation context.
243+
239244
background: Whether to run the agent asynchronously on the server. When set to true, use
240245
callback parameter to receive events.
241246
@@ -282,6 +287,7 @@ def run_agent(
282287
body=maybe_transform(
283288
{
284289
"message": message,
290+
"agents": agents,
285291
"background": background,
286292
"callback": callback,
287293
"datastores": datastores,
@@ -483,6 +489,7 @@ async def run_agent(
483489
*,
484490
message: str,
485491
session: str | Omit = omit,
492+
agents: Iterable[client_run_agent_params.Agent] | Omit = omit,
486493
background: bool | Omit = omit,
487494
callback: client_run_agent_params.Callback | Omit = omit,
488495
datastores: Iterable[client_run_agent_params.Datastore] | Omit = omit,
@@ -517,6 +524,10 @@ async def run_agent(
517524
session: The session ID to continue the agent session conversation. If not provided, a
518525
new session will be created.
519526
527+
agents: A set of agent configurations that enables the agent to transfer conversations
528+
to other specialized agents. When provided, the main agent will have access to
529+
seamless handoffs between agents based on the conversation context.
530+
520531
background: Whether to run the agent asynchronously on the server. When set to true, use
521532
callback parameter to receive events.
522533
@@ -563,6 +574,7 @@ async def run_agent(
563574
body=await async_maybe_transform(
564575
{
565576
"message": message,
577+
"agents": agents,
566578
"background": background,
567579
"callback": callback,
568580
"datastores": datastores,

src/agentbase/_streaming.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]:
5757
for sse in iterator:
5858
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
5959

60-
# Ensure the entire stream is consumed
61-
for _sse in iterator:
62-
...
60+
# As we might not fully consume the response stream, we need to close it explicitly
61+
response.close()
6362

6463
def __enter__(self) -> Self:
6564
return self
@@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]:
121120
async for sse in iterator:
122121
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
123122

124-
# Ensure the entire stream is consumed
125-
async for _sse in iterator:
126-
...
123+
# As we might not fully consume the response stream, we need to close it explicitly
124+
await response.aclose()
127125

128126
async def __aenter__(self) -> Self:
129127
return self

src/agentbase/_utils/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
133133
# Type safe methods for narrowing types with TypeVars.
134134
# The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
135135
# however this cause Pyright to rightfully report errors. As we know we don't
136-
# care about the contained types we can safely use `object` in it's place.
136+
# care about the contained types we can safely use `object` in its place.
137137
#
138138
# There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
139139
# `is_*` is for when you're dealing with an unknown input

src/agentbase/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "agentbase"
4-
__version__ = "0.4.0" # x-release-please-version
4+
__version__ = "0.5.0" # x-release-please-version

0 commit comments

Comments
 (0)