Skip to content

Commit 8cd06f6

Browse files
feat: Add default harness selection for agents
1 parent 96d640c commit 8cd06f6

6 files changed

Lines changed: 155 additions & 9 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 23
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-b719dd35d7850ee303cdebf54fa3dfddb492a6f578344c2060cfae013b61541c.yml
3-
openapi_spec_hash: 4c21e0d940ef5fc42767be5380571c5d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-b424065a28582cd6c6ae1d95047d165a86b3028d09551701159f455a007d73f7.yml
3+
openapi_spec_hash: e7f90f2ac181c44aeee58c3070bc0bba
44
config_hash: 236823a4936c76818117c16aa5c188df

src/oz_agent_sdk/resources/agent/agent_.py

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ def create(
5050
self,
5151
*,
5252
name: str,
53+
base_harness: Optional[str] | Omit = omit,
5354
base_model: Optional[str] | Omit = omit,
5455
description: Optional[str] | Omit = omit,
56+
harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit,
5557
inference_providers: agent_create_params.InferenceProviders | Omit = omit,
5658
memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit,
5759
prompt: Optional[str] | Omit = omit,
@@ -72,10 +74,15 @@ def create(
7274
Args:
7375
name: A name for the agent
7476
77+
base_harness: Optional default harness for runs executed by this agent.
78+
7579
base_model: Optional base model for runs executed by this agent.
7680
7781
description: Optional description of the agent
7882
83+
harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the
84+
harness specified gets injected into the environment.
85+
7986
inference_providers: Inference provider settings used for LLM calls.
8087
8188
memory_stores: Optional list of memory stores to attach to the agent. Each store must be
@@ -108,8 +115,10 @@ def create(
108115
body=maybe_transform(
109116
{
110117
"name": name,
118+
"base_harness": base_harness,
111119
"base_model": base_model,
112120
"description": description,
121+
"harness_auth_secrets": harness_auth_secrets,
113122
"inference_providers": inference_providers,
114123
"memory_stores": memory_stores,
115124
"prompt": prompt,
@@ -128,8 +137,10 @@ def update(
128137
self,
129138
uid: str,
130139
*,
140+
base_harness: Optional[str] | Omit = omit,
131141
base_model: Optional[str] | Omit = omit,
132142
description: Optional[str] | Omit = omit,
143+
harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit,
133144
inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit,
134145
memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit,
135146
name: str | Omit = omit,
@@ -146,14 +157,20 @@ def update(
146157
"""Update an existing agent.
147158
148159
Args:
149-
base_model: Replacement base model.
160+
base_harness: Replacement default harness.
150161
151-
Omit or pass `null` to leave unchanged, or pass an empty
162+
Omit or pass `null` to leave unchanged, or pass an
163+
empty string to clear.
164+
165+
base_model: Replacement base model. Omit or pass `null` to leave unchanged, or pass an empty
152166
string to clear.
153167
154168
description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty
155169
value to clear.
156170
171+
harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the
172+
harness specified gets injected into the environment.
173+
157174
inference_providers: Inference provider settings used for LLM calls.
158175
159176
memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array
@@ -184,8 +201,10 @@ def update(
184201
path_template("/agent/identities/{uid}", uid=uid),
185202
body=maybe_transform(
186203
{
204+
"base_harness": base_harness,
187205
"base_model": base_model,
188206
"description": description,
207+
"harness_auth_secrets": harness_auth_secrets,
189208
"inference_providers": inference_providers,
190209
"memory_stores": memory_stores,
191210
"name": name,
@@ -322,8 +341,10 @@ async def create(
322341
self,
323342
*,
324343
name: str,
344+
base_harness: Optional[str] | Omit = omit,
325345
base_model: Optional[str] | Omit = omit,
326346
description: Optional[str] | Omit = omit,
347+
harness_auth_secrets: agent_create_params.HarnessAuthSecrets | Omit = omit,
327348
inference_providers: agent_create_params.InferenceProviders | Omit = omit,
328349
memory_stores: Iterable[agent_create_params.MemoryStore] | Omit = omit,
329350
prompt: Optional[str] | Omit = omit,
@@ -344,10 +365,15 @@ async def create(
344365
Args:
345366
name: A name for the agent
346367
368+
base_harness: Optional default harness for runs executed by this agent.
369+
347370
base_model: Optional base model for runs executed by this agent.
348371
349372
description: Optional description of the agent
350373
374+
harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the
375+
harness specified gets injected into the environment.
376+
351377
inference_providers: Inference provider settings used for LLM calls.
352378
353379
memory_stores: Optional list of memory stores to attach to the agent. Each store must be
@@ -380,8 +406,10 @@ async def create(
380406
body=await async_maybe_transform(
381407
{
382408
"name": name,
409+
"base_harness": base_harness,
383410
"base_model": base_model,
384411
"description": description,
412+
"harness_auth_secrets": harness_auth_secrets,
385413
"inference_providers": inference_providers,
386414
"memory_stores": memory_stores,
387415
"prompt": prompt,
@@ -400,8 +428,10 @@ async def update(
400428
self,
401429
uid: str,
402430
*,
431+
base_harness: Optional[str] | Omit = omit,
403432
base_model: Optional[str] | Omit = omit,
404433
description: Optional[str] | Omit = omit,
434+
harness_auth_secrets: Optional[agent_update_params.HarnessAuthSecrets] | Omit = omit,
405435
inference_providers: Optional[agent_update_params.InferenceProviders] | Omit = omit,
406436
memory_stores: Optional[Iterable[agent_update_params.MemoryStore]] | Omit = omit,
407437
name: str | Omit = omit,
@@ -418,14 +448,20 @@ async def update(
418448
"""Update an existing agent.
419449
420450
Args:
421-
base_model: Replacement base model.
451+
base_harness: Replacement default harness.
422452
423-
Omit or pass `null` to leave unchanged, or pass an empty
453+
Omit or pass `null` to leave unchanged, or pass an
454+
empty string to clear.
455+
456+
base_model: Replacement base model. Omit or pass `null` to leave unchanged, or pass an empty
424457
string to clear.
425458
426459
description: Replacement description. Omit or pass `null` to leave unchanged, or use an empty
427460
value to clear.
428461
462+
harness_auth_secrets: Authentication secrets for third-party harnesses. Only the secret for the
463+
harness specified gets injected into the environment.
464+
429465
inference_providers: Inference provider settings used for LLM calls.
430466
431467
memory_stores: Replacement list of memory stores. Omit to leave unchanged, pass an empty array
@@ -456,8 +492,10 @@ async def update(
456492
path_template("/agent/identities/{uid}", uid=uid),
457493
body=await async_maybe_transform(
458494
{
495+
"base_harness": base_harness,
459496
"base_model": base_model,
460497
"description": description,
498+
"harness_auth_secrets": harness_auth_secrets,
461499
"inference_providers": inference_providers,
462500
"memory_stores": memory_stores,
463501
"name": name,

src/oz_agent_sdk/types/agent/agent_create_params.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,35 @@
77

88
from ..._types import SequenceNotStr
99

10-
__all__ = ["AgentCreateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"]
10+
__all__ = [
11+
"AgentCreateParams",
12+
"HarnessAuthSecrets",
13+
"InferenceProviders",
14+
"InferenceProvidersAws",
15+
"MemoryStore",
16+
"Secret",
17+
]
1118

1219

1320
class AgentCreateParams(TypedDict, total=False):
1421
name: Required[str]
1522
"""A name for the agent"""
1623

24+
base_harness: Optional[str]
25+
"""Optional default harness for runs executed by this agent."""
26+
1727
base_model: Optional[str]
1828
"""Optional base model for runs executed by this agent."""
1929

2030
description: Optional[str]
2131
"""Optional description of the agent"""
2232

33+
harness_auth_secrets: HarnessAuthSecrets
34+
"""
35+
Authentication secrets for third-party harnesses. Only the secret for the
36+
harness specified gets injected into the environment.
37+
"""
38+
2339
inference_providers: InferenceProviders
2440
"""Inference provider settings used for LLM calls."""
2541

@@ -50,6 +66,20 @@ class AgentCreateParams(TypedDict, total=False):
5066
"""
5167

5268

69+
class HarnessAuthSecrets(TypedDict, total=False):
70+
"""
71+
Authentication secrets for third-party harnesses.
72+
Only the secret for the harness specified gets injected into the environment.
73+
"""
74+
75+
claude_auth_secret_name: str
76+
"""
77+
Name of a managed secret for Claude Code harness authentication. The secret must
78+
exist within the caller's personal or team scope. Only applicable when harness
79+
type is "claude".
80+
"""
81+
82+
5383
class InferenceProvidersAws(TypedDict, total=False):
5484
"""
5585
Configures AWS Bedrock as the LLM inference provider for this

src/oz_agent_sdk/types/agent/agent_response.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66

77
from ..._models import BaseModel
88

9-
__all__ = ["AgentResponse", "MemoryStore", "Secret", "InferenceProviders", "InferenceProvidersAws"]
9+
__all__ = [
10+
"AgentResponse",
11+
"MemoryStore",
12+
"Secret",
13+
"HarnessAuthSecrets",
14+
"InferenceProviders",
15+
"InferenceProvidersAws",
16+
]
1017

1118

1219
class MemoryStore(BaseModel):
@@ -29,6 +36,20 @@ class Secret(BaseModel):
2936
"""Name of the managed secret."""
3037

3138

39+
class HarnessAuthSecrets(BaseModel):
40+
"""
41+
Authentication secrets for third-party harnesses.
42+
Only the secret for the harness specified gets injected into the environment.
43+
"""
44+
45+
claude_auth_secret_name: Optional[str] = None
46+
"""
47+
Name of a managed secret for Claude Code harness authentication. The secret must
48+
exist within the caller's personal or team scope. Only applicable when harness
49+
type is "claude".
50+
"""
51+
52+
3253
class InferenceProvidersAws(BaseModel):
3354
"""
3455
Configures AWS Bedrock as the LLM inference provider for this
@@ -77,6 +98,16 @@ class AgentResponse(BaseModel):
7798
uid: str
7899
"""Unique identifier for the agent"""
79100

101+
base_harness: Optional[str] = None
102+
"""Default harness for runs executed by this agent.
103+
104+
The precedence order for harness resolution is:
105+
106+
1. The harness specified on the run itself
107+
2. The agent's base harness
108+
3. Oz
109+
"""
110+
80111
base_model: Optional[str] = None
81112
"""Base model for runs executed by this agent.
82113
@@ -90,6 +121,12 @@ class AgentResponse(BaseModel):
90121
description: Optional[str] = None
91122
"""Optional description of the agent"""
92123

124+
harness_auth_secrets: Optional[HarnessAuthSecrets] = None
125+
"""
126+
Authentication secrets for third-party harnesses. Only the secret for the
127+
harness specified gets injected into the environment.
128+
"""
129+
93130
inference_providers: Optional[InferenceProviders] = None
94131
"""Inference provider settings used for LLM calls."""
95132

src/oz_agent_sdk/types/agent/agent_update_params.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,23 @@
77

88
from ..._types import SequenceNotStr
99

10-
__all__ = ["AgentUpdateParams", "InferenceProviders", "InferenceProvidersAws", "MemoryStore", "Secret"]
10+
__all__ = [
11+
"AgentUpdateParams",
12+
"HarnessAuthSecrets",
13+
"InferenceProviders",
14+
"InferenceProvidersAws",
15+
"MemoryStore",
16+
"Secret",
17+
]
1118

1219

1320
class AgentUpdateParams(TypedDict, total=False):
21+
base_harness: Optional[str]
22+
"""Replacement default harness.
23+
24+
Omit or pass `null` to leave unchanged, or pass an empty string to clear.
25+
"""
26+
1427
base_model: Optional[str]
1528
"""Replacement base model.
1629
@@ -23,6 +36,12 @@ class AgentUpdateParams(TypedDict, total=False):
2336
Omit or pass `null` to leave unchanged, or use an empty value to clear.
2437
"""
2538

39+
harness_auth_secrets: Optional[HarnessAuthSecrets]
40+
"""
41+
Authentication secrets for third-party harnesses. Only the secret for the
42+
harness specified gets injected into the environment.
43+
"""
44+
2645
inference_providers: Optional[InferenceProviders]
2746
"""Inference provider settings used for LLM calls."""
2847

@@ -57,6 +76,20 @@ class AgentUpdateParams(TypedDict, total=False):
5776
"""
5877

5978

79+
class HarnessAuthSecrets(TypedDict, total=False):
80+
"""
81+
Authentication secrets for third-party harnesses.
82+
Only the secret for the harness specified gets injected into the environment.
83+
"""
84+
85+
claude_auth_secret_name: str
86+
"""
87+
Name of a managed secret for Claude Code harness authentication. The secret must
88+
exist within the caller's personal or team scope. Only applicable when harness
89+
type is "claude".
90+
"""
91+
92+
6093
class InferenceProvidersAws(TypedDict, total=False):
6194
"""
6295
Configures AWS Bedrock as the LLM inference provider for this

0 commit comments

Comments
 (0)