From 99b2d31ba1a4c2c3d79fc11c5eb8d611c55613b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 15:02:04 +0000 Subject: [PATCH 01/20] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + src/oz_agent_sdk/resources/agent/agent_.py | 110 +++++++++++++++++- .../types/agent/agent_create_params.py | 3 + .../types/agent/agent_response.py | 10 ++ .../types/agent/agent_update_params.py | 6 + src/oz_agent_sdk/types/agent/run_item.py | 3 + .../types/agent/scheduled_agent_item.py | 3 - tests/api_resources/agent/test_agent_.py | 88 ++++++++++++++ tests/api_resources/agent/test_schedules.py | 8 +- 10 files changed, 225 insertions(+), 15 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cb0b3b..d5a9669 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-1fecc5f5d6ee664d804b81bd1aa6eec4d3f170ffa788d214fead4f7e95ab9d4e.yml -openapi_spec_hash: 82990b03bd5a93e45bfc79db56ae7fc0 -config_hash: f52e7636f248f25c4ea0b086e7326816 +configured_endpoints: 23 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml +openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae +config_hash: 5a6e285f6e3a958a887b31b972a3f49c diff --git a/api.md b/api.md index bd33474..e82443c 100644 --- a/api.md +++ b/api.md @@ -94,6 +94,7 @@ Methods: - client.agent.agent.update(uid, \*\*params) -> AgentResponse - client.agent.agent.list() -> ListAgentIdentitiesResponse - client.agent.agent.delete(uid) -> None +- client.agent.agent.get(uid) -> AgentResponse ## Sessions diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index ab7835e..0bfc72b 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -50,6 +50,7 @@ def create( self, *, name: str, + base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, @@ -68,6 +69,8 @@ def create( Args: name: A name for the agent + base_model: Optional base model for runs executed by this agent. + description: Optional description of the agent secrets: Optional list of secrets associated with the agent. Duplicate names within a @@ -94,6 +97,7 @@ def create( body=maybe_transform( { "name": name, + "base_model": base_model, "description": description, "secrets": secrets, "skills": skills, @@ -110,6 +114,7 @@ def update( self, uid: str, *, + base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, name: str | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, @@ -124,9 +129,12 @@ def update( """Update an existing agent. Args: - description: Replacement description. + base_model: Replacement base model. + + Omit or pass `null` to leave unchanged, or pass an empty + string to clear. - Omit or pass `null` to leave unchanged, or use an empty + description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. name: The new name for the agent @@ -151,6 +159,7 @@ def update( path_template("/agent/identities/{uid}", uid=uid), body=maybe_transform( { + "base_model": base_model, "description": description, "name": name, "secrets": secrets, @@ -222,6 +231,42 @@ def delete( cast_to=NoneType, ) + def get( + self, + uid: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AgentResponse: + """Retrieve a single agent by its unique identifier. + + The response includes an + `available` flag indicating whether the agent is within the team's plan limit + and may be used for runs. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not uid: + raise ValueError(f"Expected a non-empty value for `uid` but received {uid!r}") + return self._get( + path_template("/agent/identities/{uid}", uid=uid), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=AgentResponse, + ) + class AsyncAgentResource(AsyncAPIResource): """Operations for running and managing cloud agents""" @@ -249,6 +294,7 @@ async def create( self, *, name: str, + base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, @@ -267,6 +313,8 @@ async def create( Args: name: A name for the agent + base_model: Optional base model for runs executed by this agent. + description: Optional description of the agent secrets: Optional list of secrets associated with the agent. Duplicate names within a @@ -293,6 +341,7 @@ async def create( body=await async_maybe_transform( { "name": name, + "base_model": base_model, "description": description, "secrets": secrets, "skills": skills, @@ -309,6 +358,7 @@ async def update( self, uid: str, *, + base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, name: str | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, @@ -323,9 +373,12 @@ async def update( """Update an existing agent. Args: - description: Replacement description. + base_model: Replacement base model. + + Omit or pass `null` to leave unchanged, or pass an empty + string to clear. - Omit or pass `null` to leave unchanged, or use an empty + description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. name: The new name for the agent @@ -350,6 +403,7 @@ async def update( path_template("/agent/identities/{uid}", uid=uid), body=await async_maybe_transform( { + "base_model": base_model, "description": description, "name": name, "secrets": secrets, @@ -421,6 +475,42 @@ async def delete( cast_to=NoneType, ) + async def get( + self, + uid: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AgentResponse: + """Retrieve a single agent by its unique identifier. + + The response includes an + `available` flag indicating whether the agent is within the team's plan limit + and may be used for runs. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not uid: + raise ValueError(f"Expected a non-empty value for `uid` but received {uid!r}") + return await self._get( + path_template("/agent/identities/{uid}", uid=uid), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=AgentResponse, + ) + class AgentResourceWithRawResponse: def __init__(self, agent: AgentResource) -> None: @@ -438,6 +528,9 @@ def __init__(self, agent: AgentResource) -> None: self.delete = to_raw_response_wrapper( agent.delete, ) + self.get = to_raw_response_wrapper( + agent.get, + ) class AsyncAgentResourceWithRawResponse: @@ -456,6 +549,9 @@ def __init__(self, agent: AsyncAgentResource) -> None: self.delete = async_to_raw_response_wrapper( agent.delete, ) + self.get = async_to_raw_response_wrapper( + agent.get, + ) class AgentResourceWithStreamingResponse: @@ -474,6 +570,9 @@ def __init__(self, agent: AgentResource) -> None: self.delete = to_streamed_response_wrapper( agent.delete, ) + self.get = to_streamed_response_wrapper( + agent.get, + ) class AsyncAgentResourceWithStreamingResponse: @@ -492,3 +591,6 @@ def __init__(self, agent: AsyncAgentResource) -> None: self.delete = async_to_streamed_response_wrapper( agent.delete, ) + self.get = async_to_streamed_response_wrapper( + agent.get, + ) 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 5f31e19..73d8734 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -14,6 +14,9 @@ class AgentCreateParams(TypedDict, total=False): name: Required[str] """A name for the agent""" + base_model: Optional[str] + """Optional base model for runs executed by this agent.""" + description: Optional[str] """Optional description of the agent""" diff --git a/src/oz_agent_sdk/types/agent/agent_response.py b/src/oz_agent_sdk/types/agent/agent_response.py index 8b46c85..1370bda 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -37,5 +37,15 @@ class AgentResponse(BaseModel): uid: str """Unique identifier for the agent""" + base_model: Optional[str] = None + """Base model for runs executed by this agent. + + The precedence order for model resolution is: + + 1. The model specified on the run itself + 2. The agent's base model + 3. The team's default model + """ + description: Optional[str] = None """Optional description 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 d3cc68a..271122d 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -11,6 +11,12 @@ class AgentUpdateParams(TypedDict, total=False): + base_model: Optional[str] + """Replacement base model. + + Omit or pass `null` to leave unchanged, or pass an empty string to clear. + """ + description: Optional[str] """Replacement description. diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 5b802d8..4293ce2 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -44,6 +44,9 @@ class RequestUsage(BaseModel): inference_cost: Optional[float] = None """Cost of LLM inference for the run""" + platform_cost: Optional[float] = None + """Cost of platform usage for the run""" + class Schedule(BaseModel): """ diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py index d307d25..d66ddfa 100644 --- a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py @@ -41,9 +41,6 @@ class ScheduledAgentItem(BaseModel): agent_config: Optional[AmbientAgentConfig] = None """Configuration for a cloud agent run""" - agent_uid: Optional[str] = None - """UID of the agent that this schedule runs as""" - created_by: Optional[UserProfile] = None environment: Optional[CloudEnvironmentConfig] = None diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index a23b05e..5d0632e 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -33,6 +33,7 @@ def test_method_create(self, client: OzAPI) -> None: def test_method_create_with_all_params(self, client: OzAPI) -> None: agent = client.agent.agent.create( name="name", + base_model="base_model", description="description", secrets=[{"name": "name"}], skills=["string"], @@ -78,6 +79,7 @@ def test_method_update(self, client: OzAPI) -> None: def test_method_update_with_all_params(self, client: OzAPI) -> None: agent = client.agent.agent.update( uid="uid", + base_model="base_model", description="description", name="name", secrets=[{"name": "name"}], @@ -189,6 +191,48 @@ def test_path_params_delete(self, client: OzAPI) -> None: "", ) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get(self, client: OzAPI) -> None: + agent = client.agent.agent.get( + "uid", + ) + assert_matches_type(AgentResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get(self, client: OzAPI) -> None: + response = client.agent.agent.with_raw_response.get( + "uid", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + agent = response.parse() + assert_matches_type(AgentResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get(self, client: OzAPI) -> None: + with client.agent.agent.with_streaming_response.get( + "uid", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + agent = response.parse() + assert_matches_type(AgentResponse, agent, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_path_params_get(self, client: OzAPI) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `uid` but received ''"): + client.agent.agent.with_raw_response.get( + "", + ) + class TestAsyncAgent: parametrize = pytest.mark.parametrize( @@ -208,6 +252,7 @@ async def test_method_create(self, async_client: AsyncOzAPI) -> None: async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.agent.create( name="name", + base_model="base_model", description="description", secrets=[{"name": "name"}], skills=["string"], @@ -253,6 +298,7 @@ async def test_method_update(self, async_client: AsyncOzAPI) -> None: async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.agent.update( uid="uid", + base_model="base_model", description="description", name="name", secrets=[{"name": "name"}], @@ -363,3 +409,45 @@ async def test_path_params_delete(self, async_client: AsyncOzAPI) -> None: await async_client.agent.agent.with_raw_response.delete( "", ) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get(self, async_client: AsyncOzAPI) -> None: + agent = await async_client.agent.agent.get( + "uid", + ) + assert_matches_type(AgentResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get(self, async_client: AsyncOzAPI) -> None: + response = await async_client.agent.agent.with_raw_response.get( + "uid", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + agent = await response.parse() + assert_matches_type(AgentResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get(self, async_client: AsyncOzAPI) -> None: + async with async_client.agent.agent.with_streaming_response.get( + "uid", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + agent = await response.parse() + assert_matches_type(AgentResponse, agent, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_path_params_get(self, async_client: AsyncOzAPI) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `uid` but received ''"): + await async_client.agent.agent.with_raw_response.get( + "", + ) diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 0bf7d09..0beb0e2 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -59,7 +59,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -179,7 +179,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", mode="normal", prompt="prompt", ) @@ -426,7 +426,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -546,7 +546,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", mode="normal", prompt="prompt", ) From 72663ee8a71564bc73f9a5a216dfb38435743538 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 17:26:29 +0000 Subject: [PATCH 02/20] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5a9669..6ec11d8 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-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml -openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae -config_hash: 5a6e285f6e3a958a887b31b972a3f49c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-95fd659ab055d33de4465fa86edddecf1d37495e72a1a8d487b28f49f1a3a08d.yml +openapi_spec_hash: aba6df5293b615c5551f0e95c969899d +config_hash: 236823a4936c76818117c16aa5c188df From 04a1228aa984e4ffe30438e23fddba202e7b11b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 18:07:19 +0000 Subject: [PATCH 03/20] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6ec11d8..d5a9669 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-95fd659ab055d33de4465fa86edddecf1d37495e72a1a8d487b28f49f1a3a08d.yml -openapi_spec_hash: aba6df5293b615c5551f0e95c969899d -config_hash: 236823a4936c76818117c16aa5c188df +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml +openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae +config_hash: 5a6e285f6e3a958a887b31b972a3f49c From 17a8e5bf17b882a440a067fee1569caf679f8b55 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 16:27:49 +0000 Subject: [PATCH 04/20] fix(client): add missing f-string prefix in file type error message --- src/oz_agent_sdk/_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oz_agent_sdk/_files.py b/src/oz_agent_sdk/_files.py index 0fdce17..76da9e0 100644 --- a/src/oz_agent_sdk/_files.py +++ b/src/oz_agent_sdk/_files.py @@ -99,7 +99,7 @@ async def async_to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles elif is_sequence_t(files): files = [(key, await _async_transform_file(file)) for key, file in files] else: - raise TypeError("Unexpected file type input {type(files)}, expected mapping or sequence") + raise TypeError(f"Unexpected file type input {type(files)}, expected mapping or sequence") return files From 7689e121d6f22efad3d81828721f8ed900b9cd28 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 17:26:13 +0000 Subject: [PATCH 05/20] feat: Retrieve memories in third party harnesses --- .stats.yml | 6 +++--- src/oz_agent_sdk/types/agent/scheduled_agent_item.py | 3 +++ tests/api_resources/agent/test_schedules.py | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5a9669..2503aa1 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-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml -openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae -config_hash: 5a6e285f6e3a958a887b31b972a3f49c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-8928c6970dcbece8f34d4853c3f195ed09337e7327a98f76c98b6f4320128d2a.yml +openapi_spec_hash: 4843439a919091138edb8a66714414e8 +config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py index d66ddfa..d307d25 100644 --- a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py @@ -41,6 +41,9 @@ class ScheduledAgentItem(BaseModel): agent_config: Optional[AmbientAgentConfig] = None """Configuration for a cloud agent run""" + agent_uid: Optional[str] = None + """UID of the agent that this schedule runs as""" + created_by: Optional[UserProfile] = None environment: Optional[CloudEnvironmentConfig] = None diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 0beb0e2..0bf7d09 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -59,7 +59,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -179,7 +179,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", mode="normal", prompt="prompt", ) @@ -426,7 +426,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -546,7 +546,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", mode="normal", prompt="prompt", ) From af81ef3a2d48f378209cf69a3074997cb02b1b6c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 19:27:56 +0000 Subject: [PATCH 06/20] feat(api): api update --- .stats.yml | 6 +++--- src/oz_agent_sdk/types/agent/scheduled_agent_item.py | 3 --- tests/api_resources/agent/test_schedules.py | 8 ++++---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2503aa1..d5a9669 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-8928c6970dcbece8f34d4853c3f195ed09337e7327a98f76c98b6f4320128d2a.yml -openapi_spec_hash: 4843439a919091138edb8a66714414e8 -config_hash: 236823a4936c76818117c16aa5c188df +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml +openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae +config_hash: 5a6e285f6e3a958a887b31b972a3f49c diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py index d307d25..d66ddfa 100644 --- a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py @@ -41,9 +41,6 @@ class ScheduledAgentItem(BaseModel): agent_config: Optional[AmbientAgentConfig] = None """Configuration for a cloud agent run""" - agent_uid: Optional[str] = None - """UID of the agent that this schedule runs as""" - created_by: Optional[UserProfile] = None environment: Optional[CloudEnvironmentConfig] = None diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 0bf7d09..0beb0e2 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -59,7 +59,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -179,7 +179,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", mode="normal", prompt="prompt", ) @@ -426,7 +426,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -546,7 +546,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", mode="normal", prompt="prompt", ) From 94b5348152c6b0bfb03b0d3887366c4a65e397fb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 02:28:06 +0000 Subject: [PATCH 07/20] =?UTF-8?q?feat(memory):=20agent=20identity=20memory?= =?UTF-8?q?=20store=20attachments=20=E2=80=94=20API=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .stats.yml | 4 +-- src/oz_agent_sdk/resources/agent/agent_.py | 22 +++++++++++++++ .../types/agent/agent_create_params.py | 24 ++++++++++++++-- .../types/agent/agent_response.py | 22 ++++++++++++++- .../types/agent/agent_update_params.py | 24 ++++++++++++++-- tests/api_resources/agent/test_agent_.py | 28 +++++++++++++++++++ 6 files changed, 117 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5a9669..a48c37d 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-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml -openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-2783b07289e9f71f07550497c5180824f3dbc92477b5d1d8a80fa6dce4e3b8b6.yml +openapi_spec_hash: e1d4cff965beed1ec255bf387d55d940 config_hash: 5a6e285f6e3a958a887b31b972a3f49c diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index 0bfc72b..5466a06 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -52,6 +52,7 @@ def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -73,6 +74,10 @@ def create( description: Optional description of the agent + 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. + secrets: Optional list of secrets associated with the agent. Duplicate names within a single request are rejected. Each entry is unioned into the run-time secret scope when the agent executes. @@ -99,6 +104,7 @@ def create( "name": name, "base_model": base_model, "description": description, + "memory_stores": memory_stores, "secrets": secrets, "skills": skills, }, @@ -116,6 +122,7 @@ def update( *, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, skills: Optional[SequenceNotStr[str]] | Omit = omit, @@ -137,6 +144,9 @@ def update( description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. + 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. + name: The new name for the agent secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to @@ -161,6 +171,7 @@ def update( { "base_model": base_model, "description": description, + "memory_stores": memory_stores, "name": name, "secrets": secrets, "skills": skills, @@ -296,6 +307,7 @@ async def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -317,6 +329,10 @@ async def create( description: Optional description of the agent + 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. + secrets: Optional list of secrets associated with the agent. Duplicate names within a single request are rejected. Each entry is unioned into the run-time secret scope when the agent executes. @@ -343,6 +359,7 @@ async def create( "name": name, "base_model": base_model, "description": description, + "memory_stores": memory_stores, "secrets": secrets, "skills": skills, }, @@ -360,6 +377,7 @@ async def update( *, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, skills: Optional[SequenceNotStr[str]] | Omit = omit, @@ -381,6 +399,9 @@ async def update( description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. + 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. + name: The new name for the agent secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to @@ -405,6 +426,7 @@ async def update( { "base_model": base_model, "description": description, + "memory_stores": memory_stores, "name": name, "secrets": secrets, "skills": skills, 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 73d8734..3ab1178 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Iterable, Optional -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr -__all__ = ["AgentCreateParams", "Secret"] +__all__ = ["AgentCreateParams", "MemoryStore", "Secret"] class AgentCreateParams(TypedDict, total=False): @@ -20,6 +20,13 @@ class AgentCreateParams(TypedDict, total=False): description: Optional[str] """Optional description of the agent""" + 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. + """ + secrets: Iterable[Secret] """ Optional list of secrets associated with the agent. Duplicate names within a @@ -37,6 +44,19 @@ class AgentCreateParams(TypedDict, total=False): """ +class MemoryStore(TypedDict, total=False): + """Reference to a memory store to attach to an agent.""" + + access: Required[Literal["read_write", "read_only"]] + """Access level for the store.""" + + instructions: Required[str] + """Instructions for how the agent should use this memory store. Must not be empty.""" + + uid: Required[str] + """UID of the memory store.""" + + 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 1370bda..2189a46 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -2,10 +2,24 @@ from typing import List, Optional from datetime import datetime +from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["AgentResponse", "Secret"] +__all__ = ["AgentResponse", "MemoryStore", "Secret"] + + +class MemoryStore(BaseModel): + """Reference to a memory store to attach 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. Must not be empty.""" + + uid: str + """UID of the memory store.""" class Secret(BaseModel): @@ -22,6 +36,12 @@ 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. + """ + 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 271122d..6a4ad86 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Iterable, Optional -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr -__all__ = ["AgentUpdateParams", "Secret"] +__all__ = ["AgentUpdateParams", "MemoryStore", "Secret"] class AgentUpdateParams(TypedDict, total=False): @@ -23,6 +23,13 @@ class AgentUpdateParams(TypedDict, total=False): Omit or pass `null` to leave unchanged, or use an empty value to clear. """ + 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. + """ + name: str """The new name for the agent""" @@ -41,6 +48,19 @@ class AgentUpdateParams(TypedDict, total=False): """ +class MemoryStore(TypedDict, total=False): + """Reference to a memory store to attach to an agent.""" + + access: Required[Literal["read_write", "read_only"]] + """Access level for the store.""" + + instructions: Required[str] + """Instructions for how the agent should use this memory store. Must not be empty.""" + + uid: Required[str] + """UID of the memory store.""" + + class Secret(TypedDict, total=False): """Reference to a managed secret by name.""" diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index 5d0632e..11507d9 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -35,6 +35,13 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: name="name", base_model="base_model", description="description", + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], secrets=[{"name": "name"}], skills=["string"], ) @@ -81,6 +88,13 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: uid="uid", base_model="base_model", description="description", + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], name="name", secrets=[{"name": "name"}], skills=["string"], @@ -254,6 +268,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> name="name", base_model="base_model", description="description", + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], secrets=[{"name": "name"}], skills=["string"], ) @@ -300,6 +321,13 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> uid="uid", base_model="base_model", description="description", + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], name="name", secrets=[{"name": "name"}], skills=["string"], From 6bb74c2b695cd268fe8466fc6099f082370ba54e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 02:44:11 +0000 Subject: [PATCH 08/20] feat(memory): wire memory stores into run pipeline and add listing endpoint --- .stats.yml | 6 ++-- .../types/agent/scheduled_agent_item.py | 3 ++ .../types/ambient_agent_config.py | 20 +++++++++-- .../types/ambient_agent_config_param.py | 22 ++++++++++-- tests/api_resources/agent/test_schedules.py | 36 ++++++++++++++++--- tests/api_resources/test_agent.py | 14 ++++++++ 6 files changed, 89 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index a48c37d..2857be4 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-2783b07289e9f71f07550497c5180824f3dbc92477b5d1d8a80fa6dce4e3b8b6.yml -openapi_spec_hash: e1d4cff965beed1ec255bf387d55d940 -config_hash: 5a6e285f6e3a958a887b31b972a3f49c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-8c84aaafca600b8a8f64e590997958a0b9dcb6172fdf3220dd243c20bd0ee3dc.yml +openapi_spec_hash: 82d67b5080e55941b619875c222b94b8 +config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py index d66ddfa..d307d25 100644 --- a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py @@ -41,6 +41,9 @@ class ScheduledAgentItem(BaseModel): agent_config: Optional[AmbientAgentConfig] = None """Configuration for a cloud agent run""" + agent_uid: Optional[str] = None + """UID of the agent that this schedule runs as""" + created_by: Optional[UserProfile] = None environment: Optional[CloudEnvironmentConfig] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 148931d..b522e51 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Optional +from typing import Dict, List, Optional from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -8,7 +8,7 @@ from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig", "Harness", "HarnessAuthSecrets", "SessionSharing"] +__all__ = ["AmbientAgentConfig", "Harness", "HarnessAuthSecrets", "MemoryStore", "SessionSharing"] class Harness(BaseModel): @@ -41,6 +41,19 @@ class HarnessAuthSecrets(BaseModel): """ +class MemoryStore(BaseModel): + """Reference to a memory store to attach 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. Must not be empty.""" + + uid: str + """UID of the memory store.""" + + class SessionSharing(BaseModel): """ Configures sharing behavior for the run's shared session. @@ -100,6 +113,9 @@ class AmbientAgentConfig(BaseModel): mcp_servers: Optional[Dict[str, McpServerConfig]] = None """Map of MCP server configurations by name""" + memory_stores: Optional[List[MemoryStore]] = None + """Memory stores to attach to this run.""" + api_model_id: Optional[str] = FieldInfo(alias="model_id", default=None) """LLM model to use (uses team default if not specified)""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index f4c6ee4..3a4b7d0 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -2,12 +2,12 @@ from __future__ import annotations -from typing import Dict -from typing_extensions import Literal, TypedDict +from typing import Dict, Iterable +from typing_extensions import Literal, Required, TypedDict from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam", "Harness", "HarnessAuthSecrets", "SessionSharing"] +__all__ = ["AmbientAgentConfigParam", "Harness", "HarnessAuthSecrets", "MemoryStore", "SessionSharing"] class Harness(TypedDict, total=False): @@ -40,6 +40,19 @@ class HarnessAuthSecrets(TypedDict, total=False): """ +class MemoryStore(TypedDict, total=False): + """Reference to a memory store to attach to an agent.""" + + access: Required[Literal["read_write", "read_only"]] + """Access level for the store.""" + + instructions: Required[str] + """Instructions for how the agent should use this memory store. Must not be empty.""" + + uid: Required[str] + """UID of the memory store.""" + + class SessionSharing(TypedDict, total=False): """ Configures sharing behavior for the run's shared session. @@ -99,6 +112,9 @@ class AmbientAgentConfigParam(TypedDict, total=False): mcp_servers: Dict[str, McpServerConfigParam] """Map of MCP server configurations by name""" + memory_stores: Iterable[MemoryStore] + """Memory stores to attach to this run.""" + model_id: str """LLM model to use (uses team default if not specified)""" diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 0beb0e2..4a33c97 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -53,13 +53,20 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -173,13 +180,20 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", mode="normal", prompt="prompt", ) @@ -420,13 +434,20 @@ 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", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -540,13 +561,20 @@ 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", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", mode="normal", prompt="prompt", ) diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index a10a54e..d0d2742 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -174,6 +174,13 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, @@ -371,6 +378,13 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, From cca82b2020d9b8f83700bc614dbb0f6e2f5e7af1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 18:34:57 +0000 Subject: [PATCH 09/20] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2857be4..addf7af 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-8c84aaafca600b8a8f64e590997958a0b9dcb6172fdf3220dd243c20bd0ee3dc.yml -openapi_spec_hash: 82d67b5080e55941b619875c222b94b8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-f17568757e003a96eb9843fb7f173f5df491bc3aa6b39a5189e9c33602912121.yml +openapi_spec_hash: a391afecf639f9c4993f37e5bbd06369 config_hash: 236823a4936c76818117c16aa5c188df From fb819d6ecb674fd145a8797846ead6a72d227aa4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 14:41:43 +0000 Subject: [PATCH 10/20] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index addf7af..4f81387 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-f17568757e003a96eb9843fb7f173f5df491bc3aa6b39a5189e9c33602912121.yml -openapi_spec_hash: a391afecf639f9c4993f37e5bbd06369 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-39a99ab48c1c418a7cf1535c85ff115b2745b5a6fd04aa4d148ae91a58a3dcd8.yml +openapi_spec_hash: 5c307d9da7c5debd964c0da4ebe82214 config_hash: 236823a4936c76818117c16aa5c188df From 2730eea19d91df998de5ef1b5da4989670a5889a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 14:43:29 +0000 Subject: [PATCH 11/20] feat(api): api update --- .stats.yml | 6 ++-- src/oz_agent_sdk/resources/agent/agent_.py | 22 ------------ .../types/agent/agent_create_params.py | 24 ++----------- .../types/agent/agent_response.py | 22 +----------- .../types/agent/agent_update_params.py | 24 ++----------- .../types/agent/scheduled_agent_item.py | 3 -- .../types/ambient_agent_config.py | 20 ++--------- .../types/ambient_agent_config_param.py | 22 ++---------- tests/api_resources/agent/test_agent_.py | 28 --------------- tests/api_resources/agent/test_schedules.py | 36 +++---------------- tests/api_resources/test_agent.py | 14 -------- 11 files changed, 17 insertions(+), 204 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4f81387..d5a9669 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-39a99ab48c1c418a7cf1535c85ff115b2745b5a6fd04aa4d148ae91a58a3dcd8.yml -openapi_spec_hash: 5c307d9da7c5debd964c0da4ebe82214 -config_hash: 236823a4936c76818117c16aa5c188df +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml +openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae +config_hash: 5a6e285f6e3a958a887b31b972a3f49c diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index 5466a06..0bfc72b 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -52,7 +52,6 @@ def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -74,10 +73,6 @@ def create( description: Optional description of the agent - 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. - secrets: Optional list of secrets associated with the agent. Duplicate names within a single request are rejected. Each entry is unioned into the run-time secret scope when the agent executes. @@ -104,7 +99,6 @@ def create( "name": name, "base_model": base_model, "description": description, - "memory_stores": memory_stores, "secrets": secrets, "skills": skills, }, @@ -122,7 +116,6 @@ def update( *, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, skills: Optional[SequenceNotStr[str]] | Omit = omit, @@ -144,9 +137,6 @@ def update( description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. - 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. - name: The new name for the agent secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to @@ -171,7 +161,6 @@ def update( { "base_model": base_model, "description": description, - "memory_stores": memory_stores, "name": name, "secrets": secrets, "skills": skills, @@ -307,7 +296,6 @@ async def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -329,10 +317,6 @@ async def create( description: Optional description of the agent - 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. - secrets: Optional list of secrets associated with the agent. Duplicate names within a single request are rejected. Each entry is unioned into the run-time secret scope when the agent executes. @@ -359,7 +343,6 @@ async def create( "name": name, "base_model": base_model, "description": description, - "memory_stores": memory_stores, "secrets": secrets, "skills": skills, }, @@ -377,7 +360,6 @@ async def update( *, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, skills: Optional[SequenceNotStr[str]] | Omit = omit, @@ -399,9 +381,6 @@ async def update( description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. - 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. - name: The new name for the agent secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to @@ -426,7 +405,6 @@ async def update( { "base_model": base_model, "description": description, - "memory_stores": memory_stores, "name": name, "secrets": secrets, "skills": skills, 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 3ab1178..73d8734 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Iterable, Optional -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict from ..._types import SequenceNotStr -__all__ = ["AgentCreateParams", "MemoryStore", "Secret"] +__all__ = ["AgentCreateParams", "Secret"] class AgentCreateParams(TypedDict, total=False): @@ -20,13 +20,6 @@ class AgentCreateParams(TypedDict, total=False): description: Optional[str] """Optional description of the agent""" - 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. - """ - secrets: Iterable[Secret] """ Optional list of secrets associated with the agent. Duplicate names within a @@ -44,19 +37,6 @@ class AgentCreateParams(TypedDict, total=False): """ -class MemoryStore(TypedDict, total=False): - """Reference to a memory store to attach to an agent.""" - - access: Required[Literal["read_write", "read_only"]] - """Access level for the store.""" - - instructions: Required[str] - """Instructions for how the agent should use this memory store. Must not be empty.""" - - uid: Required[str] - """UID of the memory store.""" - - 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 2189a46..1370bda 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -2,24 +2,10 @@ from typing import List, Optional from datetime import datetime -from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["AgentResponse", "MemoryStore", "Secret"] - - -class MemoryStore(BaseModel): - """Reference to a memory store to attach 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. Must not be empty.""" - - uid: str - """UID of the memory store.""" +__all__ = ["AgentResponse", "Secret"] class Secret(BaseModel): @@ -36,12 +22,6 @@ 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. - """ - 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 6a4ad86..271122d 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Iterable, Optional -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict from ..._types import SequenceNotStr -__all__ = ["AgentUpdateParams", "MemoryStore", "Secret"] +__all__ = ["AgentUpdateParams", "Secret"] class AgentUpdateParams(TypedDict, total=False): @@ -23,13 +23,6 @@ class AgentUpdateParams(TypedDict, total=False): Omit or pass `null` to leave unchanged, or use an empty value to clear. """ - 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. - """ - name: str """The new name for the agent""" @@ -48,19 +41,6 @@ class AgentUpdateParams(TypedDict, total=False): """ -class MemoryStore(TypedDict, total=False): - """Reference to a memory store to attach to an agent.""" - - access: Required[Literal["read_write", "read_only"]] - """Access level for the store.""" - - instructions: Required[str] - """Instructions for how the agent should use this memory store. Must not be empty.""" - - uid: Required[str] - """UID of the memory store.""" - - class Secret(TypedDict, total=False): """Reference to a managed secret by name.""" diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py index d307d25..d66ddfa 100644 --- a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py @@ -41,9 +41,6 @@ class ScheduledAgentItem(BaseModel): agent_config: Optional[AmbientAgentConfig] = None """Configuration for a cloud agent run""" - agent_uid: Optional[str] = None - """UID of the agent that this schedule runs as""" - created_by: Optional[UserProfile] = None environment: Optional[CloudEnvironmentConfig] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index b522e51..148931d 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, Optional from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -8,7 +8,7 @@ from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig", "Harness", "HarnessAuthSecrets", "MemoryStore", "SessionSharing"] +__all__ = ["AmbientAgentConfig", "Harness", "HarnessAuthSecrets", "SessionSharing"] class Harness(BaseModel): @@ -41,19 +41,6 @@ class HarnessAuthSecrets(BaseModel): """ -class MemoryStore(BaseModel): - """Reference to a memory store to attach 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. Must not be empty.""" - - uid: str - """UID of the memory store.""" - - class SessionSharing(BaseModel): """ Configures sharing behavior for the run's shared session. @@ -113,9 +100,6 @@ class AmbientAgentConfig(BaseModel): mcp_servers: Optional[Dict[str, McpServerConfig]] = None """Map of MCP server configurations by name""" - memory_stores: Optional[List[MemoryStore]] = None - """Memory stores to attach to this run.""" - api_model_id: Optional[str] = FieldInfo(alias="model_id", default=None) """LLM model to use (uses team default if not specified)""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 3a4b7d0..f4c6ee4 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -2,12 +2,12 @@ from __future__ import annotations -from typing import Dict, Iterable -from typing_extensions import Literal, Required, TypedDict +from typing import Dict +from typing_extensions import Literal, TypedDict from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam", "Harness", "HarnessAuthSecrets", "MemoryStore", "SessionSharing"] +__all__ = ["AmbientAgentConfigParam", "Harness", "HarnessAuthSecrets", "SessionSharing"] class Harness(TypedDict, total=False): @@ -40,19 +40,6 @@ class HarnessAuthSecrets(TypedDict, total=False): """ -class MemoryStore(TypedDict, total=False): - """Reference to a memory store to attach to an agent.""" - - access: Required[Literal["read_write", "read_only"]] - """Access level for the store.""" - - instructions: Required[str] - """Instructions for how the agent should use this memory store. Must not be empty.""" - - uid: Required[str] - """UID of the memory store.""" - - class SessionSharing(TypedDict, total=False): """ Configures sharing behavior for the run's shared session. @@ -112,9 +99,6 @@ class AmbientAgentConfigParam(TypedDict, total=False): mcp_servers: Dict[str, McpServerConfigParam] """Map of MCP server configurations by name""" - memory_stores: Iterable[MemoryStore] - """Memory stores to attach to this run.""" - model_id: str """LLM model to use (uses team default if not specified)""" diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index 11507d9..5d0632e 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -35,13 +35,6 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: name="name", base_model="base_model", description="description", - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], secrets=[{"name": "name"}], skills=["string"], ) @@ -88,13 +81,6 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: uid="uid", base_model="base_model", description="description", - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], name="name", secrets=[{"name": "name"}], skills=["string"], @@ -268,13 +254,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> name="name", base_model="base_model", description="description", - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], secrets=[{"name": "name"}], skills=["string"], ) @@ -321,13 +300,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> uid="uid", base_model="base_model", description="description", - memory_stores=[ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], name="name", secrets=[{"name": "name"}], skills=["string"], diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 4a33c97..0beb0e2 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -53,20 +53,13 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, - "memory_stores": [ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -180,20 +173,13 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, - "memory_stores": [ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", mode="normal", prompt="prompt", ) @@ -434,20 +420,13 @@ 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", - } - ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -561,20 +540,13 @@ 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", - } - ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + agent_uid="agent_uid", mode="normal", prompt="prompt", ) diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index d0d2742..a10a54e 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -174,13 +174,6 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, - "memory_stores": [ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, @@ -378,13 +371,6 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "warp_id": "warp_id", } }, - "memory_stores": [ - { - "access": "read_write", - "instructions": "instructions", - "uid": "uid", - } - ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, From 520c8350b5b7850242adc082fe83a7ae666e6da6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 15:49:20 +0000 Subject: [PATCH 12/20] feat(agents): add prompt property to agent identity data model --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/agent_.py | 18 ++++++++++++++++++ .../types/agent/agent_create_params.py | 3 +++ src/oz_agent_sdk/types/agent/agent_response.py | 3 +++ .../types/agent/agent_update_params.py | 6 ++++++ tests/api_resources/agent/test_agent_.py | 4 ++++ 6 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5a9669..8a04b2b 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-e752e75a35d88b84870729ef94b0c32783172983420cbff1b204ca14375553f7.yml -openapi_spec_hash: 34787afc1e1c84a643431a0f0eb352ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-d662aff074fd108261bcfc38540e31dbbbd86c4e94a798ebe58714650c21cb87.yml +openapi_spec_hash: 7065b44212d19f637200a4b5da97c2e2 config_hash: 5a6e285f6e3a958a887b31b972a3f49c diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index 0bfc72b..2be98e7 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -52,6 +52,7 @@ def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -73,6 +74,8 @@ def create( description: Optional description of the agent + prompt: Optional base prompt for this agent + secrets: Optional list of secrets associated with the agent. Duplicate names within a single request are rejected. Each entry is unioned into the run-time secret scope when the agent executes. @@ -99,6 +102,7 @@ def create( "name": name, "base_model": base_model, "description": description, + "prompt": prompt, "secrets": secrets, "skills": skills, }, @@ -117,6 +121,7 @@ def update( base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, name: str | Omit = omit, + prompt: Optional[str] | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, skills: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -139,6 +144,9 @@ def update( name: The new name for the agent + prompt: Replacement prompt. Omit or pass `null` to leave unchanged, or use an empty + value to clear. + secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array to replace. Duplicate names are rejected. @@ -162,6 +170,7 @@ def update( "base_model": base_model, "description": description, "name": name, + "prompt": prompt, "secrets": secrets, "skills": skills, }, @@ -296,6 +305,7 @@ async def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -317,6 +327,8 @@ async def create( description: Optional description of the agent + prompt: Optional base prompt for this agent + secrets: Optional list of secrets associated with the agent. Duplicate names within a single request are rejected. Each entry is unioned into the run-time secret scope when the agent executes. @@ -343,6 +355,7 @@ async def create( "name": name, "base_model": base_model, "description": description, + "prompt": prompt, "secrets": secrets, "skills": skills, }, @@ -361,6 +374,7 @@ async def update( base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, name: str | Omit = omit, + prompt: Optional[str] | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, skills: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -383,6 +397,9 @@ async def update( name: The new name for the agent + prompt: Replacement prompt. Omit or pass `null` to leave unchanged, or use an empty + value to clear. + secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array to replace. Duplicate names are rejected. @@ -406,6 +423,7 @@ async def update( "base_model": base_model, "description": description, "name": name, + "prompt": prompt, "secrets": secrets, "skills": skills, }, 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 73d8734..2cff9e1 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -20,6 +20,9 @@ class AgentCreateParams(TypedDict, total=False): description: Optional[str] """Optional description of the agent""" + prompt: Optional[str] + """Optional base prompt for this agent""" + secrets: Iterable[Secret] """ Optional list of secrets associated with the agent. Duplicate names within a diff --git a/src/oz_agent_sdk/types/agent/agent_response.py b/src/oz_agent_sdk/types/agent/agent_response.py index 1370bda..4713b5f 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -49,3 +49,6 @@ class AgentResponse(BaseModel): description: Optional[str] = None """Optional description of the agent""" + + 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 271122d..a918697 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -26,6 +26,12 @@ class AgentUpdateParams(TypedDict, total=False): name: str """The new name for the agent""" + prompt: Optional[str] + """Replacement prompt. + + Omit or pass `null` to leave unchanged, or use an empty value to clear. + """ + secrets: Optional[Iterable[Secret]] """Replacement list of secrets. diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index 5d0632e..86fce6e 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -35,6 +35,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: name="name", base_model="base_model", description="description", + prompt="prompt", secrets=[{"name": "name"}], skills=["string"], ) @@ -82,6 +83,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: base_model="base_model", description="description", name="name", + prompt="prompt", secrets=[{"name": "name"}], skills=["string"], ) @@ -254,6 +256,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> name="name", base_model="base_model", description="description", + prompt="prompt", secrets=[{"name": "name"}], skills=["string"], ) @@ -301,6 +304,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> base_model="base_model", description="description", name="name", + prompt="prompt", secrets=[{"name": "name"}], skills=["string"], ) From a588f0e5ba27503659b5abf01d0ebc01f652950d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 17:37:00 +0000 Subject: [PATCH 13/20] feat(internal/types): support eagerly validating pydantic iterators --- src/oz_agent_sdk/_models.py | 80 +++++++++++++++++++++++++++++++++++++ tests/test_models.py | 60 ++++++++++++++++++++++++++-- 2 files changed, 137 insertions(+), 3 deletions(-) diff --git a/src/oz_agent_sdk/_models.py b/src/oz_agent_sdk/_models.py index e22dd2a..69f41a6 100644 --- a/src/oz_agent_sdk/_models.py +++ b/src/oz_agent_sdk/_models.py @@ -25,7 +25,9 @@ ClassVar, Protocol, Required, + Annotated, ParamSpec, + TypeAlias, TypedDict, TypeGuard, final, @@ -79,7 +81,15 @@ from ._constants import RAW_RESPONSE_HEADER if TYPE_CHECKING: + from pydantic import GetCoreSchemaHandler, ValidatorFunctionWrapHandler + from pydantic_core import CoreSchema, core_schema from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema +else: + try: + from pydantic_core import CoreSchema, core_schema + except ImportError: + CoreSchema = None + core_schema = None __all__ = ["BaseModel", "GenericModel"] @@ -396,6 +406,76 @@ def model_dump_json( ) +class _EagerIterable(list[_T], Generic[_T]): + """ + Accepts any Iterable[T] input (including generators), consumes it + eagerly, and validates all items upfront. + + Validation preserves the original container type where possible + (e.g. a set[T] stays a set[T]). Serialization (model_dump / JSON) + always emits a list — round-tripping through model_dump() will not + restore the original container type. + """ + + @classmethod + def __get_pydantic_core_schema__( + cls, + source_type: Any, + handler: GetCoreSchemaHandler, + ) -> CoreSchema: + (item_type,) = get_args(source_type) or (Any,) + item_schema: CoreSchema = handler.generate_schema(item_type) + list_of_items_schema: CoreSchema = core_schema.list_schema(item_schema) + + return core_schema.no_info_wrap_validator_function( + cls._validate, + list_of_items_schema, + serialization=core_schema.plain_serializer_function_ser_schema( + cls._serialize, + info_arg=False, + ), + ) + + @staticmethod + def _validate(v: Iterable[_T], handler: "ValidatorFunctionWrapHandler") -> Any: + original_type: type[Any] = type(v) + + # Normalize to list so list_schema can validate each item + if isinstance(v, list): + items: list[_T] = v + else: + try: + items = list(v) + except TypeError as e: + raise TypeError("Value is not iterable") from e + + # Validate items against the inner schema + validated: list[_T] = handler(items) + + # Reconstruct original container type + if original_type is list: + return validated + # str(list) produces the list's repr, not a string built from items, + # so skip reconstruction for str and its subclasses. + if issubclass(original_type, str): + return validated + try: + return original_type(validated) + except (TypeError, ValueError): + # If the type cannot be reconstructed, just return the validated list + return validated + + @staticmethod + def _serialize(v: Iterable[_T]) -> list[_T]: + """Always serialize as a list so Pydantic's JSON encoder is happy.""" + if isinstance(v, list): + return v + return list(v) + + +EagerIterable: TypeAlias = Annotated[Iterable[_T], _EagerIterable] + + def _construct_field(value: object, field: FieldInfo, key: str) -> object: if value is None: return field_get_default(field) diff --git a/tests/test_models.py b/tests/test_models.py index c0b225d..ae6ec09 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,7 +1,8 @@ import json -from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast +from typing import TYPE_CHECKING, Any, Dict, List, Union, Iterable, Optional, cast from datetime import datetime, timezone -from typing_extensions import Literal, Annotated, TypeAliasType +from collections import deque +from typing_extensions import Literal, Annotated, TypedDict, TypeAliasType import pytest import pydantic @@ -9,7 +10,7 @@ from oz_agent_sdk._utils import PropertyInfo from oz_agent_sdk._compat import PYDANTIC_V1, parse_obj, model_dump, model_json -from oz_agent_sdk._models import DISCRIMINATOR_CACHE, BaseModel, construct_type +from oz_agent_sdk._models import DISCRIMINATOR_CACHE, BaseModel, EagerIterable, construct_type class BasicModel(BaseModel): @@ -961,3 +962,56 @@ def __getattr__(self, attr: str) -> Item: ... assert model.a.prop == 1 assert isinstance(model.a, Item) assert model.other == "foo" + + +# NOTE: Workaround for Pydantic Iterable behavior. +# Iterable fields are replaced with a ValidatorIterator and may be consumed +# during serialization, which can cause subsequent dumps to return empty data. +# See: https://github.com/pydantic/pydantic/issues/9541 +@pytest.mark.parametrize( + "data, expected_validated", + [ + ([1, 2, 3], [1, 2, 3]), + ((1, 2, 3), (1, 2, 3)), + (set([1, 2, 3]), set([1, 2, 3])), + (iter([1, 2, 3]), [1, 2, 3]), + ([], []), + ((x for x in [1, 2, 3]), [1, 2, 3]), + (map(lambda x: x, [1, 2, 3]), [1, 2, 3]), + (frozenset([1, 2, 3]), frozenset([1, 2, 3])), + (deque([1, 2, 3]), deque([1, 2, 3])), + ], + ids=["list", "tuple", "set", "iterator", "empty", "generator", "map", "frozenset", "deque"], +) +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction(data: Iterable[int], expected_validated: Iterable[int]) -> None: + class TypeWithIterable(TypedDict): + items: EagerIterable[int] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": data}}) + assert m.data["items"] == expected_validated + + # Verify repeated dumps don't lose data (the original bug) + assert m.model_dump()["data"]["items"] == list(expected_validated) + assert m.model_dump()["data"]["items"] == list(expected_validated) + + +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction_str_falls_back_to_list() -> None: + # str is iterable (over chars), but str(list_of_chars) produces the list's repr + # rather than reconstructing a string from items. We special-case str to fall + # back to list instead of attempting reconstruction. + class TypeWithIterable(TypedDict): + items: EagerIterable[str] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": "hello"}}) + + # falls back to list of chars rather than calling str(["h", "e", "l", "l", "o"]) + assert m.data["items"] == ["h", "e", "l", "l", "o"] + assert m.model_dump()["data"]["items"] == ["h", "e", "l", "l", "o"] From e4aadec916b2bea7e05e0e263b307449002e7f8b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 02:27:24 +0000 Subject: [PATCH 14/20] feat: Add per-agent AWS Bedrock OIDC inference role (backend) --- .stats.yml | 6 +- src/oz_agent_sdk/resources/agent/agent_.py | 38 ++++++++++++ .../types/agent/agent_create_params.py | 47 ++++++++++++++- .../types/agent/agent_response.py | 45 +++++++++++++- .../types/agent/agent_update_params.py | 47 ++++++++++++++- .../types/agent/scheduled_agent_item.py | 3 + .../types/ambient_agent_config.py | 51 +++++++++++++++- .../types/ambient_agent_config_param.py | 53 +++++++++++++++- tests/api_resources/agent/test_agent_.py | 52 ++++++++++++++++ tests/api_resources/agent/test_schedules.py | 60 +++++++++++++++++-- tests/api_resources/test_agent.py | 26 ++++++++ 11 files changed, 411 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8a04b2b..8e0d8bf 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-d662aff074fd108261bcfc38540e31dbbbd86c4e94a798ebe58714650c21cb87.yml -openapi_spec_hash: 7065b44212d19f637200a4b5da97c2e2 -config_hash: 5a6e285f6e3a958a887b31b972a3f49c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-b719dd35d7850ee303cdebf54fa3dfddb492a6f578344c2060cfae013b61541c.yml +openapi_spec_hash: 4c21e0d940ef5fc42767be5380571c5d +config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index 2be98e7..447bc5d 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -52,6 +52,8 @@ def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + inference_providers: agent_create_params.InferenceProviders | Omit = omit, + memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, @@ -74,6 +76,12 @@ def create( description: Optional description of the agent + inference_providers: Inference provider settings used for LLM calls. + + 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. + prompt: Optional base prompt for this agent secrets: Optional list of secrets associated with the agent. Duplicate names within a @@ -102,6 +110,8 @@ def create( "name": name, "base_model": base_model, "description": description, + "inference_providers": inference_providers, + "memory_stores": memory_stores, "prompt": prompt, "secrets": secrets, "skills": skills, @@ -120,6 +130,8 @@ def update( *, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, + memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, @@ -142,6 +154,11 @@ def update( description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. + inference_providers: Inference provider settings used for LLM calls. + + 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. + name: The new name for the agent prompt: Replacement prompt. Omit or pass `null` to leave unchanged, or use an empty @@ -169,6 +186,8 @@ def update( { "base_model": base_model, "description": description, + "inference_providers": inference_providers, + "memory_stores": memory_stores, "name": name, "prompt": prompt, "secrets": secrets, @@ -305,6 +324,8 @@ async def create( name: str, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + inference_providers: agent_create_params.InferenceProviders | Omit = omit, + memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Iterable[agent_create_params.Secret] | Omit = omit, skills: SequenceNotStr[str] | Omit = omit, @@ -327,6 +348,12 @@ async def create( description: Optional description of the agent + inference_providers: Inference provider settings used for LLM calls. + + 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. + prompt: Optional base prompt for this agent secrets: Optional list of secrets associated with the agent. Duplicate names within a @@ -355,6 +382,8 @@ async def create( "name": name, "base_model": base_model, "description": description, + "inference_providers": inference_providers, + "memory_stores": memory_stores, "prompt": prompt, "secrets": secrets, "skills": skills, @@ -373,6 +402,8 @@ async def update( *, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, + memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, prompt: Optional[str] | Omit = omit, secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit, @@ -395,6 +426,11 @@ async def update( description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. + inference_providers: Inference provider settings used for LLM calls. + + 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. + name: The new name for the agent prompt: Replacement prompt. Omit or pass `null` to leave unchanged, or use an empty @@ -422,6 +458,8 @@ async def update( { "base_model": base_model, "description": description, + "inference_providers": inference_providers, + "memory_stores": memory_stores, "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 2cff9e1..db351bc 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Iterable, Optional -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr -__all__ = ["AgentCreateParams", "Secret"] +__all__ = ["AgentCreateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"] class AgentCreateParams(TypedDict, total=False): @@ -20,6 +20,16 @@ class AgentCreateParams(TypedDict, total=False): description: Optional[str] """Optional description of the agent""" + inference_providers: InferenceProviders + """Inference provider settings used for LLM calls.""" + + 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. + """ + prompt: Optional[str] """Optional base prompt for this agent""" @@ -40,6 +50,39 @@ class AgentCreateParams(TypedDict, total=False): """ +class InferenceProvidersAws(TypedDict, total=False): + """ + Configures AWS Bedrock as the LLM inference provider for this + agent or run. + """ + + disabled: bool + """If true, opt out of Bedrock at this layer.""" + + role_arn: str + """IAM role ARN to assume when calling Bedrock.""" + + +class InferenceProviders(TypedDict, total=False): + """Inference provider settings used for LLM calls.""" + + aws: InferenceProvidersAws + """Configures AWS Bedrock as the LLM inference provider for this agent or run.""" + + +class MemoryStore(TypedDict, total=False): + """Reference to a memory store to attach to an agent.""" + + access: Required[Literal["read_write", "read_only"]] + """Access level for the store.""" + + instructions: Required[str] + """Instructions for how the agent should use this memory store. Must not be empty.""" + + uid: Required[str] + """UID of the memory store.""" + + 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 4713b5f..fac7f4a 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -2,10 +2,24 @@ from typing import List, Optional from datetime import datetime +from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["AgentResponse", "Secret"] +__all__ = ["AgentResponse", "MemoryStore", "Secret", "InferenceProviders", "InferenceProvidersAws"] + + +class MemoryStore(BaseModel): + """Reference to a memory store to attach 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. Must not be empty.""" + + uid: str + """UID of the memory store.""" class Secret(BaseModel): @@ -15,6 +29,26 @@ class Secret(BaseModel): """Name of the managed secret.""" +class InferenceProvidersAws(BaseModel): + """ + Configures AWS Bedrock as the LLM inference provider for this + agent or run. + """ + + disabled: Optional[bool] = None + """If true, opt out of Bedrock at this layer.""" + + role_arn: Optional[str] = None + """IAM role ARN to assume when calling Bedrock.""" + + +class InferenceProviders(BaseModel): + """Inference provider settings used for LLM calls.""" + + aws: Optional[InferenceProvidersAws] = None + """Configures AWS Bedrock as the LLM inference provider for this agent or run.""" + + class AgentResponse(BaseModel): available: bool """Whether this agent is within the team's plan limit and can be used for runs""" @@ -22,6 +56,12 @@ 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. + """ + name: str """Name of the agent""" @@ -50,5 +90,8 @@ class AgentResponse(BaseModel): description: Optional[str] = None """Optional description of the agent""" + inference_providers: Optional[InferenceProviders] = None + """Inference provider settings used for LLM calls.""" + 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 a918697..29278da 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Iterable, Optional -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr -__all__ = ["AgentUpdateParams", "Secret"] +__all__ = ["AgentUpdateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"] class AgentUpdateParams(TypedDict, total=False): @@ -23,6 +23,16 @@ class AgentUpdateParams(TypedDict, total=False): Omit or pass `null` to leave unchanged, or use an empty value to clear. """ + inference_providers: Optional[InferenceProviders] + """Inference provider settings used for LLM calls.""" + + 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. + """ + name: str """The new name for the agent""" @@ -47,6 +57,39 @@ class AgentUpdateParams(TypedDict, total=False): """ +class InferenceProvidersAws(TypedDict, total=False): + """ + Configures AWS Bedrock as the LLM inference provider for this + agent or run. + """ + + disabled: bool + """If true, opt out of Bedrock at this layer.""" + + role_arn: str + """IAM role ARN to assume when calling Bedrock.""" + + +class InferenceProviders(TypedDict, total=False): + """Inference provider settings used for LLM calls.""" + + aws: InferenceProvidersAws + """Configures AWS Bedrock as the LLM inference provider for this agent or run.""" + + +class MemoryStore(TypedDict, total=False): + """Reference to a memory store to attach to an agent.""" + + access: Required[Literal["read_write", "read_only"]] + """Access level for the store.""" + + instructions: Required[str] + """Instructions for how the agent should use this memory store. Must not be empty.""" + + uid: Required[str] + """UID of the memory store.""" + + class Secret(TypedDict, total=False): """Reference to a managed secret by name.""" diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py index d66ddfa..d307d25 100644 --- a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py @@ -41,6 +41,9 @@ class ScheduledAgentItem(BaseModel): agent_config: Optional[AmbientAgentConfig] = None """Configuration for a cloud agent run""" + agent_uid: Optional[str] = None + """UID of the agent that this schedule runs as""" + created_by: Optional[UserProfile] = None environment: Optional[CloudEnvironmentConfig] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 148931d..2d5b76a 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Optional +from typing import Dict, List, Optional from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -8,7 +8,15 @@ from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig", "Harness", "HarnessAuthSecrets", "SessionSharing"] +__all__ = [ + "AmbientAgentConfig", + "Harness", + "HarnessAuthSecrets", + "InferenceProviders", + "InferenceProvidersAws", + "MemoryStore", + "SessionSharing", +] class Harness(BaseModel): @@ -41,6 +49,39 @@ class HarnessAuthSecrets(BaseModel): """ +class InferenceProvidersAws(BaseModel): + """ + Configures AWS Bedrock as the LLM inference provider for this + agent or run. + """ + + disabled: Optional[bool] = None + """If true, opt out of Bedrock at this layer.""" + + role_arn: Optional[str] = None + """IAM role ARN to assume when calling Bedrock.""" + + +class InferenceProviders(BaseModel): + """Inference provider settings used for LLM calls.""" + + aws: Optional[InferenceProvidersAws] = None + """Configures AWS Bedrock as the LLM inference provider for this agent or run.""" + + +class MemoryStore(BaseModel): + """Reference to a memory store to attach 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. Must not be empty.""" + + uid: str + """UID of the memory store.""" + + class SessionSharing(BaseModel): """ Configures sharing behavior for the run's shared session. @@ -97,9 +138,15 @@ class AmbientAgentConfig(BaseModel): floor(max_instance_runtime_seconds / 60) for your billing tier). """ + inference_providers: Optional[InferenceProviders] = None + """Inference provider settings used for LLM calls.""" + mcp_servers: Optional[Dict[str, McpServerConfig]] = None """Map of MCP server configurations by name""" + memory_stores: Optional[List[MemoryStore]] = None + """Memory stores to attach to this run.""" + api_model_id: Optional[str] = FieldInfo(alias="model_id", default=None) """LLM model to use (uses team default if not specified)""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index f4c6ee4..4e662df 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -2,12 +2,20 @@ from __future__ import annotations -from typing import Dict -from typing_extensions import Literal, TypedDict +from typing import Dict, Iterable +from typing_extensions import Literal, Required, TypedDict from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam", "Harness", "HarnessAuthSecrets", "SessionSharing"] +__all__ = [ + "AmbientAgentConfigParam", + "Harness", + "HarnessAuthSecrets", + "InferenceProviders", + "InferenceProvidersAws", + "MemoryStore", + "SessionSharing", +] class Harness(TypedDict, total=False): @@ -40,6 +48,39 @@ class HarnessAuthSecrets(TypedDict, total=False): """ +class InferenceProvidersAws(TypedDict, total=False): + """ + Configures AWS Bedrock as the LLM inference provider for this + agent or run. + """ + + disabled: bool + """If true, opt out of Bedrock at this layer.""" + + role_arn: str + """IAM role ARN to assume when calling Bedrock.""" + + +class InferenceProviders(TypedDict, total=False): + """Inference provider settings used for LLM calls.""" + + aws: InferenceProvidersAws + """Configures AWS Bedrock as the LLM inference provider for this agent or run.""" + + +class MemoryStore(TypedDict, total=False): + """Reference to a memory store to attach to an agent.""" + + access: Required[Literal["read_write", "read_only"]] + """Access level for the store.""" + + instructions: Required[str] + """Instructions for how the agent should use this memory store. Must not be empty.""" + + uid: Required[str] + """UID of the memory store.""" + + class SessionSharing(TypedDict, total=False): """ Configures sharing behavior for the run's shared session. @@ -96,9 +137,15 @@ class AmbientAgentConfigParam(TypedDict, total=False): floor(max_instance_runtime_seconds / 60) for your billing tier). """ + inference_providers: InferenceProviders + """Inference provider settings used for LLM calls.""" + mcp_servers: Dict[str, McpServerConfigParam] """Map of MCP server configurations by name""" + memory_stores: Iterable[MemoryStore] + """Memory stores to attach to this run.""" + model_id: str """LLM model to use (uses team default if not specified)""" diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index 86fce6e..0b91ac0 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -35,6 +35,19 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: name="name", base_model="base_model", description="description", + inference_providers={ + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], prompt="prompt", secrets=[{"name": "name"}], skills=["string"], @@ -82,6 +95,19 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: uid="uid", base_model="base_model", description="description", + inference_providers={ + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], name="name", prompt="prompt", secrets=[{"name": "name"}], @@ -256,6 +282,19 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> name="name", base_model="base_model", description="description", + inference_providers={ + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], prompt="prompt", secrets=[{"name": "name"}], skills=["string"], @@ -303,6 +342,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> uid="uid", base_model="base_model", description="description", + inference_providers={ + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, + memory_stores=[ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], name="name", prompt="prompt", secrets=[{"name": "name"}], diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 0beb0e2..38f62c2 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -43,6 +43,12 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "harness": {"type": "oz"}, "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, + "inference_providers": { + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, "mcp_servers": { "foo": { "args": ["string"], @@ -53,13 +59,20 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -163,6 +176,12 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "harness": {"type": "oz"}, "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, + "inference_providers": { + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, "mcp_servers": { "foo": { "args": ["string"], @@ -173,13 +192,20 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", mode="normal", prompt="prompt", ) @@ -410,6 +436,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "harness": {"type": "oz"}, "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, + "inference_providers": { + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, "mcp_servers": { "foo": { "args": ["string"], @@ -420,13 +452,20 @@ 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", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", enabled=True, mode="normal", prompt="Review open pull requests and provide feedback", @@ -530,6 +569,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "harness": {"type": "oz"}, "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, + "inference_providers": { + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, "mcp_servers": { "foo": { "args": ["string"], @@ -540,13 +585,20 @@ 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", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, "skill_spec": "skill_spec", "worker_host": "worker_host", }, - agent_uid="agent_uid", + agent_uid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", mode="normal", prompt="prompt", ) diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index a10a54e..980b5b2 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -164,6 +164,12 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "harness": {"type": "oz"}, "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, + "inference_providers": { + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, "mcp_servers": { "foo": { "args": ["string"], @@ -174,6 +180,13 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, @@ -361,6 +374,12 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "harness": {"type": "oz"}, "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, + "inference_providers": { + "aws": { + "disabled": True, + "role_arn": "role_arn", + } + }, "mcp_servers": { "foo": { "args": ["string"], @@ -371,6 +390,13 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "warp_id": "warp_id", } }, + "memory_stores": [ + { + "access": "read_write", + "instructions": "instructions", + "uid": "uid", + } + ], "model_id": "model_id", "name": "name", "session_sharing": {"public_access": "VIEWER"}, From e7c0364075d1b7328871abeda8c6f1a201f82e61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 19:04:09 +0000 Subject: [PATCH 15/20] ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/publish-pypi.yml | 4 ++-- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d0e2d9..e2f90fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,10 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/warp-api-python' && 'depot-ubuntu-24.04' || '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@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.10.2' @@ -43,10 +43,10 @@ jobs: id-token: write runs-on: ${{ github.repository == 'stainless-sdks/warp-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.10.2' @@ -61,7 +61,7 @@ jobs: github.repository == 'stainless-sdks/warp-api-python' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -81,10 +81,10 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/warp-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.10.2' diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 74160e1..bae8377 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -17,10 +17,10 @@ jobs: id-token: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.9.13' diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index bb0047d..2f3f96e 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'warpdotdev/oz-sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | From cb84f0c6c9625d8c0657c728d5fadae065eb37c9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 21:44:58 +0000 Subject: [PATCH 16/20] feat: Codex auth: API key support. --- .stats.yml | 4 ++-- .../types/ambient_agent_config.py | 7 +++++++ .../types/ambient_agent_config_param.py | 7 +++++++ tests/api_resources/agent/test_schedules.py | 20 +++++++++++++++---- tests/api_resources/test_agent.py | 10 ++++++++-- 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8e0d8bf..20e2424 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-b719dd35d7850ee303cdebf54fa3dfddb492a6f578344c2060cfae013b61541c.yml -openapi_spec_hash: 4c21e0d940ef5fc42767be5380571c5d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-f3e9fa9bb13497f0e762f0f55efcafd4d531315173d2b0a2aa96f633292f2cfe.yml +openapi_spec_hash: 8b4544348c060abc69c1280f3c535fec config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 2d5b76a..c31cbba 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -48,6 +48,13 @@ class HarnessAuthSecrets(BaseModel): type is "claude". """ + codex_auth_secret_name: Optional[str] = None + """ + Name of a managed secret for Codex harness authentication. The secret must exist + within the caller's personal or team scope. Only applicable when harness type is + "codex". + """ + class InferenceProvidersAws(BaseModel): """ diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 4e662df..ad4865d 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -47,6 +47,13 @@ class HarnessAuthSecrets(TypedDict, total=False): type is "claude". """ + codex_auth_secret_name: str + """ + Name of a managed secret for Codex harness authentication. The secret must exist + within the caller's personal or team scope. Only applicable when harness type is + "codex". + """ + class InferenceProvidersAws(TypedDict, total=False): """ diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 38f62c2..c46d679 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -41,7 +41,10 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, + "harness_auth_secrets": { + "claude_auth_secret_name": "claude_auth_secret_name", + "codex_auth_secret_name": "codex_auth_secret_name", + }, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -174,7 +177,10 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, + "harness_auth_secrets": { + "claude_auth_secret_name": "claude_auth_secret_name", + "codex_auth_secret_name": "codex_auth_secret_name", + }, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -434,7 +440,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, + "harness_auth_secrets": { + "claude_auth_secret_name": "claude_auth_secret_name", + "codex_auth_secret_name": "codex_auth_secret_name", + }, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -567,7 +576,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, + "harness_auth_secrets": { + "claude_auth_secret_name": "claude_auth_secret_name", + "codex_auth_secret_name": "codex_auth_secret_name", + }, "idle_timeout_minutes": 1, "inference_providers": { "aws": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 980b5b2..9180faa 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -162,7 +162,10 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, + "harness_auth_secrets": { + "claude_auth_secret_name": "claude_auth_secret_name", + "codex_auth_secret_name": "codex_auth_secret_name", + }, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -372,7 +375,10 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, + "harness_auth_secrets": { + "claude_auth_secret_name": "claude_auth_secret_name", + "codex_auth_secret_name": "codex_auth_secret_name", + }, "idle_timeout_minutes": 1, "inference_providers": { "aws": { From 96d640cd68290e1a915fca51a8629cf9dab4d81d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 22:23:04 +0000 Subject: [PATCH 17/20] feat(api): api update --- .stats.yml | 4 ++-- .../types/ambient_agent_config.py | 7 ------- .../types/ambient_agent_config_param.py | 7 ------- tests/api_resources/agent/test_schedules.py | 20 ++++--------------- tests/api_resources/test_agent.py | 10 ++-------- 5 files changed, 8 insertions(+), 40 deletions(-) diff --git a/.stats.yml b/.stats.yml index 20e2424..8e0d8bf 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-f3e9fa9bb13497f0e762f0f55efcafd4d531315173d2b0a2aa96f633292f2cfe.yml -openapi_spec_hash: 8b4544348c060abc69c1280f3c535fec +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-b719dd35d7850ee303cdebf54fa3dfddb492a6f578344c2060cfae013b61541c.yml +openapi_spec_hash: 4c21e0d940ef5fc42767be5380571c5d config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index c31cbba..2d5b76a 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -48,13 +48,6 @@ class HarnessAuthSecrets(BaseModel): type is "claude". """ - codex_auth_secret_name: Optional[str] = None - """ - Name of a managed secret for Codex harness authentication. The secret must exist - within the caller's personal or team scope. Only applicable when harness type is - "codex". - """ - class InferenceProvidersAws(BaseModel): """ diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index ad4865d..4e662df 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -47,13 +47,6 @@ class HarnessAuthSecrets(TypedDict, total=False): type is "claude". """ - codex_auth_secret_name: str - """ - Name of a managed secret for Codex harness authentication. The secret must exist - within the caller's personal or team scope. Only applicable when harness type is - "codex". - """ - class InferenceProvidersAws(TypedDict, total=False): """ diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index c46d679..38f62c2 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -41,10 +41,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": { - "claude_auth_secret_name": "claude_auth_secret_name", - "codex_auth_secret_name": "codex_auth_secret_name", - }, + "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -177,10 +174,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": { - "claude_auth_secret_name": "claude_auth_secret_name", - "codex_auth_secret_name": "codex_auth_secret_name", - }, + "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -440,10 +434,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": { - "claude_auth_secret_name": "claude_auth_secret_name", - "codex_auth_secret_name": "codex_auth_secret_name", - }, + "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -576,10 +567,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": { - "claude_auth_secret_name": "claude_auth_secret_name", - "codex_auth_secret_name": "codex_auth_secret_name", - }, + "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, "inference_providers": { "aws": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 9180faa..980b5b2 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -162,10 +162,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": { - "claude_auth_secret_name": "claude_auth_secret_name", - "codex_auth_secret_name": "codex_auth_secret_name", - }, + "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, "inference_providers": { "aws": { @@ -375,10 +372,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "computer_use_enabled": True, "environment_id": "environment_id", "harness": {"type": "oz"}, - "harness_auth_secrets": { - "claude_auth_secret_name": "claude_auth_secret_name", - "codex_auth_secret_name": "codex_auth_secret_name", - }, + "harness_auth_secrets": {"claude_auth_secret_name": "claude_auth_secret_name"}, "idle_timeout_minutes": 1, "inference_providers": { "aws": { From 8cd06f6fcb48444e3861ff130d2fb4fa820e3aa7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 01:26:12 +0000 Subject: [PATCH 18/20] feat: Add default harness selection for agents --- .stats.yml | 4 +- src/oz_agent_sdk/resources/agent/agent_.py | 46 +++++++++++++++++-- .../types/agent/agent_create_params.py | 32 ++++++++++++- .../types/agent/agent_response.py | 39 +++++++++++++++- .../types/agent/agent_update_params.py | 35 +++++++++++++- tests/api_resources/agent/test_agent_.py | 8 ++++ 6 files changed, 155 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8e0d8bf..452c069 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-b719dd35d7850ee303cdebf54fa3dfddb492a6f578344c2060cfae013b61541c.yml -openapi_spec_hash: 4c21e0d940ef5fc42767be5380571c5d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-b424065a28582cd6c6ae1d95047d165a86b3028d09551701159f455a007d73f7.yml +openapi_spec_hash: e7f90f2ac181c44aeee58c3070bc0bba config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index 447bc5d..7178ff5 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -50,8 +50,10 @@ def create( self, *, name: str, + base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, @@ -72,10 +74,15 @@ def create( Args: name: A name for the agent + base_harness: Optional default harness for runs executed by this agent. + base_model: Optional base model for runs executed by this agent. description: Optional description of the agent + harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the + harness specified gets injected into the environment. + inference_providers: Inference provider settings used for LLM calls. memory_stores: Optional list of memory stores to attach to the agent. Each store must be @@ -108,8 +115,10 @@ def create( body=maybe_transform( { "name": name, + "base_harness": base_harness, "base_model": base_model, "description": description, + "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "prompt": prompt, @@ -128,8 +137,10 @@ def update( self, uid: str, *, + base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, @@ -146,14 +157,20 @@ def update( """Update an existing agent. Args: - base_model: Replacement base model. + base_harness: Replacement default harness. - Omit or pass `null` to leave unchanged, or pass an empty + Omit or pass `null` to leave unchanged, or pass an + empty string to clear. + + base_model: Replacement base model. Omit or pass `null` to leave unchanged, or pass an empty string to clear. description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. + harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the + harness specified gets injected into the environment. + inference_providers: Inference provider settings used for LLM calls. memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array @@ -184,8 +201,10 @@ def update( path_template("/agent/identities/{uid}", uid=uid), body=maybe_transform( { + "base_harness": base_harness, "base_model": base_model, "description": description, + "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "name": name, @@ -322,8 +341,10 @@ async def create( self, *, name: str, + base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, @@ -344,10 +365,15 @@ async def create( Args: name: A name for the agent + base_harness: Optional default harness for runs executed by this agent. + base_model: Optional base model for runs executed by this agent. description: Optional description of the agent + harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the + harness specified gets injected into the environment. + inference_providers: Inference provider settings used for LLM calls. memory_stores: Optional list of memory stores to attach to the agent. Each store must be @@ -380,8 +406,10 @@ async def create( body=await async_maybe_transform( { "name": name, + "base_harness": base_harness, "base_model": base_model, "description": description, + "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "prompt": prompt, @@ -400,8 +428,10 @@ async def update( self, uid: str, *, + base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, + harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, @@ -418,14 +448,20 @@ async def update( """Update an existing agent. Args: - base_model: Replacement base model. + base_harness: Replacement default harness. - Omit or pass `null` to leave unchanged, or pass an empty + Omit or pass `null` to leave unchanged, or pass an + empty string to clear. + + base_model: Replacement base model. Omit or pass `null` to leave unchanged, or pass an empty string to clear. description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. + harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the + harness specified gets injected into the environment. + inference_providers: Inference provider settings used for LLM calls. memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array @@ -456,8 +492,10 @@ async def update( path_template("/agent/identities/{uid}", uid=uid), body=await async_maybe_transform( { + "base_harness": base_harness, "base_model": base_model, "description": description, + "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "name": name, 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 db351bc..85ec5c0 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -7,19 +7,35 @@ from ..._types import SequenceNotStr -__all__ = ["AgentCreateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"] +__all__ = [ + "AgentCreateParams", + "HarnessAuthSecrets", + "InferenceProviders", + "InferenceProvidersAws", + "MemoryStore", + "Secret", +] class AgentCreateParams(TypedDict, total=False): name: Required[str] """A name for the agent""" + base_harness: Optional[str] + """Optional default harness for runs executed by this agent.""" + base_model: Optional[str] """Optional base model for runs executed by this agent.""" description: Optional[str] """Optional description of the agent""" + harness_auth_secrets: HarnessAuthSecrets + """ + Authentication secrets for third-party harnesses. Only the secret for the + harness specified gets injected into the environment. + """ + inference_providers: InferenceProviders """Inference provider settings used for LLM calls.""" @@ -50,6 +66,20 @@ class AgentCreateParams(TypedDict, total=False): """ +class HarnessAuthSecrets(TypedDict, total=False): + """ + Authentication secrets for third-party harnesses. + Only the secret for the harness specified gets injected into the environment. + """ + + claude_auth_secret_name: str + """ + Name of a managed secret for Claude Code harness authentication. The secret must + exist within the caller's personal or team scope. Only applicable when harness + type is "claude". + """ + + class InferenceProvidersAws(TypedDict, total=False): """ Configures AWS Bedrock as the LLM inference provider for this diff --git a/src/oz_agent_sdk/types/agent/agent_response.py b/src/oz_agent_sdk/types/agent/agent_response.py index fac7f4a..0a349f8 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -6,7 +6,14 @@ from ..._models import BaseModel -__all__ = ["AgentResponse", "MemoryStore", "Secret", "InferenceProviders", "InferenceProvidersAws"] +__all__ = [ + "AgentResponse", + "MemoryStore", + "Secret", + "HarnessAuthSecrets", + "InferenceProviders", + "InferenceProvidersAws", +] class MemoryStore(BaseModel): @@ -29,6 +36,20 @@ class Secret(BaseModel): """Name of the managed secret.""" +class HarnessAuthSecrets(BaseModel): + """ + Authentication secrets for third-party harnesses. + Only the secret for the harness specified gets injected into the environment. + """ + + claude_auth_secret_name: Optional[str] = None + """ + Name of a managed secret for Claude Code harness authentication. The secret must + exist within the caller's personal or team scope. Only applicable when harness + type is "claude". + """ + + class InferenceProvidersAws(BaseModel): """ Configures AWS Bedrock as the LLM inference provider for this @@ -77,6 +98,16 @@ class AgentResponse(BaseModel): uid: str """Unique identifier for the agent""" + base_harness: Optional[str] = None + """Default harness for runs executed by this agent. + + The precedence order for harness resolution is: + + 1. The harness specified on the run itself + 2. The agent's base harness + 3. Oz + """ + base_model: Optional[str] = None """Base model for runs executed by this agent. @@ -90,6 +121,12 @@ class AgentResponse(BaseModel): description: Optional[str] = None """Optional description of the agent""" + harness_auth_secrets: Optional[HarnessAuthSecrets] = None + """ + Authentication secrets for third-party harnesses. Only the secret for the + harness specified gets injected into the environment. + """ + inference_providers: Optional[InferenceProviders] = None """Inference provider settings used for LLM calls.""" 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 29278da..e36e03a 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -7,10 +7,23 @@ from ..._types import SequenceNotStr -__all__ = ["AgentUpdateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"] +__all__ = [ + "AgentUpdateParams", + "HarnessAuthSecrets", + "InferenceProviders", + "InferenceProvidersAws", + "MemoryStore", + "Secret", +] class AgentUpdateParams(TypedDict, total=False): + base_harness: Optional[str] + """Replacement default harness. + + Omit or pass `null` to leave unchanged, or pass an empty string to clear. + """ + base_model: Optional[str] """Replacement base model. @@ -23,6 +36,12 @@ class AgentUpdateParams(TypedDict, total=False): Omit or pass `null` to leave unchanged, or use an empty value to clear. """ + harness_auth_secrets: Optional[HarnessAuthSecrets] + """ + Authentication secrets for third-party harnesses. Only the secret for the + harness specified gets injected into the environment. + """ + inference_providers: Optional[InferenceProviders] """Inference provider settings used for LLM calls.""" @@ -57,6 +76,20 @@ class AgentUpdateParams(TypedDict, total=False): """ +class HarnessAuthSecrets(TypedDict, total=False): + """ + Authentication secrets for third-party harnesses. + Only the secret for the harness specified gets injected into the environment. + """ + + claude_auth_secret_name: str + """ + Name of a managed secret for Claude Code harness authentication. The secret must + exist within the caller's personal or team scope. Only applicable when harness + type is "claude". + """ + + class InferenceProvidersAws(TypedDict, total=False): """ Configures AWS Bedrock as the LLM inference provider for this diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index 0b91ac0..a0cf6d5 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -33,8 +33,10 @@ def test_method_create(self, client: OzAPI) -> None: def test_method_create_with_all_params(self, client: OzAPI) -> None: agent = client.agent.agent.create( name="name", + base_harness="base_harness", base_model="base_model", description="description", + harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, @@ -93,8 +95,10 @@ def test_method_update(self, client: OzAPI) -> None: def test_method_update_with_all_params(self, client: OzAPI) -> None: agent = client.agent.agent.update( uid="uid", + base_harness="base_harness", base_model="base_model", description="description", + harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, @@ -280,8 +284,10 @@ async def test_method_create(self, async_client: AsyncOzAPI) -> None: async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.agent.create( name="name", + base_harness="base_harness", base_model="base_model", description="description", + harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, @@ -340,8 +346,10 @@ async def test_method_update(self, async_client: AsyncOzAPI) -> None: async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.agent.update( uid="uid", + base_harness="base_harness", base_model="base_model", description="description", + harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, From 09763624c5e172aa28fa43ed18bc0e391c04331d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 13:18:33 +0000 Subject: [PATCH 19/20] feat(api): api update --- .stats.yml | 4 +- src/oz_agent_sdk/resources/agent/agent_.py | 46 ++----------------- .../types/agent/agent_create_params.py | 32 +------------ .../types/agent/agent_response.py | 39 +--------------- .../types/agent/agent_update_params.py | 35 +------------- tests/api_resources/agent/test_agent_.py | 8 ---- 6 files changed, 9 insertions(+), 155 deletions(-) diff --git a/.stats.yml b/.stats.yml index 452c069..8e0d8bf 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-b424065a28582cd6c6ae1d95047d165a86b3028d09551701159f455a007d73f7.yml -openapi_spec_hash: e7f90f2ac181c44aeee58c3070bc0bba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-b719dd35d7850ee303cdebf54fa3dfddb492a6f578344c2060cfae013b61541c.yml +openapi_spec_hash: 4c21e0d940ef5fc42767be5380571c5d config_hash: 236823a4936c76818117c16aa5c188df diff --git a/src/oz_agent_sdk/resources/agent/agent_.py b/src/oz_agent_sdk/resources/agent/agent_.py index 7178ff5..447bc5d 100644 --- a/src/oz_agent_sdk/resources/agent/agent_.py +++ b/src/oz_agent_sdk/resources/agent/agent_.py @@ -50,10 +50,8 @@ def create( self, *, name: str, - base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, @@ -74,15 +72,10 @@ def create( Args: name: A name for the agent - base_harness: Optional default harness for runs executed by this agent. - base_model: Optional base model for runs executed by this agent. description: Optional description of the agent - harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the - harness specified gets injected into the environment. - inference_providers: Inference provider settings used for LLM calls. memory_stores: Optional list of memory stores to attach to the agent. Each store must be @@ -115,10 +108,8 @@ def create( body=maybe_transform( { "name": name, - "base_harness": base_harness, "base_model": base_model, "description": description, - "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "prompt": prompt, @@ -137,10 +128,8 @@ def update( self, uid: str, *, - base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, @@ -157,20 +146,14 @@ def update( """Update an existing agent. Args: - base_harness: Replacement default harness. + base_model: Replacement base model. - Omit or pass `null` to leave unchanged, or pass an - empty string to clear. - - base_model: Replacement base model. Omit or pass `null` to leave unchanged, or pass an empty + Omit or pass `null` to leave unchanged, or pass an empty string to clear. description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. - harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the - harness specified gets injected into the environment. - inference_providers: Inference provider settings used for LLM calls. memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array @@ -201,10 +184,8 @@ def update( path_template("/agent/identities/{uid}", uid=uid), body=maybe_transform( { - "base_harness": base_harness, "base_model": base_model, "description": description, - "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "name": name, @@ -341,10 +322,8 @@ async def create( self, *, name: str, - base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit, inference_providers: agent_create_params.InferenceProviders | Omit = omit, memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit, prompt: Optional[str] | Omit = omit, @@ -365,15 +344,10 @@ async def create( Args: name: A name for the agent - base_harness: Optional default harness for runs executed by this agent. - base_model: Optional base model for runs executed by this agent. description: Optional description of the agent - harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the - harness specified gets injected into the environment. - inference_providers: Inference provider settings used for LLM calls. memory_stores: Optional list of memory stores to attach to the agent. Each store must be @@ -406,10 +380,8 @@ async def create( body=await async_maybe_transform( { "name": name, - "base_harness": base_harness, "base_model": base_model, "description": description, - "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "prompt": prompt, @@ -428,10 +400,8 @@ async def update( self, uid: str, *, - base_harness: Optional[str] | Omit = omit, base_model: Optional[str] | Omit = omit, description: Optional[str] | Omit = omit, - harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit, inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit, memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit, name: str | Omit = omit, @@ -448,20 +418,14 @@ async def update( """Update an existing agent. Args: - base_harness: Replacement default harness. + base_model: Replacement base model. - Omit or pass `null` to leave unchanged, or pass an - empty string to clear. - - base_model: Replacement base model. Omit or pass `null` to leave unchanged, or pass an empty + Omit or pass `null` to leave unchanged, or pass an empty string to clear. description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty value to clear. - harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the - harness specified gets injected into the environment. - inference_providers: Inference provider settings used for LLM calls. memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array @@ -492,10 +456,8 @@ async def update( path_template("/agent/identities/{uid}", uid=uid), body=await async_maybe_transform( { - "base_harness": base_harness, "base_model": base_model, "description": description, - "harness_auth_secrets": harness_auth_secrets, "inference_providers": inference_providers, "memory_stores": memory_stores, "name": name, 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 85ec5c0..db351bc 100644 --- a/src/oz_agent_sdk/types/agent/agent_create_params.py +++ b/src/oz_agent_sdk/types/agent/agent_create_params.py @@ -7,35 +7,19 @@ from ..._types import SequenceNotStr -__all__ = [ - "AgentCreateParams", - "HarnessAuthSecrets", - "InferenceProviders", - "InferenceProvidersAws", - "MemoryStore", - "Secret", -] +__all__ = ["AgentCreateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"] class AgentCreateParams(TypedDict, total=False): name: Required[str] """A name for the agent""" - base_harness: Optional[str] - """Optional default harness for runs executed by this agent.""" - base_model: Optional[str] """Optional base model for runs executed by this agent.""" description: Optional[str] """Optional description of the agent""" - harness_auth_secrets: HarnessAuthSecrets - """ - Authentication secrets for third-party harnesses. Only the secret for the - harness specified gets injected into the environment. - """ - inference_providers: InferenceProviders """Inference provider settings used for LLM calls.""" @@ -66,20 +50,6 @@ class AgentCreateParams(TypedDict, total=False): """ -class HarnessAuthSecrets(TypedDict, total=False): - """ - Authentication secrets for third-party harnesses. - Only the secret for the harness specified gets injected into the environment. - """ - - claude_auth_secret_name: str - """ - Name of a managed secret for Claude Code harness authentication. The secret must - exist within the caller's personal or team scope. Only applicable when harness - type is "claude". - """ - - class InferenceProvidersAws(TypedDict, total=False): """ Configures AWS Bedrock as the LLM inference provider for this diff --git a/src/oz_agent_sdk/types/agent/agent_response.py b/src/oz_agent_sdk/types/agent/agent_response.py index 0a349f8..fac7f4a 100644 --- a/src/oz_agent_sdk/types/agent/agent_response.py +++ b/src/oz_agent_sdk/types/agent/agent_response.py @@ -6,14 +6,7 @@ from ..._models import BaseModel -__all__ = [ - "AgentResponse", - "MemoryStore", - "Secret", - "HarnessAuthSecrets", - "InferenceProviders", - "InferenceProvidersAws", -] +__all__ = ["AgentResponse", "MemoryStore", "Secret", "InferenceProviders", "InferenceProvidersAws"] class MemoryStore(BaseModel): @@ -36,20 +29,6 @@ class Secret(BaseModel): """Name of the managed secret.""" -class HarnessAuthSecrets(BaseModel): - """ - Authentication secrets for third-party harnesses. - Only the secret for the harness specified gets injected into the environment. - """ - - claude_auth_secret_name: Optional[str] = None - """ - Name of a managed secret for Claude Code harness authentication. The secret must - exist within the caller's personal or team scope. Only applicable when harness - type is "claude". - """ - - class InferenceProvidersAws(BaseModel): """ Configures AWS Bedrock as the LLM inference provider for this @@ -98,16 +77,6 @@ class AgentResponse(BaseModel): uid: str """Unique identifier for the agent""" - base_harness: Optional[str] = None - """Default harness for runs executed by this agent. - - The precedence order for harness resolution is: - - 1. The harness specified on the run itself - 2. The agent's base harness - 3. Oz - """ - base_model: Optional[str] = None """Base model for runs executed by this agent. @@ -121,12 +90,6 @@ class AgentResponse(BaseModel): description: Optional[str] = None """Optional description of the agent""" - harness_auth_secrets: Optional[HarnessAuthSecrets] = None - """ - Authentication secrets for third-party harnesses. Only the secret for the - harness specified gets injected into the environment. - """ - inference_providers: Optional[InferenceProviders] = None """Inference provider settings used for LLM calls.""" 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 e36e03a..29278da 100644 --- a/src/oz_agent_sdk/types/agent/agent_update_params.py +++ b/src/oz_agent_sdk/types/agent/agent_update_params.py @@ -7,23 +7,10 @@ from ..._types import SequenceNotStr -__all__ = [ - "AgentUpdateParams", - "HarnessAuthSecrets", - "InferenceProviders", - "InferenceProvidersAws", - "MemoryStore", - "Secret", -] +__all__ = ["AgentUpdateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"] class AgentUpdateParams(TypedDict, total=False): - base_harness: Optional[str] - """Replacement default harness. - - Omit or pass `null` to leave unchanged, or pass an empty string to clear. - """ - base_model: Optional[str] """Replacement base model. @@ -36,12 +23,6 @@ class AgentUpdateParams(TypedDict, total=False): Omit or pass `null` to leave unchanged, or use an empty value to clear. """ - harness_auth_secrets: Optional[HarnessAuthSecrets] - """ - Authentication secrets for third-party harnesses. Only the secret for the - harness specified gets injected into the environment. - """ - inference_providers: Optional[InferenceProviders] """Inference provider settings used for LLM calls.""" @@ -76,20 +57,6 @@ class AgentUpdateParams(TypedDict, total=False): """ -class HarnessAuthSecrets(TypedDict, total=False): - """ - Authentication secrets for third-party harnesses. - Only the secret for the harness specified gets injected into the environment. - """ - - claude_auth_secret_name: str - """ - Name of a managed secret for Claude Code harness authentication. The secret must - exist within the caller's personal or team scope. Only applicable when harness - type is "claude". - """ - - class InferenceProvidersAws(TypedDict, total=False): """ Configures AWS Bedrock as the LLM inference provider for this diff --git a/tests/api_resources/agent/test_agent_.py b/tests/api_resources/agent/test_agent_.py index a0cf6d5..0b91ac0 100644 --- a/tests/api_resources/agent/test_agent_.py +++ b/tests/api_resources/agent/test_agent_.py @@ -33,10 +33,8 @@ def test_method_create(self, client: OzAPI) -> None: def test_method_create_with_all_params(self, client: OzAPI) -> None: agent = client.agent.agent.create( name="name", - base_harness="base_harness", base_model="base_model", description="description", - harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, @@ -95,10 +93,8 @@ def test_method_update(self, client: OzAPI) -> None: def test_method_update_with_all_params(self, client: OzAPI) -> None: agent = client.agent.agent.update( uid="uid", - base_harness="base_harness", base_model="base_model", description="description", - harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, @@ -284,10 +280,8 @@ async def test_method_create(self, async_client: AsyncOzAPI) -> None: async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.agent.create( name="name", - base_harness="base_harness", base_model="base_model", description="description", - harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, @@ -346,10 +340,8 @@ async def test_method_update(self, async_client: AsyncOzAPI) -> None: async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.agent.update( uid="uid", - base_harness="base_harness", base_model="base_model", description="description", - harness_auth_secrets={"claude_auth_secret_name": "claude_auth_secret_name"}, inference_providers={ "aws": { "disabled": True, From bd74889f2ed449b8cef4f2425bc4d8f9a4c1846b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 13:19:02 +0000 Subject: [PATCH 20/20] release: 0.13.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 25 +++++++++++++++++++++++++ pyproject.toml | 2 +- src/oz_agent_sdk/_version.py | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a713055..d52d2b9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.12.0" + ".": "0.13.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4431ffa..43d4c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.13.0 (2026-05-13) + +Full Changelog: [v0.12.0...v0.13.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.12.0...v0.13.0) + +### Features + +* Add default harness selection for agents ([8cd06f6](https://github.com/warpdotdev/oz-sdk-python/commit/8cd06f6fcb48444e3861ff130d2fb4fa820e3aa7)) +* Add per-agent AWS Bedrock OIDC inference role (backend) ([e4aadec](https://github.com/warpdotdev/oz-sdk-python/commit/e4aadec916b2bea7e05e0e263b307449002e7f8b)) +* **agents:** add prompt property to agent identity data model ([520c835](https://github.com/warpdotdev/oz-sdk-python/commit/520c8350b5b7850242adc082fe83a7ae666e6da6)) +* **api:** api update ([0976362](https://github.com/warpdotdev/oz-sdk-python/commit/09763624c5e172aa28fa43ed18bc0e391c04331d)) +* **api:** api update ([96d640c](https://github.com/warpdotdev/oz-sdk-python/commit/96d640cd68290e1a915fca51a8629cf9dab4d81d)) +* **api:** api update ([2730eea](https://github.com/warpdotdev/oz-sdk-python/commit/2730eea19d91df998de5ef1b5da4989670a5889a)) +* **api:** api update ([af81ef3](https://github.com/warpdotdev/oz-sdk-python/commit/af81ef3a2d48f378209cf69a3074997cb02b1b6c)) +* **api:** api update ([99b2d31](https://github.com/warpdotdev/oz-sdk-python/commit/99b2d31ba1a4c2c3d79fc11c5eb8d611c55613b8)) +* Codex auth: API key support. ([cb84f0c](https://github.com/warpdotdev/oz-sdk-python/commit/cb84f0c6c9625d8c0657c728d5fadae065eb37c9)) +* **internal/types:** support eagerly validating pydantic iterators ([a588f0e](https://github.com/warpdotdev/oz-sdk-python/commit/a588f0e5ba27503659b5abf01d0ebc01f652950d)) +* **memory:** agent identity memory store attachments — API layer ([94b5348](https://github.com/warpdotdev/oz-sdk-python/commit/94b5348152c6b0bfb03b0d3887366c4a65e397fb)) +* **memory:** wire memory stores into run pipeline and add listing endpoint ([6bb74c2](https://github.com/warpdotdev/oz-sdk-python/commit/6bb74c2b695cd268fe8466fc6099f082370ba54e)) +* Retrieve memories in third party harnesses ([7689e12](https://github.com/warpdotdev/oz-sdk-python/commit/7689e121d6f22efad3d81828721f8ed900b9cd28)) + + +### Bug Fixes + +* **client:** add missing f-string prefix in file type error message ([17a8e5b](https://github.com/warpdotdev/oz-sdk-python/commit/17a8e5bf17b882a440a067fee1569caf679f8b55)) + ## 0.12.0 (2026-05-07) Full Changelog: [v0.11.0...v0.12.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.11.0...v0.12.0) diff --git a/pyproject.toml b/pyproject.toml index 367b68a..533a8e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "oz-agent-sdk" -version = "0.12.0" +version = "0.13.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 b96fedf..1762ab1 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.12.0" # x-release-please-version +__version__ = "0.13.0" # x-release-please-version