@@ -156,7 +156,7 @@ export class Agents {
156156 logId : string ,
157157 request : Humanloop . UpdateAgentLogRequest = { } ,
158158 requestOptions ?: Agents . RequestOptions ,
159- ) : Promise < Humanloop . LogResponse > {
159+ ) : Promise < Humanloop . AgentLogResponse > {
160160 const _response = await ( this . _options . fetcher ?? core . fetcher ) ( {
161161 url : urlJoin (
162162 ( await core . Supplier . get ( this . _options . baseUrl ) ) ??
@@ -183,7 +183,7 @@ export class Agents {
183183 abortSignal : requestOptions ?. abortSignal ,
184184 } ) ;
185185 if ( _response . ok ) {
186- return serializers . LogResponse . parseOrThrow ( _response . body , {
186+ return serializers . AgentLogResponse . parseOrThrow ( _response . body , {
187187 unrecognizedObjectKeys : "passthrough" ,
188188 allowUnrecognizedUnionMembers : true ,
189189 allowUnrecognizedEnumValues : true ,
@@ -230,18 +230,21 @@ export class Agents {
230230 }
231231
232232 /**
233- * Call an Agent.
233+ * Call an Agent. The Agent will run on the Humanloop runtime and return a completed Agent Log.
234234 *
235- * Calling an Agent calls the model provider before logging
236- * the request, responses and metadata to Humanloop.
235+ * If the Agent requires a tool call that cannot be ran by Humanloop, execution will halt. To continue,
236+ * pass the ID of the incomplete Log and the required tool call to the /agents/continue endpoint.
237+ *
238+ * The agent will run for the maximum number of iterations, or until it encounters a stop condition,
239+ * according to its configuration.
237240 *
238241 * You can use query parameters `version_id`, or `environment`, to target
239242 * an existing version of the Agent. Otherwise the default deployed version will be chosen.
240243 *
241244 * Instead of targeting an existing version explicitly, you can instead pass in
242- * Agent details in the request body. In this case, we will check if the details correspond
243- * to an existing version of the Agent. If they do not, we will create a new version. This is helpful
244- * in the case where you are storing or deriving your Agent details in code.
245+ * Agent details in the request body. A new version is created if it does not match
246+ * any existing ones. This is helpful in the case where you are storing or deriving
247+ * your Agent details in code.
245248 */
246249 public async callStream (
247250 request : Humanloop . AgentsCallStreamRequest ,
@@ -343,18 +346,21 @@ export class Agents {
343346 }
344347
345348 /**
346- * Call an Agent.
349+ * Call an Agent. The Agent will run on the Humanloop runtime and return a completed Agent Log.
350+ *
351+ * If the Agent requires a tool call that cannot be ran by Humanloop, execution will halt. To continue,
352+ * pass the ID of the incomplete Log and the required tool call to the /agents/continue endpoint.
347353 *
348- * Calling an Agent calls the model provider before logging
349- * the request, responses and metadata to Humanloop .
354+ * The agent will run for the maximum number of iterations, or until it encounters a stop condition,
355+ * according to its configuration .
350356 *
351357 * You can use query parameters `version_id`, or `environment`, to target
352358 * an existing version of the Agent. Otherwise the default deployed version will be chosen.
353359 *
354360 * Instead of targeting an existing version explicitly, you can instead pass in
355- * Agent details in the request body. In this case, we will check if the details correspond
356- * to an existing version of the Agent. If they do not, we will create a new version. This is helpful
357- * in the case where you are storing or deriving your Agent details in code.
361+ * Agent details in the request body. A new version is created if it does not match
362+ * any existing ones. This is helpful in the case where you are storing or deriving
363+ * your Agent details in code.
358364 *
359365 * @param {Humanloop.AgentsCallRequest } request
360366 * @param {Agents.RequestOptions } requestOptions - Request-specific configuration.
@@ -455,16 +461,16 @@ export class Agents {
455461 /**
456462 * Continue an incomplete Agent call.
457463 *
458- * This endpoint allows continuing an existing incomplete Agent call, using the context
459- * from the previous interaction . The Agent will resume processing from where it left off.
464+ * This endpoint allows continuing an existing incomplete Agent call, by passing the tool call
465+ * requested by the Agent . The Agent will resume processing from where it left off.
460466 *
461- * The original log must be in an incomplete state to be continued.
467+ * The messages in the request will be appended to the original messages in the Log. You do not
468+ * have to provide the previous conversation history.
462469 *
463- * The messages in the request will be appended
464- * to the original messages in the log.
470+ * The original log must be in an incomplete state to be continued.
465471 */
466- public async continueStream (
467- request : Humanloop . AgentsContinueStreamRequest ,
472+ public async continueCallStream (
473+ request : Humanloop . AgentsContinueCallStreamRequest ,
468474 requestOptions ?: Agents . RequestOptions ,
469475 ) : Promise < core . Stream < Humanloop . AgentContinueStreamResponse > > {
470476 const _response = await ( this . _options . fetcher ?? core . fetcher ) < stream . Readable > ( {
@@ -488,7 +494,9 @@ export class Agents {
488494 contentType : "application/json" ,
489495 requestType : "json" ,
490496 body : {
491- ...serializers . AgentsContinueStreamRequest . jsonOrThrow ( request , { unrecognizedObjectKeys : "strip" } ) ,
497+ ...serializers . AgentsContinueCallStreamRequest . jsonOrThrow ( request , {
498+ unrecognizedObjectKeys : "strip" ,
499+ } ) ,
492500 stream : true ,
493501 } ,
494502 responseType : "sse" ,
@@ -554,29 +562,29 @@ export class Agents {
554562 /**
555563 * Continue an incomplete Agent call.
556564 *
557- * This endpoint allows continuing an existing incomplete Agent call, using the context
558- * from the previous interaction . The Agent will resume processing from where it left off.
565+ * This endpoint allows continuing an existing incomplete Agent call, by passing the tool call
566+ * requested by the Agent . The Agent will resume processing from where it left off.
559567 *
560- * The original log must be in an incomplete state to be continued.
568+ * The messages in the request will be appended to the original messages in the Log. You do not
569+ * have to provide the previous conversation history.
561570 *
562- * The messages in the request will be appended
563- * to the original messages in the log.
571+ * The original log must be in an incomplete state to be continued.
564572 *
565- * @param {Humanloop.AgentsContinueRequest } request
573+ * @param {Humanloop.AgentsContinueCallRequest } request
566574 * @param {Agents.RequestOptions } requestOptions - Request-specific configuration.
567575 *
568576 * @throws {@link Humanloop.UnprocessableEntityError }
569577 *
570578 * @example
571- * await client.agents.continue ({
579+ * await client.agents.continueCall ({
572580 * logId: "log_id",
573581 * messages: [{
574582 * role: "user"
575583 * }]
576584 * })
577585 */
578- public async continue (
579- request : Humanloop . AgentsContinueRequest ,
586+ public async continueCall (
587+ request : Humanloop . AgentsContinueCallRequest ,
580588 requestOptions ?: Agents . RequestOptions ,
581589 ) : Promise < Humanloop . AgentContinueResponse > {
582590 const _response = await ( this . _options . fetcher ?? core . fetcher ) ( {
0 commit comments