From d59deee2f15baa213eaa694b1bf71f94330b9d89 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 14:27:44 +0000 Subject: [PATCH 01/13] feat(api): api update --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/agent/agent_response.py | 3 +++ src/oz_agent_sdk/types/gcp_provider_config.py | 5 ----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index e679286..4d0d087 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-964f646a32c318735de7673531a12788aede1840f7ab4893f2efa31c83440837.yml -openapi_spec_hash: 30f07ff0bfb491efb11cd88fce79968a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-532e80ed769a2649b85798696c2c988d05a2c940c61425a6d6caaf6206beeb28.yml +openapi_spec_hash: 018332ffca594f453bfd0fb348560946 config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/types/agent/agent_response.py b/src/oz_agent_sdk/types/agent/agent_response.py index db0b1bf..0742beb 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -108,6 +108,9 @@ class AgentResponse(BaseModel): uid: str """Unique identifier for the agent""" + updated_at: datetime + """When the agent was last updated (RFC3339)""" + base_harness: Optional[str] = None """Default harness for runs executed by this agent. diff --git a/src/oz_agent_sdk/types/gcp_provider_config.py b/src/oz_agent_sdk/types/gcp_provider_config.py index e849b7e..168ab6a 100644 --- a/src/oz_agent_sdk/types/gcp_provider_config.py +++ b/src/oz_agent_sdk/types/gcp_provider_config.py @@ -1,7 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from .._models import BaseModel __all__ = ["GcpProviderConfig"] @@ -18,6 +16,3 @@ class GcpProviderConfig(BaseModel): workload_identity_federation_provider_id: str """Workload Identity Federation provider ID""" - - service_account_email: Optional[str] = None - """Optional GCP service account email to impersonate""" From 85d7ef8e6cc1380deed30f8efd6e75f062b3fa53 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 20:50:14 +0000 Subject: [PATCH 02/13] feat: Add server run runtime to agent API --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/agent/run_item.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4d0d087..84347a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-532e80ed769a2649b85798696c2c988d05a2c940c61425a6d6caaf6206beeb28.yml -openapi_spec_hash: 018332ffca594f453bfd0fb348560946 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-af9105bfe35368bc3c9d1437d7aea1864735e0152afd117a816c5f289d8a7c21.yml +openapi_spec_hash: da3c45f9d8a0cf9ff6c46e674b447463 config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 4293ce2..6181203 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -182,6 +182,12 @@ class RunItem(BaseModel): request_usage: Optional[RequestUsage] = None """Resource usage information for the run""" + run_time: Optional[str] = None + """Total runtime as an ISO 8601 duration (e.g. + + "PT2M30S"), computed server-side from run executions. + """ + schedule: Optional[Schedule] = None """ Information about the schedule that triggered this run (only present for From d25946f832fe901339b42dcf8842a17d20b57634 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 22:35:11 +0000 Subject: [PATCH 03/13] feat(api): api update --- .stats.yml | 6 +++--- src/oz_agent_sdk/types/gcp_provider_config.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 84347a8..12343f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-af9105bfe35368bc3c9d1437d7aea1864735e0152afd117a816c5f289d8a7c21.yml -openapi_spec_hash: da3c45f9d8a0cf9ff6c46e674b447463 -config_hash: 236823a4936c76818117c16aa5c188df +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-0bc171e3cd0224936953898ce9b7eb35e1bf1cbf58a673fc80b32c90ce84bcd0.yml +openapi_spec_hash: 6c7d5f294b0800e878729314f57a09f0 +config_hash: 279b20eafe220bf54131676cc0b9cdd2 diff --git a/src/oz_agent_sdk/types/gcp_provider_config.py b/src/oz_agent_sdk/types/gcp_provider_config.py index 168ab6a..e849b7e 100644 --- a/src/oz_agent_sdk/types/gcp_provider_config.py +++ b/src/oz_agent_sdk/types/gcp_provider_config.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional + from .._models import BaseModel __all__ = ["GcpProviderConfig"] @@ -16,3 +18,6 @@ class GcpProviderConfig(BaseModel): workload_identity_federation_provider_id: str """Workload Identity Federation provider ID""" + + service_account_email: Optional[str] = None + """Optional GCP service account email to impersonate""" From 2542fa3058b5feead7f46fe5255665ef5c36528e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 14:02:56 +0000 Subject: [PATCH 04/13] feat: Allow for empty-prompt cloud-agent handoff --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/agent.py | 6 ++++-- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- .../types/agent/run_submit_followup_params.py | 4 ++-- src/oz_agent_sdk/types/agent_run_params.py | 3 ++- tests/api_resources/agent/test_runs.py | 8 -------- 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index 12343f9..31ca0f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-0bc171e3cd0224936953898ce9b7eb35e1bf1cbf58a673fc80b32c90ce84bcd0.yml -openapi_spec_hash: 6c7d5f294b0800e878729314f57a09f0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-8b8de9abf59d848042cc4107118de305ef6dddb46a3783eb6b0d94457a4c8682.yml +openapi_spec_hash: 6c50747f76de7e0bb66a5fdd07d851ac config_hash: 279b20eafe220bf54131676cc0b9cdd2 diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index af2411c..0a4ae5d 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -302,7 +302,8 @@ def run( hierarchies. prompt: The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. + specified via the skill field, config.skill_spec, or config.skills. Handoff + requests may omit prompt when conversation_id is set. skill: Skill specification to use as the base prompt for the agent. Supported formats: @@ -593,7 +594,8 @@ async def run( hierarchies. prompt: The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. + specified via the skill field, config.skill_spec, or config.skills. Handoff + requests may omit prompt when conversation_id is set. skill: Skill specification to use as the base prompt for the agent. Supported formats: diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index c2d5075..fa745d3 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -301,7 +301,7 @@ def submit_followup( self, run_id: str, *, - message: str, + message: str | Omit = omit, mode: Literal["normal", "plan", "orchestrate"] | Omit = omit, # 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. @@ -621,7 +621,7 @@ async def submit_followup( self, run_id: str, *, - message: str, + message: str | Omit = omit, mode: Literal["normal", "plan", "orchestrate"] | Omit = omit, # 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. diff --git a/src/oz_agent_sdk/types/agent/run_submit_followup_params.py b/src/oz_agent_sdk/types/agent/run_submit_followup_params.py index 004341f..abc435b 100644 --- a/src/oz_agent_sdk/types/agent/run_submit_followup_params.py +++ b/src/oz_agent_sdk/types/agent/run_submit_followup_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Literal, TypedDict __all__ = ["RunSubmitFollowupParams"] class RunSubmitFollowupParams(TypedDict, total=False): - message: Required[str] + message: str """The follow-up message to send to the run.""" mode: Literal["normal", "plan", "orchestrate"] diff --git a/src/oz_agent_sdk/types/agent_run_params.py b/src/oz_agent_sdk/types/agent_run_params.py index fa34de8..870c2de 100644 --- a/src/oz_agent_sdk/types/agent_run_params.py +++ b/src/oz_agent_sdk/types/agent_run_params.py @@ -55,7 +55,8 @@ class AgentRunParams(TypedDict, total=False): prompt: str """ The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. + specified via the skill field, config.skill_spec, or config.skills. Handoff + requests may omit prompt when conversation_id is set. """ skill: str diff --git a/tests/api_resources/agent/test_runs.py b/tests/api_resources/agent/test_runs.py index 6af094f..54bb08c 100644 --- a/tests/api_resources/agent/test_runs.py +++ b/tests/api_resources/agent/test_runs.py @@ -209,7 +209,6 @@ def test_path_params_list_handoff_attachments(self, client: OzAPI) -> None: def test_method_submit_followup(self, client: OzAPI) -> None: run = client.agent.runs.submit_followup( run_id="runId", - message="message", ) assert_matches_type(object, run, path=["response"]) @@ -228,7 +227,6 @@ def test_method_submit_followup_with_all_params(self, client: OzAPI) -> None: def test_raw_response_submit_followup(self, client: OzAPI) -> None: response = client.agent.runs.with_raw_response.submit_followup( run_id="runId", - message="message", ) assert response.is_closed is True @@ -241,7 +239,6 @@ def test_raw_response_submit_followup(self, client: OzAPI) -> None: def test_streaming_response_submit_followup(self, client: OzAPI) -> None: with client.agent.runs.with_streaming_response.submit_followup( run_id="runId", - message="message", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -257,7 +254,6 @@ def test_path_params_submit_followup(self, client: OzAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): client.agent.runs.with_raw_response.submit_followup( run_id="", - message="message", ) @@ -453,7 +449,6 @@ async def test_path_params_list_handoff_attachments(self, async_client: AsyncOzA async def test_method_submit_followup(self, async_client: AsyncOzAPI) -> None: run = await async_client.agent.runs.submit_followup( run_id="runId", - message="message", ) assert_matches_type(object, run, path=["response"]) @@ -472,7 +467,6 @@ async def test_method_submit_followup_with_all_params(self, async_client: AsyncO async def test_raw_response_submit_followup(self, async_client: AsyncOzAPI) -> None: response = await async_client.agent.runs.with_raw_response.submit_followup( run_id="runId", - message="message", ) assert response.is_closed is True @@ -485,7 +479,6 @@ async def test_raw_response_submit_followup(self, async_client: AsyncOzAPI) -> N async def test_streaming_response_submit_followup(self, async_client: AsyncOzAPI) -> None: async with async_client.agent.runs.with_streaming_response.submit_followup( run_id="runId", - message="message", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,5 +494,4 @@ async def test_path_params_submit_followup(self, async_client: AsyncOzAPI) -> No with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): await async_client.agent.runs.with_raw_response.submit_followup( run_id="", - message="message", ) From 7ef54ccc0ad281b27a2e0db5cac2956bef2b93e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 18:33:02 +0000 Subject: [PATCH 05/13] feat(api): api update --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/agent.py | 6 ++---- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- .../types/agent/run_submit_followup_params.py | 4 ++-- src/oz_agent_sdk/types/agent_run_params.py | 3 +-- tests/api_resources/agent/test_runs.py | 8 ++++++++ 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31ca0f1..12343f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-8b8de9abf59d848042cc4107118de305ef6dddb46a3783eb6b0d94457a4c8682.yml -openapi_spec_hash: 6c50747f76de7e0bb66a5fdd07d851ac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-0bc171e3cd0224936953898ce9b7eb35e1bf1cbf58a673fc80b32c90ce84bcd0.yml +openapi_spec_hash: 6c7d5f294b0800e878729314f57a09f0 config_hash: 279b20eafe220bf54131676cc0b9cdd2 diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index 0a4ae5d..af2411c 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -302,8 +302,7 @@ def run( hierarchies. prompt: The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. Handoff - requests may omit prompt when conversation_id is set. + specified via the skill field, config.skill_spec, or config.skills. skill: Skill specification to use as the base prompt for the agent. Supported formats: @@ -594,8 +593,7 @@ async def run( hierarchies. prompt: The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. Handoff - requests may omit prompt when conversation_id is set. + specified via the skill field, config.skill_spec, or config.skills. skill: Skill specification to use as the base prompt for the agent. Supported formats: diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index fa745d3..c2d5075 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -301,7 +301,7 @@ def submit_followup( self, run_id: str, *, - message: str | Omit = omit, + message: str, mode: Literal["normal", "plan", "orchestrate"] | Omit = omit, # 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. @@ -621,7 +621,7 @@ async def submit_followup( self, run_id: str, *, - message: str | Omit = omit, + message: str, mode: Literal["normal", "plan", "orchestrate"] | Omit = omit, # 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. diff --git a/src/oz_agent_sdk/types/agent/run_submit_followup_params.py b/src/oz_agent_sdk/types/agent/run_submit_followup_params.py index abc435b..004341f 100644 --- a/src/oz_agent_sdk/types/agent/run_submit_followup_params.py +++ b/src/oz_agent_sdk/types/agent/run_submit_followup_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing_extensions import Literal, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["RunSubmitFollowupParams"] class RunSubmitFollowupParams(TypedDict, total=False): - message: str + message: Required[str] """The follow-up message to send to the run.""" mode: Literal["normal", "plan", "orchestrate"] diff --git a/src/oz_agent_sdk/types/agent_run_params.py b/src/oz_agent_sdk/types/agent_run_params.py index 870c2de..fa34de8 100644 --- a/src/oz_agent_sdk/types/agent_run_params.py +++ b/src/oz_agent_sdk/types/agent_run_params.py @@ -55,8 +55,7 @@ class AgentRunParams(TypedDict, total=False): prompt: str """ The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. Handoff - requests may omit prompt when conversation_id is set. + specified via the skill field, config.skill_spec, or config.skills. """ skill: str diff --git a/tests/api_resources/agent/test_runs.py b/tests/api_resources/agent/test_runs.py index 54bb08c..6af094f 100644 --- a/tests/api_resources/agent/test_runs.py +++ b/tests/api_resources/agent/test_runs.py @@ -209,6 +209,7 @@ def test_path_params_list_handoff_attachments(self, client: OzAPI) -> None: def test_method_submit_followup(self, client: OzAPI) -> None: run = client.agent.runs.submit_followup( run_id="runId", + message="message", ) assert_matches_type(object, run, path=["response"]) @@ -227,6 +228,7 @@ def test_method_submit_followup_with_all_params(self, client: OzAPI) -> None: def test_raw_response_submit_followup(self, client: OzAPI) -> None: response = client.agent.runs.with_raw_response.submit_followup( run_id="runId", + message="message", ) assert response.is_closed is True @@ -239,6 +241,7 @@ def test_raw_response_submit_followup(self, client: OzAPI) -> None: def test_streaming_response_submit_followup(self, client: OzAPI) -> None: with client.agent.runs.with_streaming_response.submit_followup( run_id="runId", + message="message", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -254,6 +257,7 @@ def test_path_params_submit_followup(self, client: OzAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): client.agent.runs.with_raw_response.submit_followup( run_id="", + message="message", ) @@ -449,6 +453,7 @@ async def test_path_params_list_handoff_attachments(self, async_client: AsyncOzA async def test_method_submit_followup(self, async_client: AsyncOzAPI) -> None: run = await async_client.agent.runs.submit_followup( run_id="runId", + message="message", ) assert_matches_type(object, run, path=["response"]) @@ -467,6 +472,7 @@ async def test_method_submit_followup_with_all_params(self, async_client: AsyncO async def test_raw_response_submit_followup(self, async_client: AsyncOzAPI) -> None: response = await async_client.agent.runs.with_raw_response.submit_followup( run_id="runId", + message="message", ) assert response.is_closed is True @@ -479,6 +485,7 @@ async def test_raw_response_submit_followup(self, async_client: AsyncOzAPI) -> N async def test_streaming_response_submit_followup(self, async_client: AsyncOzAPI) -> None: async with async_client.agent.runs.with_streaming_response.submit_followup( run_id="runId", + message="message", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -494,4 +501,5 @@ async def test_path_params_submit_followup(self, async_client: AsyncOzAPI) -> No with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): await async_client.agent.runs.with_raw_response.submit_followup( run_id="", + message="message", ) From 4697ddc9625dd3bcdcc756af1da2e2ba0fc5fff0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 18:43:10 +0000 Subject: [PATCH 06/13] feat: Followups for docs-syncing workflow --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/agent.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 12343f9..20bfbe2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-0bc171e3cd0224936953898ce9b7eb35e1bf1cbf58a673fc80b32c90ce84bcd0.yml -openapi_spec_hash: 6c7d5f294b0800e878729314f57a09f0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-88b8ccee39c0206f7760fc0c480190db5e88bc1afff2a734a2af4aa0f1fb9556.yml +openapi_spec_hash: 31989cf4a6f3789090ac7b80ac7194c2 config_hash: 279b20eafe220bf54131676cc0b9cdd2 diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index af2411c..bfc12a7 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -275,10 +275,10 @@ def run( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRunResponse: - """Alias for POST /agent/run. + """Spawn a cloud agent with a prompt and optional configuration. - This is the preferred endpoint for creating new agent - runs. Behavior is identical to POST /agent/run. + The agent will be + queued for execution and assigned a unique run ID. Args: agent_identity_uid: Optional agent identity UID to use as the execution principal for the run. This @@ -566,10 +566,10 @@ async def run( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRunResponse: - """Alias for POST /agent/run. + """Spawn a cloud agent with a prompt and optional configuration. - This is the preferred endpoint for creating new agent - runs. Behavior is identical to POST /agent/run. + The agent will be + queued for execution and assigned a unique run ID. Args: agent_identity_uid: Optional agent identity UID to use as the execution principal for the run. This From a03690f7a25a0887c60981a53a2224c5ba1cc26a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:11:44 +0000 Subject: [PATCH 07/13] feat(api): api update --- .github/workflows/ci.yml | 10 +++++----- .stats.yml | 6 +++--- scripts/utils/upload-artifact.sh | 2 +- src/oz_agent_sdk/resources/agent/agent.py | 6 ++++-- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- .../types/agent/run_submit_followup_params.py | 4 ++-- src/oz_agent_sdk/types/agent_run_params.py | 3 ++- tests/api_resources/agent/test_runs.py | 8 -------- 8 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2f90fb..700c64d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/warp-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: 'ubuntu-latest' if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -41,7 +41,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/warp-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: 'ubuntu-latest' steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -58,7 +58,7 @@ jobs: - name: Get GitHub OIDC Token if: |- - github.repository == 'stainless-sdks/warp-api-python' && + github.repository == 'warpdotdev/oz-sdk-python-staging' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 @@ -67,7 +67,7 @@ jobs: - name: Upload tarball if: |- - github.repository == 'stainless-sdks/warp-api-python' && + github.repository == 'warpdotdev/oz-sdk-python-staging' && !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s @@ -78,7 +78,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/warp-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: 'ubuntu-latest' if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.stats.yml b/.stats.yml index 20bfbe2..7b03f82 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-88b8ccee39c0206f7760fc0c480190db5e88bc1afff2a734a2af4aa0f1fb9556.yml -openapi_spec_hash: 31989cf4a6f3789090ac7b80ac7194c2 -config_hash: 279b20eafe220bf54131676cc0b9cdd2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-65c025cf40a833a2310d087f63f96103a230ff92cd775f45584356d5c7ad7c18.yml +openapi_spec_hash: 6d15878e14d97285e232a0cc3f335e9e +config_hash: 619fb7e70fce0afe18d08987282fce4e diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index 9f6eb1f..4ce1bc0 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -20,7 +20,7 @@ UPLOAD_RESPONSE=$(curl -v -X PUT \ if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/warp-api-python/$SHA/$FILENAME'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/oz-sdk-python-staging/$SHA/$FILENAME'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index bfc12a7..6910539 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -302,7 +302,8 @@ def run( hierarchies. prompt: The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. + specified via the skill field, config.skill_spec, or config.skills. Handoff + requests may omit prompt when conversation_id is set. skill: Skill specification to use as the base prompt for the agent. Supported formats: @@ -593,7 +594,8 @@ async def run( hierarchies. prompt: The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. + specified via the skill field, config.skill_spec, or config.skills. Handoff + requests may omit prompt when conversation_id is set. skill: Skill specification to use as the base prompt for the agent. Supported formats: diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index c2d5075..fa745d3 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -301,7 +301,7 @@ def submit_followup( self, run_id: str, *, - message: str, + message: str | Omit = omit, mode: Literal["normal", "plan", "orchestrate"] | Omit = omit, # 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. @@ -621,7 +621,7 @@ async def submit_followup( self, run_id: str, *, - message: str, + message: str | Omit = omit, mode: Literal["normal", "plan", "orchestrate"] | Omit = omit, # 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. diff --git a/src/oz_agent_sdk/types/agent/run_submit_followup_params.py b/src/oz_agent_sdk/types/agent/run_submit_followup_params.py index 004341f..abc435b 100644 --- a/src/oz_agent_sdk/types/agent/run_submit_followup_params.py +++ b/src/oz_agent_sdk/types/agent/run_submit_followup_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Literal, TypedDict __all__ = ["RunSubmitFollowupParams"] class RunSubmitFollowupParams(TypedDict, total=False): - message: Required[str] + message: str """The follow-up message to send to the run.""" mode: Literal["normal", "plan", "orchestrate"] diff --git a/src/oz_agent_sdk/types/agent_run_params.py b/src/oz_agent_sdk/types/agent_run_params.py index fa34de8..870c2de 100644 --- a/src/oz_agent_sdk/types/agent_run_params.py +++ b/src/oz_agent_sdk/types/agent_run_params.py @@ -55,7 +55,8 @@ class AgentRunParams(TypedDict, total=False): prompt: str """ The prompt/instruction for the agent to execute. Required unless a skill is - specified via the skill field, config.skill_spec, or config.skills. + specified via the skill field, config.skill_spec, or config.skills. Handoff + requests may omit prompt when conversation_id is set. """ skill: str diff --git a/tests/api_resources/agent/test_runs.py b/tests/api_resources/agent/test_runs.py index 6af094f..54bb08c 100644 --- a/tests/api_resources/agent/test_runs.py +++ b/tests/api_resources/agent/test_runs.py @@ -209,7 +209,6 @@ def test_path_params_list_handoff_attachments(self, client: OzAPI) -> None: def test_method_submit_followup(self, client: OzAPI) -> None: run = client.agent.runs.submit_followup( run_id="runId", - message="message", ) assert_matches_type(object, run, path=["response"]) @@ -228,7 +227,6 @@ def test_method_submit_followup_with_all_params(self, client: OzAPI) -> None: def test_raw_response_submit_followup(self, client: OzAPI) -> None: response = client.agent.runs.with_raw_response.submit_followup( run_id="runId", - message="message", ) assert response.is_closed is True @@ -241,7 +239,6 @@ def test_raw_response_submit_followup(self, client: OzAPI) -> None: def test_streaming_response_submit_followup(self, client: OzAPI) -> None: with client.agent.runs.with_streaming_response.submit_followup( run_id="runId", - message="message", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -257,7 +254,6 @@ def test_path_params_submit_followup(self, client: OzAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): client.agent.runs.with_raw_response.submit_followup( run_id="", - message="message", ) @@ -453,7 +449,6 @@ async def test_path_params_list_handoff_attachments(self, async_client: AsyncOzA async def test_method_submit_followup(self, async_client: AsyncOzAPI) -> None: run = await async_client.agent.runs.submit_followup( run_id="runId", - message="message", ) assert_matches_type(object, run, path=["response"]) @@ -472,7 +467,6 @@ async def test_method_submit_followup_with_all_params(self, async_client: AsyncO async def test_raw_response_submit_followup(self, async_client: AsyncOzAPI) -> None: response = await async_client.agent.runs.with_raw_response.submit_followup( run_id="runId", - message="message", ) assert response.is_closed is True @@ -485,7 +479,6 @@ async def test_raw_response_submit_followup(self, async_client: AsyncOzAPI) -> N async def test_streaming_response_submit_followup(self, async_client: AsyncOzAPI) -> None: async with async_client.agent.runs.with_streaming_response.submit_followup( run_id="runId", - message="message", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,5 +494,4 @@ async def test_path_params_submit_followup(self, async_client: AsyncOzAPI) -> No with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): await async_client.agent.runs.with_raw_response.submit_followup( run_id="", - message="message", ) From 2accc6e98f0469e83f5ec084060be6eecc75a048 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 17:14:52 +0000 Subject: [PATCH 08/13] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7b03f82..1103d09 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-65c025cf40a833a2310d087f63f96103a230ff92cd775f45584356d5c7ad7c18.yml -openapi_spec_hash: 6d15878e14d97285e232a0cc3f335e9e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-6a1e8db241f6b3b708f177dc8e53bc07c807bff5f6095032f049e11d89e68f81.yml +openapi_spec_hash: 7a7ee0d18c5230c3a6d583a8bbf6d007 config_hash: 619fb7e70fce0afe18d08987282fce4e From 8d4b77c936054c5c125fa0747a298a64ed349a48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 18:16:58 +0000 Subject: [PATCH 09/13] feat(api): api update --- .stats.yml | 4 +- src/oz_agent_sdk/resources/agent/agent_.py | 25 +++++++++++- .../types/agent/agent_create_params.py | 9 ++++- .../types/agent/agent_response.py | 9 ++++- .../types/agent/agent_update_params.py | 11 ++++- tests/api_resources/agent/test_agent_.py | 40 +++++++++++++++++++ 6 files changed, 92 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1103d09..362b175 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-6a1e8db241f6b3b708f177dc8e53bc07c807bff5f6095032f049e11d89e68f81.yml -openapi_spec_hash: 7a7ee0d18c5230c3a6d583a8bbf6d007 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-0f3dae898b870134848191cdbb5e698902865948eb4639be341112c80a6c9e42.yml +openapi_spec_hash: 64c7e9657b989779d463734cacf11bfb config_hash: 619fb7e70fce0afe18d08987282fce4e diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index f79333c..65eb4d5 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import Dict, Iterable, Optional import httpx @@ -19,6 +19,7 @@ from ...types.agent import agent_create_params, agent_update_params from ..._base_client import make_request_options from ...types.agent.agent_response import AgentResponse +from ...types.mcp_server_config_param import McpServerConfigParam from ...types.agent.list_agent_identities_response import ListAgentIdentitiesResponse __all__ = ["AgentResource", "AsyncAgentResource"] @@ -56,6 +57,7 @@ def create( environment_id: Optional[str] | Omit = omit, harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, + mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, @@ -89,6 +91,9 @@ def create( inference_providers: Inference provider settings used for LLM calls. + mcp_servers: Optional map of MCP server configurations by name to attach to runs executed by + this agent. Run-level MCP config takes precedence over this agent-level default. + memory_stores: Optional list of memory stores to attach to the agent. Each store must be team-owned by the same team as the agent. Duplicate UIDs within a single request are rejected. @@ -125,6 +130,7 @@ def create( "environment_id": environment_id, "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, + "mcp_servers": mcp_servers, "memory_stores": memory_stores, "prompt": prompt, "secrets": secrets, @@ -148,6 +154,7 @@ def update( environment_id: Optional[str] | Omit = omit, harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, + mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, prompt: Optional[str] | Omit = omit, @@ -182,6 +189,10 @@ def update( inference_providers: Inference provider settings used for LLM calls. + mcp_servers: Replacement map of MCP server configurations by name. Omit to leave unchanged, + pass an empty object to clear, or pass a non-empty object to replace. Run-level + MCP config takes precedence over this agent-level default. + memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array to replace. @@ -216,6 +227,7 @@ def update( "environment_id": environment_id, "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, + "mcp_servers": mcp_servers, "memory_stores": memory_stores, "name": name, "prompt": prompt, @@ -357,6 +369,7 @@ async def create( environment_id: Optional[str] | Omit = omit, harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, + mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, @@ -390,6 +403,9 @@ async def create( inference_providers: Inference provider settings used for LLM calls. + mcp_servers: Optional map of MCP server configurations by name to attach to runs executed by + this agent. Run-level MCP config takes precedence over this agent-level default. + memory_stores: Optional list of memory stores to attach to the agent. Each store must be team-owned by the same team as the agent. Duplicate UIDs within a single request are rejected. @@ -426,6 +442,7 @@ async def create( "environment_id": environment_id, "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, + "mcp_servers": mcp_servers, "memory_stores": memory_stores, "prompt": prompt, "secrets": secrets, @@ -449,6 +466,7 @@ async def update( environment_id: Optional[str] | Omit = omit, harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, + mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, prompt: Optional[str] | Omit = omit, @@ -483,6 +501,10 @@ async def update( inference_providers: Inference provider settings used for LLM calls. + mcp_servers: Replacement map of MCP server configurations by name. Omit to leave unchanged, + pass an empty object to clear, or pass a non-empty object to replace. Run-level + MCP config takes precedence over this agent-level default. + memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array to replace. @@ -517,6 +539,7 @@ async def update( "environment_id": environment_id, "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, + "mcp_servers": mcp_servers, "memory_stores": memory_stores, "name": name, "prompt": prompt, diff --git a/src/oz_agent_sdk/types/agent/agent_create_params.py b/src/oz_agent_sdk/types/agent/agent_create_params.py index 9de0a64..798e05d 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -2,10 +2,11 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import Dict, Iterable, Optional from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr +from ..mcp_server_config_param import McpServerConfigParam __all__ = [ "AgentCreateParams", @@ -45,6 +46,12 @@ class AgentCreateParams(TypedDict, total=False): inference_providers: InferenceProviders """Inference provider settings used for LLM calls.""" + mcp_servers: Dict[str, McpServerConfigParam] + """ + Optional map of MCP server configurations by name to attach to runs executed by + this agent. Run-level MCP config takes precedence over this agent-level default. + """ + memory_stores: Iterable[MemoryStore] """ Optional list of memory stores to attach to the agent. Each store must be diff --git a/src/oz_agent_sdk/types/agent/agent_response.py b/src/oz_agent_sdk/types/agent/agent_response.py index 0742beb..37d13b9 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -1,10 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from datetime import datetime from typing_extensions import Literal from ..._models import BaseModel +from ..mcp_server_config import McpServerConfig __all__ = [ "AgentResponse", @@ -153,5 +154,11 @@ class AgentResponse(BaseModel): inference_providers: Optional[InferenceProviders] = None """Inference provider settings used for LLM calls.""" + mcp_servers: Optional[Dict[str, McpServerConfig]] = None + """ + MCP server configurations attached to this agent by default. Run-level MCP + config takes precedence over this agent-level default. + """ + prompt: Optional[str] = None """Optional base prompt for this agent""" diff --git a/src/oz_agent_sdk/types/agent/agent_update_params.py b/src/oz_agent_sdk/types/agent/agent_update_params.py index fb1e36c..19082d4 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -2,10 +2,11 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import Dict, Iterable, Optional from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr +from ..mcp_server_config_param import McpServerConfigParam __all__ = [ "AgentUpdateParams", @@ -51,6 +52,14 @@ class AgentUpdateParams(TypedDict, total=False): inference_providers: Optional[InferenceProviders] """Inference provider settings used for LLM calls.""" + mcp_servers: Dict[str, McpServerConfigParam] + """Replacement map of MCP server configurations by name. + + Omit to leave unchanged, pass an empty object to clear, or pass a non-empty + object to replace. Run-level MCP config takes precedence over this agent-level + default. + """ + memory_stores: Optional[Iterable[MemoryStore]] """Replacement list of memory stores. diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index d6819c5..dbc1785 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -48,6 +48,16 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "role_arn": "role_arn", } }, + mcp_servers={ + "foo": { + "args": ["string"], + "command": "command", + "env": {"foo": "string"}, + "headers": {"foo": "string"}, + "url": "https://example.com", + "warp_id": "warp_id", + } + }, memory_stores=[ { "access": "read_write", @@ -115,6 +125,16 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "role_arn": "role_arn", } }, + mcp_servers={ + "foo": { + "args": ["string"], + "command": "command", + "env": {"foo": "string"}, + "headers": {"foo": "string"}, + "url": "https://example.com", + "warp_id": "warp_id", + } + }, memory_stores=[ { "access": "read_write", @@ -309,6 +329,16 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "role_arn": "role_arn", } }, + mcp_servers={ + "foo": { + "args": ["string"], + "command": "command", + "env": {"foo": "string"}, + "headers": {"foo": "string"}, + "url": "https://example.com", + "warp_id": "warp_id", + } + }, memory_stores=[ { "access": "read_write", @@ -376,6 +406,16 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "role_arn": "role_arn", } }, + mcp_servers={ + "foo": { + "args": ["string"], + "command": "command", + "env": {"foo": "string"}, + "headers": {"foo": "string"}, + "url": "https://example.com", + "warp_id": "warp_id", + } + }, memory_stores=[ { "access": "read_write", From 4e8e0bb6721b45a8c8bf0243a33f2d3cb0b18044 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jun 2026 20:03:04 +0000 Subject: [PATCH 10/13] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 362b175..6ae8640 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-0f3dae898b870134848191cdbb5e698902865948eb4639be341112c80a6c9e42.yml -openapi_spec_hash: 64c7e9657b989779d463734cacf11bfb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-5541584fe19f0db138313147ea50948dbcf374e16ab0b6575df51f0be54706a1.yml +openapi_spec_hash: da15430ba458f7804fd46a937f8e29e0 config_hash: 619fb7e70fce0afe18d08987282fce4e From 73a49ad055f94883b17b03b8a2c328881d1fe859 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 12:50:59 +0000 Subject: [PATCH 11/13] feat(api): api update --- .stats.yml | 6 +- src/oz_agent_sdk/resources/agent/agent_.py | 30 ++++----- .../types/agent/agent_create_params.py | 37 ++++++++--- .../types/agent/agent_response.py | 56 ++++++++++++++-- .../types/agent/agent_update_params.py | 24 ++++--- src/oz_agent_sdk/types/agent/run_item.py | 8 +++ tests/api_resources/agent/test_agent_.py | 66 +++++++++++-------- 7 files changed, 155 insertions(+), 72 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6ae8640..1b273bd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-5541584fe19f0db138313147ea50948dbcf374e16ab0b6575df51f0be54706a1.yml -openapi_spec_hash: da15430ba458f7804fd46a937f8e29e0 -config_hash: 619fb7e70fce0afe18d08987282fce4e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-9b4270e56f0c240d415e68959e2e6d4ce00021d6fc0f8d5634fd0f6b0c875036.yml +openapi_spec_hash: 784089d01927148351a5c4f3fbe41d50 +config_hash: e52e930a60998be461fd4af99a2c9f1a diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index 65eb4d5..7294d3b 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -58,7 +58,7 @@ def create( harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, - memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, + memory: agent_create_params.Memory | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, @@ -94,9 +94,7 @@ def create( mcp_servers: Optional map of MCP server configurations by name to attach to runs executed by this agent. Run-level MCP config takes precedence over this agent-level default. - memory_stores: Optional list of memory stores to attach to the agent. Each store must be - team-owned by the same team as the agent. Duplicate UIDs within a single request - are rejected. + memory: Memory settings for creating an agent. prompt: Optional base prompt for this agent @@ -131,7 +129,7 @@ def create( "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "mcp_servers": mcp_servers, - "memory_stores": memory_stores, + "memory": memory, "prompt": prompt, "secrets": secrets, "skills": skills, @@ -155,7 +153,7 @@ def update( harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, - memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, + memory: Optional[agent_update_params.Memory] | Omit = omit, name: str | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, @@ -193,8 +191,7 @@ def update( pass an empty object to clear, or pass a non-empty object to replace. Run-level MCP config takes precedence over this agent-level default. - memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array - to clear, or pass a non-empty array to replace. + memory: Memory settings for updating an agent. name: The new name for the agent @@ -228,7 +225,7 @@ def update( "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "mcp_servers": mcp_servers, - "memory_stores": memory_stores, + "memory": memory, "name": name, "prompt": prompt, "secrets": secrets, @@ -370,7 +367,7 @@ async def create( harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, - memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, + memory: agent_create_params.Memory | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, @@ -406,9 +403,7 @@ async def create( mcp_servers: Optional map of MCP server configurations by name to attach to runs executed by this agent. Run-level MCP config takes precedence over this agent-level default. - memory_stores: Optional list of memory stores to attach to the agent. Each store must be - team-owned by the same team as the agent. Duplicate UIDs within a single request - are rejected. + memory: Memory settings for creating an agent. prompt: Optional base prompt for this agent @@ -443,7 +438,7 @@ async def create( "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "mcp_servers": mcp_servers, - "memory_stores": memory_stores, + "memory": memory, "prompt": prompt, "secrets": secrets, "skills": skills, @@ -467,7 +462,7 @@ async def update( harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, mcp_servers: Dict[str, McpServerConfigParam] | Omit = omit, - memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, + memory: Optional[agent_update_params.Memory] | Omit = omit, name: str | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, @@ -505,8 +500,7 @@ async def update( pass an empty object to clear, or pass a non-empty object to replace. Run-level MCP config takes precedence over this agent-level default. - memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array - to clear, or pass a non-empty array to replace. + memory: Memory settings for updating an agent. name: The new name for the agent @@ -540,7 +534,7 @@ async def update( "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "mcp_servers": mcp_servers, - "memory_stores": memory_stores, + "memory": memory, "name": name, "prompt": prompt, "secrets": secrets, diff --git a/src/oz_agent_sdk/types/agent/agent_create_params.py b/src/oz_agent_sdk/types/agent/agent_create_params.py index 798e05d..c69586c 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -13,7 +13,9 @@ "HarnessAuthSecrets", "InferenceProviders", "InferenceProvidersAws", - "MemoryStore", + "Memory", + "MemoryAttachedStore", + "MemoryAutoMemory", "Secret", ] @@ -52,12 +54,8 @@ class AgentCreateParams(TypedDict, total=False): this agent. Run-level MCP config takes precedence over this agent-level default. """ - memory_stores: Iterable[MemoryStore] - """ - Optional list of memory stores to attach to the agent. Each store must be - team-owned by the same team as the agent. Duplicate UIDs within a single request - are rejected. - """ + memory: Memory + """Memory settings for creating an agent.""" prompt: Optional[str] """Optional base prompt for this agent""" @@ -123,7 +121,7 @@ class InferenceProviders(TypedDict, total=False): """Configures AWS Bedrock as the LLM inference provider for this agent or run.""" -class MemoryStore(TypedDict, total=False): +class MemoryAttachedStore(TypedDict, total=False): """Reference to a memory store to attach to an agent.""" access: Required[Literal["read_write", "read_only"]] @@ -136,6 +134,29 @@ class MemoryStore(TypedDict, total=False): """UID of the memory store.""" +class MemoryAutoMemory(TypedDict, total=False): + """Auto-memory settings for creating an agent.""" + + enabled: bool + """ + Whether to create and attach a default service-account-owned memory store for + this agent. Defaults to true when omitted. + """ + + +class Memory(TypedDict, total=False): + """Memory settings for creating an agent.""" + + attached_stores: Iterable[MemoryAttachedStore] + """ + Existing team memory stores to attach to the agent. Duplicate UIDs within a + single request are rejected. + """ + + auto_memory: MemoryAutoMemory + """Auto-memory settings for creating an agent.""" + + class Secret(TypedDict, total=False): """Reference to a managed secret by name.""" diff --git a/src/oz_agent_sdk/types/agent/agent_response.py b/src/oz_agent_sdk/types/agent/agent_response.py index 37d13b9..1ad9a40 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -9,7 +9,10 @@ __all__ = [ "AgentResponse", - "MemoryStore", + "Memory", + "MemoryAttachedStore", + "MemoryAutoMemory", + "MemoryAutoMemoryStore", "Secret", "HarnessAuthSecrets", "InferenceProviders", @@ -17,7 +20,7 @@ ] -class MemoryStore(BaseModel): +class MemoryAttachedStore(BaseModel): """Reference to a memory store to attach to an agent.""" access: Literal["read_write", "read_only"] @@ -30,6 +33,48 @@ class MemoryStore(BaseModel): """UID of the memory store.""" +class MemoryAutoMemoryStore(BaseModel): + """Memory store attached to an agent.""" + + access: Literal["read_write", "read_only"] + """Access level for the store.""" + + instructions: str + """Instructions for how the agent should use this memory store.""" + + owner_type: Literal["user", "service_account", "team"] + """Public owner type.""" + + owner_uid: str + """Public UID of the user, service account, or team that owns the memory store.""" + + uid: str + """UID of the memory store.""" + + description: Optional[str] = None + """Optional description for the memory store.""" + + +class MemoryAutoMemory(BaseModel): + """Auto-memory state for an agent.""" + + enabled: bool + """Whether this agent has an agent-owned memory store.""" + + store: Optional[MemoryAutoMemoryStore] = None + """Memory store attached to an agent.""" + + +class Memory(BaseModel): + """Memory settings for an agent.""" + + attached_stores: List[MemoryAttachedStore] + """Team memory stores attached to the agent.""" + + auto_memory: MemoryAutoMemory + """Auto-memory state for an agent.""" + + class Secret(BaseModel): """Reference to a managed secret by name.""" @@ -88,11 +133,8 @@ class AgentResponse(BaseModel): created_at: datetime """When the agent was created (RFC3339)""" - memory_stores: List[MemoryStore] - """ - Memory stores attached to this agent. Always present; empty when no stores are - attached. - """ + memory: Memory + """Memory settings for an agent.""" name: str """Name of the agent""" diff --git a/src/oz_agent_sdk/types/agent/agent_update_params.py b/src/oz_agent_sdk/types/agent/agent_update_params.py index 19082d4..0d4c4d7 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -13,7 +13,8 @@ "HarnessAuthSecrets", "InferenceProviders", "InferenceProvidersAws", - "MemoryStore", + "Memory", + "MemoryAttachedStore", "Secret", ] @@ -60,12 +61,8 @@ class AgentUpdateParams(TypedDict, total=False): default. """ - memory_stores: Optional[Iterable[MemoryStore]] - """Replacement list of memory stores. - - Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array - to replace. - """ + memory: Optional[Memory] + """Memory settings for updating an agent.""" name: str """The new name for the agent""" @@ -135,7 +132,7 @@ class InferenceProviders(TypedDict, total=False): """Configures AWS Bedrock as the LLM inference provider for this agent or run.""" -class MemoryStore(TypedDict, total=False): +class MemoryAttachedStore(TypedDict, total=False): """Reference to a memory store to attach to an agent.""" access: Required[Literal["read_write", "read_only"]] @@ -148,6 +145,17 @@ class MemoryStore(TypedDict, total=False): """UID of the memory store.""" +class Memory(TypedDict, total=False): + """Memory settings for updating an agent.""" + + attached_stores: Optional[Iterable[MemoryAttachedStore]] + """Replacement list of attached team memory stores. + + Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array + to replace. + """ + + class Secret(TypedDict, total=False): """Reference to a managed secret by name.""" diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 6181203..47231a1 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -173,6 +173,14 @@ class RunItem(BaseModel): executor: Optional[UserProfile] = None + is_run_type_cancellable: Optional[bool] = None + """Whether the run's type is eligible for cancellation via the API. + + State-independent: false for GitHub Action and local runs; true for all other + run types (including self-hosted). Clients should still gate the control on the + run's current state. + """ + is_sandbox_running: Optional[bool] = None """Whether the sandbox environment is currently running""" diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index dbc1785..cec38f5 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -58,13 +58,16 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], + memory={ + "attached_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], + "auto_memory": {"enabled": True}, + }, prompt="prompt", secrets=[{"name": "name"}], skills=["string"], @@ -135,13 +138,15 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], + memory={ + "attached_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ] + }, name="name", prompt="prompt", secrets=[{"name": "name"}], @@ -339,13 +344,16 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "warp_id": "warp_id", } }, - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], + memory={ + "attached_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], + "auto_memory": {"enabled": True}, + }, prompt="prompt", secrets=[{"name": "name"}], skills=["string"], @@ -416,13 +424,15 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "warp_id": "warp_id", } }, - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], + memory={ + "attached_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ] + }, name="name", prompt="prompt", secrets=[{"name": "name"}], From bcf94f549cd8109ac30d87f3922e5772238183b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 17:30:34 +0000 Subject: [PATCH 12/13] fix(auth): prioritize first auth header --- src/oz_agent_sdk/_client.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/oz_agent_sdk/_client.py b/src/oz_agent_sdk/_client.py index 949709b..bf2c677 100644 --- a/src/oz_agent_sdk/_client.py +++ b/src/oz_agent_sdk/_client.py @@ -128,9 +128,11 @@ def qs(self) -> Querystring: @override def _auth_headers(self, security: SecurityOptions) -> dict[str, str]: - return { - **(self._bearer_auth if security.get("bearer_auth", False) else {}), - } + headers: dict[str, str] = {} + if security.get("bearer_auth", False): + for key, value in self._bearer_auth.items(): + headers.setdefault(key, value) + return headers @property def _bearer_auth(self) -> dict[str, str]: @@ -317,9 +319,11 @@ def qs(self) -> Querystring: @override def _auth_headers(self, security: SecurityOptions) -> dict[str, str]: - return { - **(self._bearer_auth if security.get("bearer_auth", False) else {}), - } + headers: dict[str, str] = {} + if security.get("bearer_auth", False): + for key, value in self._bearer_auth.items(): + headers.setdefault(key, value) + return headers @property def _bearer_auth(self) -> dict[str, str]: From cc1865cb99dd501b370b18b62193bb14c9964afd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 17:31:08 +0000 Subject: [PATCH 13/13] release: 0.14.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 22 ++++++++++++++++++++++ pyproject.toml | 2 +- src/oz_agent_sdk/_version.py | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d52d2b9..a26ebfc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.13.0" + ".": "0.14.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e741eb1..125001c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 0.14.0 (2026-06-17) + +Full Changelog: [v0.13.0...v0.14.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.13.0...v0.14.0) + +### Features + +* Add server run runtime to agent API ([85d7ef8](https://github.com/warpdotdev/oz-sdk-python/commit/85d7ef8e6cc1380deed30f8efd6e75f062b3fa53)) +* Allow for empty-prompt cloud-agent handoff ([2542fa3](https://github.com/warpdotdev/oz-sdk-python/commit/2542fa3058b5feead7f46fe5255665ef5c36528e)) +* **api:** api update ([73a49ad](https://github.com/warpdotdev/oz-sdk-python/commit/73a49ad055f94883b17b03b8a2c328881d1fe859)) +* **api:** api update ([8d4b77c](https://github.com/warpdotdev/oz-sdk-python/commit/8d4b77c936054c5c125fa0747a298a64ed349a48)) +* **api:** api update ([a03690f](https://github.com/warpdotdev/oz-sdk-python/commit/a03690f7a25a0887c60981a53a2224c5ba1cc26a)) +* **api:** api update ([7ef54cc](https://github.com/warpdotdev/oz-sdk-python/commit/7ef54ccc0ad281b27a2e0db5cac2956bef2b93e1)) +* **api:** api update ([d25946f](https://github.com/warpdotdev/oz-sdk-python/commit/d25946f832fe901339b42dcf8842a17d20b57634)) +* **api:** api update ([d59deee](https://github.com/warpdotdev/oz-sdk-python/commit/d59deee2f15baa213eaa694b1bf71f94330b9d89)) +* Followups for docs-syncing workflow ([4697ddc](https://github.com/warpdotdev/oz-sdk-python/commit/4697ddc9625dd3bcdcc756af1da2e2ba0fc5fff0)) + + +### Bug Fixes + +* **auth:** prioritize first auth header ([bcf94f5](https://github.com/warpdotdev/oz-sdk-python/commit/bcf94f549cd8109ac30d87f3922e5772238183b3)) +* update aiohttp to resolve CVE-2026-22815 ([#25](https://github.com/warpdotdev/oz-sdk-python/issues/25)) ([03d6bc4](https://github.com/warpdotdev/oz-sdk-python/commit/03d6bc4d2253f820aa5b1fa842d382b20f2d681d)) + ## 0.13.0 (2026-05-21) Full Changelog: [v0.12.0...v0.13.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.12.0...v0.13.0) diff --git a/pyproject.toml b/pyproject.toml index 533a8e4..e798041 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "oz-agent-sdk" -version = "0.13.0" +version = "0.14.0" description = "The official Python library for the oz-api API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/oz_agent_sdk/_version.py b/src/oz_agent_sdk/_version.py index 1762ab1..0909eaa 100644 --- a/src/oz_agent_sdk/_version.py +++ b/src/oz_agent_sdk/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "oz_agent_sdk" -__version__ = "0.13.0" # x-release-please-version +__version__ = "0.14.0" # x-release-please-version