Skip to content

Commit ce5af72

Browse files
docs(api): clarify name parameter behavior in agent task creation
1 parent bd41d9b commit ce5af72

4 files changed

Lines changed: 38 additions & 8 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: 64
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-46769b729d89151fb7e7ae15725678af99f55ef32d283e34a1e143057aa87b23.yml
3-
openapi_spec_hash: 9115c9f283257e0636aba67fadfeda0a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-550d6a4f6985887b66c29240e495469cc0a74e2c966175364321ae2eb15595d8.yml
3+
openapi_spec_hash: a93e0b4ee276d29ebd1c2f2a4c798f36
44
config_hash: 82cb83ac175dbf40265128506294218b

src/agentex/types/agent_rpc_by_name_params.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,20 @@ class AgentRpcByNameParams(TypedDict, total=False):
3030

3131
class ParamsCreateTaskRequest(TypedDict, total=False):
3232
name: Optional[str]
33-
"""The name of the task to create"""
33+
"""Optional human-readable name for the task.
34+
35+
When set it must be globally unique. task/create is get-or-create by name:
36+
reusing an existing name returns the existing task (with its prior history)
37+
instead of creating a new one, so omit name (or make it unique, e.g. by
38+
appending a UUID) whenever each call should produce a fresh task.
39+
"""
3440

3541
params: Optional[Dict[str, object]]
36-
"""The parameters for the task"""
42+
"""The parameters for the task.
43+
44+
On a get-or-create by name, providing params overwrites the existing task's
45+
params (it is not a pure read).
46+
"""
3747

3848
task_metadata: Optional[Dict[str, object]]
3949
"""Caller-provided metadata to persist on the task row.

src/agentex/types/agent_rpc_params.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,20 @@ class AgentRpcParams(TypedDict, total=False):
3030

3131
class ParamsCreateTaskRequest(TypedDict, total=False):
3232
name: Optional[str]
33-
"""The name of the task to create"""
33+
"""Optional human-readable name for the task.
34+
35+
When set it must be globally unique. task/create is get-or-create by name:
36+
reusing an existing name returns the existing task (with its prior history)
37+
instead of creating a new one, so omit name (or make it unique, e.g. by
38+
appending a UUID) whenever each call should produce a fresh task.
39+
"""
3440

3541
params: Optional[Dict[str, object]]
36-
"""The parameters for the task"""
42+
"""The parameters for the task.
43+
44+
On a get-or-create by name, providing params overwrites the existing task's
45+
params (it is not a pure read).
46+
"""
3747

3848
task_metadata: Optional[Dict[str, object]]
3949
"""Caller-provided metadata to persist on the task row.

src/agentex/types/agents/deployment_preview_rpc_params.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,20 @@ class DeploymentPreviewRpcParams(TypedDict, total=False):
3232

3333
class ParamsCreateTaskRequest(TypedDict, total=False):
3434
name: Optional[str]
35-
"""The name of the task to create"""
35+
"""Optional human-readable name for the task.
36+
37+
When set it must be globally unique. task/create is get-or-create by name:
38+
reusing an existing name returns the existing task (with its prior history)
39+
instead of creating a new one, so omit name (or make it unique, e.g. by
40+
appending a UUID) whenever each call should produce a fresh task.
41+
"""
3642

3743
params: Optional[Dict[str, object]]
38-
"""The parameters for the task"""
44+
"""The parameters for the task.
45+
46+
On a get-or-create by name, providing params overwrites the existing task's
47+
params (it is not a pure read).
48+
"""
3949

4050
task_metadata: Optional[Dict[str, object]]
4151
"""Caller-provided metadata to persist on the task row.

0 commit comments

Comments
 (0)