Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.12.0"
".": "0.12.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 64
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-46769b729d89151fb7e7ae15725678af99f55ef32d283e34a1e143057aa87b23.yml
openapi_spec_hash: 9115c9f283257e0636aba67fadfeda0a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-e48cc9d460e306acf0f98efad4b5cccb793af107d0aaf50af455954d4d943e2d.yml
openapi_spec_hash: 2d85e7026b3f21e81c533d51486c0182
config_hash: 82cb83ac175dbf40265128506294218b
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@

* **tracing:** emit OTel metrics for async span queue depth, batch drain, and SGP export success/failure (HTTP status labels). Disable SDK-side recording with ``AGENTEX_TRACING_METRICS=0``.

## 0.12.1 (2026-06-05)

Full Changelog: [v0.12.0...v0.12.1](https://github.com/scaleapi/scale-agentex-python/compare/v0.12.0...v0.12.1)

### Bug Fixes

* **api:** remove agent_id and task_id parameters from states update method ([a7cbaae](https://github.com/scaleapi/scale-agentex-python/commit/a7cbaae4416e2d712623ecfac5e251c07c537958))


### Documentation

* **api:** clarify name parameter behavior in agent task creation ([ce5af72](https://github.com/scaleapi/scale-agentex-python/commit/ce5af729cc3a0f05905d0cebfe2ef18c16d8563e))
* clarify task name is optional in adk.acp.create_task ([#392](https://github.com/scaleapi/scale-agentex-python/issues/392)) ([bd41d9b](https://github.com/scaleapi/scale-agentex-python/commit/bd41d9bb10f08a354f02f982e6507847c19d2ad9))

## 0.12.0 (2026-06-02)

Full Changelog: [v0.11.9...v0.12.0](https://github.com/scaleapi/scale-agentex-python/compare/v0.11.9...v0.12.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "agentex-sdk"
version = "0.12.0"
version = "0.12.1"
description = "The official Python library for the agentex API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/agentex/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "agentex"
__version__ = "0.12.0" # x-release-please-version
__version__ = "0.12.1" # x-release-please-version
6 changes: 5 additions & 1 deletion src/agentex/lib/adk/_modules/acp.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ async def create_task(
Create a new task.

Args:
name: The name of the task.
name: Optional human-readable name for the task. task/create is
get-or-create by name: omit it (or make it unique, e.g. append a
UUID) for a fresh task on each call; passing a name that already
exists returns that task with its prior history instead of
creating a new one. Keep it globally unique when set.
agent_id: The ID of the agent to create the task for.
agent_name: The name of the agent to create the task for.
params: The parameters for the task.
Expand Down
22 changes: 2 additions & 20 deletions src/agentex/resources/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ def update(
self,
state_id: str,
*,
agent_id: str,
state: Dict[str, object],
task_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -148,14 +146,7 @@ def update(
raise ValueError(f"Expected a non-empty value for `state_id` but received {state_id!r}")
return self._put(
path_template("/states/{state_id}", state_id=state_id),
body=maybe_transform(
{
"agent_id": agent_id,
"state": state,
"task_id": task_id,
},
state_update_params.StateUpdateParams,
),
body=maybe_transform({"state": state}, state_update_params.StateUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -356,9 +347,7 @@ async def update(
self,
state_id: str,
*,
agent_id: str,
state: Dict[str, object],
task_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -382,14 +371,7 @@ async def update(
raise ValueError(f"Expected a non-empty value for `state_id` but received {state_id!r}")
return await self._put(
path_template("/states/{state_id}", state_id=state_id),
body=await async_maybe_transform(
{
"agent_id": agent_id,
"state": state,
"task_id": task_id,
},
state_update_params.StateUpdateParams,
),
body=await async_maybe_transform({"state": state}, state_update_params.StateUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down
14 changes: 12 additions & 2 deletions src/agentex/types/agent_rpc_by_name_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,20 @@ class AgentRpcByNameParams(TypedDict, total=False):

class ParamsCreateTaskRequest(TypedDict, total=False):
name: Optional[str]
"""The name of the task to create"""
"""Optional human-readable name for the task.

When set it must be globally unique. task/create is get-or-create by name:
reusing an existing name returns the existing task (with its prior history)
instead of creating a new one, so omit name (or make it unique, e.g. by
appending a UUID) whenever each call should produce a fresh task.
"""

params: Optional[Dict[str, object]]
"""The parameters for the task"""
"""The parameters for the task.

On a get-or-create by name, providing params overwrites the existing task's
params (it is not a pure read).
"""

task_metadata: Optional[Dict[str, object]]
"""Caller-provided metadata to persist on the task row.
Expand Down
14 changes: 12 additions & 2 deletions src/agentex/types/agent_rpc_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,20 @@ class AgentRpcParams(TypedDict, total=False):

class ParamsCreateTaskRequest(TypedDict, total=False):
name: Optional[str]
"""The name of the task to create"""
"""Optional human-readable name for the task.

When set it must be globally unique. task/create is get-or-create by name:
reusing an existing name returns the existing task (with its prior history)
instead of creating a new one, so omit name (or make it unique, e.g. by
appending a UUID) whenever each call should produce a fresh task.
"""

params: Optional[Dict[str, object]]
"""The parameters for the task"""
"""The parameters for the task.

On a get-or-create by name, providing params overwrites the existing task's
params (it is not a pure read).
"""

task_metadata: Optional[Dict[str, object]]
"""Caller-provided metadata to persist on the task row.
Expand Down
14 changes: 12 additions & 2 deletions src/agentex/types/agents/deployment_preview_rpc_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,20 @@ class DeploymentPreviewRpcParams(TypedDict, total=False):

class ParamsCreateTaskRequest(TypedDict, total=False):
name: Optional[str]
"""The name of the task to create"""
"""Optional human-readable name for the task.

When set it must be globally unique. task/create is get-or-create by name:
reusing an existing name returns the existing task (with its prior history)
instead of creating a new one, so omit name (or make it unique, e.g. by
appending a UUID) whenever each call should produce a fresh task.
"""

params: Optional[Dict[str, object]]
"""The parameters for the task"""
"""The parameters for the task.

On a get-or-create by name, providing params overwrites the existing task's
params (it is not a pure read).
"""

task_metadata: Optional[Dict[str, object]]
"""Caller-provided metadata to persist on the task row.
Expand Down
4 changes: 0 additions & 4 deletions src/agentex/types/state_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@


class StateUpdateParams(TypedDict, total=False):
agent_id: Required[str]

state: Required[Dict[str, object]]

task_id: Required[str]
16 changes: 0 additions & 16 deletions tests/api_resources/test_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ def test_path_params_retrieve(self, client: Agentex) -> None:
def test_method_update(self, client: Agentex) -> None:
state = client.states.update(
state_id="state_id",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
)
assert_matches_type(State, state, path=["response"])

Expand All @@ -116,9 +114,7 @@ def test_method_update(self, client: Agentex) -> None:
def test_raw_response_update(self, client: Agentex) -> None:
response = client.states.with_raw_response.update(
state_id="state_id",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
)

assert response.is_closed is True
Expand All @@ -131,9 +127,7 @@ def test_raw_response_update(self, client: Agentex) -> None:
def test_streaming_response_update(self, client: Agentex) -> None:
with client.states.with_streaming_response.update(
state_id="state_id",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -149,9 +143,7 @@ def test_path_params_update(self, client: Agentex) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `state_id` but received ''"):
client.states.with_raw_response.update(
state_id="",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
)

@pytest.mark.skip(reason="Mock server tests are disabled")
Expand Down Expand Up @@ -330,9 +322,7 @@ async def test_path_params_retrieve(self, async_client: AsyncAgentex) -> None:
async def test_method_update(self, async_client: AsyncAgentex) -> None:
state = await async_client.states.update(
state_id="state_id",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
)
assert_matches_type(State, state, path=["response"])

Expand All @@ -341,9 +331,7 @@ async def test_method_update(self, async_client: AsyncAgentex) -> None:
async def test_raw_response_update(self, async_client: AsyncAgentex) -> None:
response = await async_client.states.with_raw_response.update(
state_id="state_id",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
)

assert response.is_closed is True
Expand All @@ -356,9 +344,7 @@ async def test_raw_response_update(self, async_client: AsyncAgentex) -> None:
async def test_streaming_response_update(self, async_client: AsyncAgentex) -> None:
async with async_client.states.with_streaming_response.update(
state_id="state_id",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -374,9 +360,7 @@ async def test_path_params_update(self, async_client: AsyncAgentex) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `state_id` but received ''"):
await async_client.states.with_raw_response.update(
state_id="",
agent_id="agent_id",
state={"foo": "bar"},
task_id="task_id",
)

@pytest.mark.skip(reason="Mock server tests are disabled")
Expand Down
Loading