44
55import httpx
66
7- from .tasks import (
8- TasksResource ,
9- AsyncTasksResource ,
10- TasksResourceWithRawResponse ,
11- AsyncTasksResourceWithRawResponse ,
12- TasksResourceWithStreamingResponse ,
13- AsyncTasksResourceWithStreamingResponse ,
7+ from .runs import (
8+ RunsResource ,
9+ AsyncRunsResource ,
10+ RunsResourceWithRawResponse ,
11+ AsyncRunsResourceWithRawResponse ,
12+ RunsResourceWithStreamingResponse ,
13+ AsyncRunsResourceWithStreamingResponse ,
1414)
1515from ...types import agent_run_params
1616from ..._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
3232
3333class AgentResource (SyncAPIResource ):
3434 @cached_property
35- def tasks (self ) -> TasksResource :
36- return TasksResource (self ._client )
35+ def runs (self ) -> RunsResource :
36+ return RunsResource (self ._client )
3737
3838 @cached_property
3939 def with_raw_response (self ) -> AgentResourceWithRawResponse :
@@ -71,16 +71,16 @@ def run(
7171 """Spawn an ambient agent with a prompt and optional configuration.
7272
7373 The agent will
74- be queued for execution and assigned a unique task ID.
74+ be queued for execution and assigned a unique run ID.
7575
7676 Args:
7777 prompt: The prompt/instruction for the agent to execute
7878
79- config: Configuration for an ambient agent task
79+ config: Configuration for an ambient agent run
8080
81- team: Make the task visible to all team members, not only the calling user
81+ team: Make the run visible to all team members, not only the calling user
8282
83- title: Custom title for the task (auto-generated if not provided)
83+ title: Custom title for the run (auto-generated if not provided)
8484
8585 extra_headers: Send extra headers
8686
@@ -110,8 +110,8 @@ def run(
110110
111111class AsyncAgentResource (AsyncAPIResource ):
112112 @cached_property
113- def tasks (self ) -> AsyncTasksResource :
114- return AsyncTasksResource (self ._client )
113+ def runs (self ) -> AsyncRunsResource :
114+ return AsyncRunsResource (self ._client )
115115
116116 @cached_property
117117 def with_raw_response (self ) -> AsyncAgentResourceWithRawResponse :
@@ -149,16 +149,16 @@ async def run(
149149 """Spawn an ambient agent with a prompt and optional configuration.
150150
151151 The agent will
152- be queued for execution and assigned a unique task ID.
152+ be queued for execution and assigned a unique run ID.
153153
154154 Args:
155155 prompt: The prompt/instruction for the agent to execute
156156
157- config: Configuration for an ambient agent task
157+ config: Configuration for an ambient agent run
158158
159- team: Make the task visible to all team members, not only the calling user
159+ team: Make the run visible to all team members, not only the calling user
160160
161- title: Custom title for the task (auto-generated if not provided)
161+ title: Custom title for the run (auto-generated if not provided)
162162
163163 extra_headers: Send extra headers
164164
@@ -195,8 +195,8 @@ def __init__(self, agent: AgentResource) -> None:
195195 )
196196
197197 @cached_property
198- def tasks (self ) -> TasksResourceWithRawResponse :
199- return TasksResourceWithRawResponse (self ._agent .tasks )
198+ def runs (self ) -> RunsResourceWithRawResponse :
199+ return RunsResourceWithRawResponse (self ._agent .runs )
200200
201201
202202class AsyncAgentResourceWithRawResponse :
@@ -208,8 +208,8 @@ def __init__(self, agent: AsyncAgentResource) -> None:
208208 )
209209
210210 @cached_property
211- def tasks (self ) -> AsyncTasksResourceWithRawResponse :
212- return AsyncTasksResourceWithRawResponse (self ._agent .tasks )
211+ def runs (self ) -> AsyncRunsResourceWithRawResponse :
212+ return AsyncRunsResourceWithRawResponse (self ._agent .runs )
213213
214214
215215class AgentResourceWithStreamingResponse :
@@ -221,8 +221,8 @@ def __init__(self, agent: AgentResource) -> None:
221221 )
222222
223223 @cached_property
224- def tasks (self ) -> TasksResourceWithStreamingResponse :
225- return TasksResourceWithStreamingResponse (self ._agent .tasks )
224+ def runs (self ) -> RunsResourceWithStreamingResponse :
225+ return RunsResourceWithStreamingResponse (self ._agent .runs )
226226
227227
228228class AsyncAgentResourceWithStreamingResponse :
@@ -234,5 +234,5 @@ def __init__(self, agent: AsyncAgentResource) -> None:
234234 )
235235
236236 @cached_property
237- def tasks (self ) -> AsyncTasksResourceWithStreamingResponse :
238- return AsyncTasksResourceWithStreamingResponse (self ._agent .tasks )
237+ def runs (self ) -> AsyncRunsResourceWithStreamingResponse :
238+ return AsyncRunsResourceWithStreamingResponse (self ._agent .runs )
0 commit comments