@@ -33,10 +33,16 @@ export class Agents extends APIResource {
3333 steps : StepsAPI . Steps = new StepsAPI . Steps ( this . _client ) ;
3434 turn : TurnAPI . TurnResource = new TurnAPI . TurnResource ( this . _client ) ;
3535
36+ /**
37+ * Create an agent with the given configuration.
38+ */
3639 create ( body : AgentCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < AgentCreateResponse > {
3740 return this . _client . post ( '/v1/agents' , { body, ...options } ) ;
3841 }
3942
43+ /**
44+ * Delete an agent by its ID.
45+ */
4046 delete ( agentId : string , options ?: Core . RequestOptions ) : Core . APIPromise < void > {
4147 return this . _client . delete ( `/v1/agents/${ agentId } ` , {
4248 ...options ,
@@ -45,69 +51,141 @@ export class Agents extends APIResource {
4551 }
4652}
4753
54+ /**
55+ * An inference step in an agent turn.
56+ */
4857export interface InferenceStep {
4958 /**
50- * A message containing the model's (assistant) response in a chat conversation .
59+ * The response from the LLM .
5160 */
5261 model_response : Shared . CompletionMessage ;
5362
63+ /**
64+ * The ID of the step.
65+ */
5466 step_id : string ;
5567
5668 step_type : 'inference' ;
5769
70+ /**
71+ * The ID of the turn.
72+ */
5873 turn_id : string ;
5974
75+ /**
76+ * The time the step completed.
77+ */
6078 completed_at ?: string ;
6179
80+ /**
81+ * The time the step started.
82+ */
6283 started_at ?: string ;
6384}
6485
86+ /**
87+ * A memory retrieval step in an agent turn.
88+ */
6589export interface MemoryRetrievalStep {
6690 /**
67- * A image content item
91+ * The context retrieved from the vector databases.
6892 */
6993 inserted_context : Shared . InterleavedContent ;
7094
95+ /**
96+ * The ID of the step.
97+ */
7198 step_id : string ;
7299
73100 step_type : 'memory_retrieval' ;
74101
102+ /**
103+ * The ID of the turn.
104+ */
75105 turn_id : string ;
76106
107+ /**
108+ * The IDs of the vector databases to retrieve context from.
109+ */
77110 vector_db_ids : string ;
78111
112+ /**
113+ * The time the step completed.
114+ */
79115 completed_at ?: string ;
80116
117+ /**
118+ * The time the step started.
119+ */
81120 started_at ?: string ;
82121}
83122
123+ /**
124+ * A shield call step in an agent turn.
125+ */
84126export interface ShieldCallStep {
127+ /**
128+ * The ID of the step.
129+ */
85130 step_id : string ;
86131
87132 step_type : 'shield_call' ;
88133
134+ /**
135+ * The ID of the turn.
136+ */
89137 turn_id : string ;
90138
139+ /**
140+ * The time the step completed.
141+ */
91142 completed_at ?: string ;
92143
144+ /**
145+ * The time the step started.
146+ */
93147 started_at ?: string ;
94148
149+ /**
150+ * The violation from the shield call.
151+ */
95152 violation ?: Shared . SafetyViolation ;
96153}
97154
155+ /**
156+ * A tool execution step in an agent turn.
157+ */
98158export interface ToolExecutionStep {
159+ /**
160+ * The ID of the step.
161+ */
99162 step_id : string ;
100163
101164 step_type : 'tool_execution' ;
102165
166+ /**
167+ * The tool calls to execute.
168+ */
103169 tool_calls : Array < Shared . ToolCall > ;
104170
171+ /**
172+ * The tool responses from the tool calls.
173+ */
105174 tool_responses : Array < ToolResponse > ;
106175
176+ /**
177+ * The ID of the turn.
178+ */
107179 turn_id : string ;
108180
181+ /**
182+ * The time the step completed.
183+ */
109184 completed_at ?: string ;
110185
186+ /**
187+ * The time the step started.
188+ */
111189 started_at ?: string ;
112190}
113191
@@ -129,6 +207,9 @@ export interface AgentCreateResponse {
129207}
130208
131209export interface AgentCreateParams {
210+ /**
211+ * The configuration for the agent.
212+ */
132213 agent_config : Shared . AgentConfig ;
133214}
134215
0 commit comments