Skip to content

Commit 4ccbe03

Browse files
feat: Memory data model scaffolding.
1 parent e290d3b commit 4ccbe03

12 files changed

Lines changed: 237 additions & 18 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 22
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-f5a88aa4f1991447272228b7024ebfbec99d31706b8806058917a3f90dd39d00.yml
3-
openapi_spec_hash: 1952fae99172f1adaf35d800b0d63936
4-
config_hash: 44a1e8f98607a5cf03815a63bae63453
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-1ef9ad3f2ad814382839a23ea6731e16dda71ce83f460b91489b1464a0e2104a.yml
3+
openapi_spec_hash: a69bd63605861951ed480d5bcbb8fd38
4+
config_hash: c15534df6c8d861059e44d9dd5483b3f

src/oz_agent_sdk/resources/agent/agent_.py

Lines changed: 99 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
from __future__ import annotations
44

5+
from typing import Iterable, Optional
6+
57
import httpx
68

7-
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
9+
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
810
from ..._utils import path_template, maybe_transform, async_maybe_transform
911
from ..._compat import cached_property
1012
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -48,6 +50,9 @@ def create(
4850
self,
4951
*,
5052
name: str,
53+
description: Optional[str] | Omit = omit,
54+
secrets: Iterable[agent_create_params.Secret] | Omit = omit,
55+
skills: SequenceNotStr[str] | Omit = omit,
5156
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5257
# The extra values given here take precedence over values defined on the client or passed to this method.
5358
extra_headers: Headers | None = None,
@@ -63,6 +68,18 @@ def create(
6368
Args:
6469
name: A name for the agent
6570
71+
description: Optional description of the agent
72+
73+
secrets: Optional list of secrets associated with the agent. Duplicate names within a
74+
single request are rejected.
75+
76+
skills:
77+
Optional list of skill specs to associate with the agent. Format:
78+
"{owner}/{repo}:{skill_path}" (e.g.,
79+
"warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"). Each spec is validated
80+
and normalized at attach time using the team's GitHub credentials; inaccessible
81+
or malformed specs are rejected.
82+
6683
extra_headers: Send extra headers
6784
6885
extra_query: Add additional query parameters to the request
@@ -73,7 +90,15 @@ def create(
7390
"""
7491
return self._post(
7592
"/agent/identities",
76-
body=maybe_transform({"name": name}, agent_create_params.AgentCreateParams),
93+
body=maybe_transform(
94+
{
95+
"name": name,
96+
"description": description,
97+
"secrets": secrets,
98+
"skills": skills,
99+
},
100+
agent_create_params.AgentCreateParams,
101+
),
77102
options=make_request_options(
78103
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
79104
),
@@ -84,20 +109,33 @@ def update(
84109
self,
85110
uid: str,
86111
*,
112+
description: Optional[str] | Omit = omit,
87113
name: str | Omit = omit,
114+
secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit,
115+
skills: Optional[SequenceNotStr[str]] | Omit = omit,
88116
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
89117
# The extra values given here take precedence over values defined on the client or passed to this method.
90118
extra_headers: Headers | None = None,
91119
extra_query: Query | None = None,
92120
extra_body: Body | None = None,
93121
timeout: float | httpx.Timeout | None | NotGiven = not_given,
94122
) -> AgentResponse:
95-
"""
96-
Update an existing agent.
123+
"""Update an existing agent.
97124
98125
Args:
126+
description: Replacement description.
127+
128+
Omit or pass `null` to leave unchanged, or use an empty
129+
value to clear.
130+
99131
name: The new name for the agent
100132
133+
secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to
134+
clear, or pass a non-empty array to replace. Duplicate names are rejected.
135+
136+
skills: Replacement list of skill specs. Omit to leave unchanged, pass an empty array to
137+
clear, or pass a non-empty array to replace.
138+
101139
extra_headers: Send extra headers
102140
103141
extra_query: Add additional query parameters to the request
@@ -110,7 +148,15 @@ def update(
110148
raise ValueError(f"Expected a non-empty value for `uid` but received {uid!r}")
111149
return self._put(
112150
path_template("/agent/identities/{uid}", uid=uid),
113-
body=maybe_transform({"name": name}, agent_update_params.AgentUpdateParams),
151+
body=maybe_transform(
152+
{
153+
"description": description,
154+
"name": name,
155+
"secrets": secrets,
156+
"skills": skills,
157+
},
158+
agent_update_params.AgentUpdateParams,
159+
),
114160
options=make_request_options(
115161
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
116162
),
@@ -202,6 +248,9 @@ async def create(
202248
self,
203249
*,
204250
name: str,
251+
description: Optional[str] | Omit = omit,
252+
secrets: Iterable[agent_create_params.Secret] | Omit = omit,
253+
skills: SequenceNotStr[str] | Omit = omit,
205254
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
206255
# The extra values given here take precedence over values defined on the client or passed to this method.
207256
extra_headers: Headers | None = None,
@@ -217,6 +266,18 @@ async def create(
217266
Args:
218267
name: A name for the agent
219268
269+
description: Optional description of the agent
270+
271+
secrets: Optional list of secrets associated with the agent. Duplicate names within a
272+
single request are rejected.
273+
274+
skills:
275+
Optional list of skill specs to associate with the agent. Format:
276+
"{owner}/{repo}:{skill_path}" (e.g.,
277+
"warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"). Each spec is validated
278+
and normalized at attach time using the team's GitHub credentials; inaccessible
279+
or malformed specs are rejected.
280+
220281
extra_headers: Send extra headers
221282
222283
extra_query: Add additional query parameters to the request
@@ -227,7 +288,15 @@ async def create(
227288
"""
228289
return await self._post(
229290
"/agent/identities",
230-
body=await async_maybe_transform({"name": name}, agent_create_params.AgentCreateParams),
291+
body=await async_maybe_transform(
292+
{
293+
"name": name,
294+
"description": description,
295+
"secrets": secrets,
296+
"skills": skills,
297+
},
298+
agent_create_params.AgentCreateParams,
299+
),
231300
options=make_request_options(
232301
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
233302
),
@@ -238,20 +307,33 @@ async def update(
238307
self,
239308
uid: str,
240309
*,
310+
description: Optional[str] | Omit = omit,
241311
name: str | Omit = omit,
312+
secrets: Optional[Iterable[agent_update_params.Secret]] | Omit = omit,
313+
skills: Optional[SequenceNotStr[str]] | Omit = omit,
242314
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
243315
# The extra values given here take precedence over values defined on the client or passed to this method.
244316
extra_headers: Headers | None = None,
245317
extra_query: Query | None = None,
246318
extra_body: Body | None = None,
247319
timeout: float | httpx.Timeout | None | NotGiven = not_given,
248320
) -> AgentResponse:
249-
"""
250-
Update an existing agent.
321+
"""Update an existing agent.
251322
252323
Args:
324+
description: Replacement description.
325+
326+
Omit or pass `null` to leave unchanged, or use an empty
327+
value to clear.
328+
253329
name: The new name for the agent
254330
331+
secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to
332+
clear, or pass a non-empty array to replace. Duplicate names are rejected.
333+
334+
skills: Replacement list of skill specs. Omit to leave unchanged, pass an empty array to
335+
clear, or pass a non-empty array to replace.
336+
255337
extra_headers: Send extra headers
256338
257339
extra_query: Add additional query parameters to the request
@@ -264,7 +346,15 @@ async def update(
264346
raise ValueError(f"Expected a non-empty value for `uid` but received {uid!r}")
265347
return await self._put(
266348
path_template("/agent/identities/{uid}", uid=uid),
267-
body=await async_maybe_transform({"name": name}, agent_update_params.AgentUpdateParams),
349+
body=await async_maybe_transform(
350+
{
351+
"description": description,
352+
"name": name,
353+
"secrets": secrets,
354+
"skills": skills,
355+
},
356+
agent_update_params.AgentUpdateParams,
357+
),
268358
options=make_request_options(
269359
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
270360
),

src/oz_agent_sdk/resources/agent/runs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def list(
9696
cursor: str | Omit = omit,
9797
environment_id: str | Omit = omit,
9898
execution_location: Literal["LOCAL", "REMOTE"] | Omit = omit,
99+
executor: str | Omit = omit,
99100
limit: int | Omit = omit,
100101
model_id: str | Omit = omit,
101102
name: str | Omit = omit,
@@ -138,6 +139,9 @@ def list(
138139
139140
execution_location: Filter by where the run executed
140141
142+
executor: Filter by the user or agent that executed the run. This will often be the same
143+
as the creator, but not always: users may delegate tasks to agents.
144+
141145
limit: Maximum number of runs to return
142146
143147
model_id: Filter by model ID
@@ -195,6 +199,7 @@ def list(
195199
"cursor": cursor,
196200
"environment_id": environment_id,
197201
"execution_location": execution_location,
202+
"executor": executor,
198203
"limit": limit,
199204
"model_id": model_id,
200205
"name": name,
@@ -401,6 +406,7 @@ def list(
401406
cursor: str | Omit = omit,
402407
environment_id: str | Omit = omit,
403408
execution_location: Literal["LOCAL", "REMOTE"] | Omit = omit,
409+
executor: str | Omit = omit,
404410
limit: int | Omit = omit,
405411
model_id: str | Omit = omit,
406412
name: str | Omit = omit,
@@ -443,6 +449,9 @@ def list(
443449
444450
execution_location: Filter by where the run executed
445451
452+
executor: Filter by the user or agent that executed the run. This will often be the same
453+
as the creator, but not always: users may delegate tasks to agents.
454+
446455
limit: Maximum number of runs to return
447456
448457
model_id: Filter by model ID
@@ -500,6 +509,7 @@ def list(
500509
"cursor": cursor,
501510
"environment_id": environment_id,
502511
"execution_location": execution_location,
512+
"executor": executor,
503513
"limit": limit,
504514
"model_id": model_id,
505515
"name": name,

src/oz_agent_sdk/types/agent/agent_create_params.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,39 @@
22

33
from __future__ import annotations
44

5+
from typing import Iterable, Optional
56
from typing_extensions import Required, TypedDict
67

7-
__all__ = ["AgentCreateParams"]
8+
from ..._types import SequenceNotStr
9+
10+
__all__ = ["AgentCreateParams", "Secret"]
811

912

1013
class AgentCreateParams(TypedDict, total=False):
1114
name: Required[str]
1215
"""A name for the agent"""
16+
17+
description: Optional[str]
18+
"""Optional description of the agent"""
19+
20+
secrets: Iterable[Secret]
21+
"""
22+
Optional list of secrets associated with the agent. Duplicate names within a
23+
single request are rejected.
24+
"""
25+
26+
skills: SequenceNotStr[str]
27+
"""
28+
Optional list of skill specs to associate with the agent. Format:
29+
"{owner}/{repo}:{skill_path}" (e.g.,
30+
"warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"). Each spec is validated
31+
and normalized at attach time using the team's GitHub credentials; inaccessible
32+
or malformed specs are rejected.
33+
"""
34+
35+
36+
class Secret(TypedDict, total=False):
37+
"""Reference to a managed secret by name."""
38+
39+
name: Required[str]
40+
"""Name of the managed secret."""

src/oz_agent_sdk/types/agent/agent_response.py

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

3+
from typing import List, Optional
34
from datetime import datetime
45

56
from ..._models import BaseModel
67

7-
__all__ = ["AgentResponse"]
8+
__all__ = ["AgentResponse", "Secret"]
9+
10+
11+
class Secret(BaseModel):
12+
"""Reference to a managed secret by name."""
13+
14+
name: str
15+
"""Name of the managed secret."""
816

917

1018
class AgentResponse(BaseModel):
@@ -17,5 +25,17 @@ class AgentResponse(BaseModel):
1725
name: str
1826
"""Name of the agent"""
1927

28+
secrets: List[Secret]
29+
"""Secrets that this agent may access by default."""
30+
31+
skills: List[str]
32+
"""
33+
Ordered list of normalized skill specs associated with this agent. Always
34+
present; empty when no skills are attached.
35+
"""
36+
2037
uid: str
2138
"""Unique identifier for the agent"""
39+
40+
description: Optional[str] = None
41+
"""Optional description of the agent"""

src/oz_agent_sdk/types/agent/agent_update_params.py

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,41 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import TypedDict
5+
from typing import Iterable, Optional
6+
from typing_extensions import Required, TypedDict
67

7-
__all__ = ["AgentUpdateParams"]
8+
from ..._types import SequenceNotStr
9+
10+
__all__ = ["AgentUpdateParams", "Secret"]
811

912

1013
class AgentUpdateParams(TypedDict, total=False):
14+
description: Optional[str]
15+
"""Replacement description.
16+
17+
Omit or pass `null` to leave unchanged, or use an empty value to clear.
18+
"""
19+
1120
name: str
1221
"""The new name for the agent"""
22+
23+
secrets: Optional[Iterable[Secret]]
24+
"""Replacement list of secrets.
25+
26+
Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array
27+
to replace. Duplicate names are rejected.
28+
"""
29+
30+
skills: Optional[SequenceNotStr[str]]
31+
"""Replacement list of skill specs.
32+
33+
Omit to leave unchanged, pass an empty array to clear, or pass a non-empty array
34+
to replace.
35+
"""
36+
37+
38+
class Secret(TypedDict, total=False):
39+
"""Reference to a managed secret by name."""
40+
41+
name: Required[str]
42+
"""Name of the managed secret."""

0 commit comments

Comments
 (0)