@google/adk 0.2.4 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/cjs/agents/base_agent.js +52 -24
  2. package/dist/cjs/agents/callback_context.js +4 -1
  3. package/dist/cjs/agents/content_processor_utils.js +15 -7
  4. package/dist/cjs/agents/functions.js +79 -29
  5. package/dist/cjs/agents/invocation_context.js +3 -1
  6. package/dist/cjs/agents/llm_agent.js +188 -108
  7. package/dist/cjs/agents/loop_agent.js +18 -6
  8. package/dist/cjs/agents/parallel_agent.js +20 -7
  9. package/dist/cjs/agents/readonly_context.js +4 -1
  10. package/dist/cjs/agents/sequential_agent.js +34 -12
  11. package/dist/cjs/artifacts/gcs_artifact_service.js +28 -20
  12. package/dist/cjs/artifacts/in_memory_artifact_service.js +18 -4
  13. package/dist/cjs/auth/auth_handler.js +3 -1
  14. package/dist/cjs/code_executors/base_code_executor.js +14 -2
  15. package/dist/cjs/code_executors/built_in_code_executor.js +21 -5
  16. package/dist/cjs/code_executors/code_executor_context.js +5 -5
  17. package/dist/cjs/common.js +45 -0
  18. package/dist/cjs/events/event.js +1 -3
  19. package/dist/cjs/examples/base_example_provider.js +18 -2
  20. package/dist/cjs/examples/example_util.js +1 -1
  21. package/dist/cjs/index.js +19 -19
  22. package/dist/cjs/index.js.map +4 -4
  23. package/dist/cjs/memory/in_memory_memory_service.js +3 -1
  24. package/dist/cjs/models/base_llm.js +8 -4
  25. package/dist/cjs/models/gemini_llm_connection.js +1 -0
  26. package/dist/cjs/models/google_llm.js +3 -3
  27. package/dist/cjs/plugins/base_plugin.js +71 -49
  28. package/dist/cjs/plugins/logging_plugin.js +50 -13
  29. package/dist/cjs/plugins/plugin_manager.js +56 -24
  30. package/dist/cjs/plugins/security_plugin.js +5 -2
  31. package/dist/cjs/runner/runner.js +126 -101
  32. package/dist/cjs/sessions/in_memory_session_service.js +38 -14
  33. package/dist/cjs/telemetry/google_cloud.js +7 -9
  34. package/dist/cjs/telemetry/setup.js +15 -7
  35. package/dist/cjs/telemetry/tracing.js +37 -15
  36. package/dist/cjs/tools/agent_tool.js +26 -13
  37. package/dist/cjs/tools/base_tool.js +19 -7
  38. package/dist/cjs/tools/forwarding_artifact_service.js +1 -1
  39. package/dist/cjs/tools/function_tool.js +15 -7
  40. package/dist/cjs/tools/google_search_tool.js +8 -4
  41. package/dist/cjs/tools/mcp/mcp_session_manager.js +16 -10
  42. package/dist/cjs/tools/mcp/mcp_tool.js +1 -3
  43. package/dist/cjs/tools/mcp/mcp_toolset.js +1 -1
  44. package/dist/cjs/tools/tool_context.js +4 -9
  45. package/dist/cjs/utils/env_aware_utils.js +1 -1
  46. package/dist/cjs/utils/gemini_schema_util.js +10 -4
  47. package/dist/cjs/utils/logger.js +47 -3
  48. package/dist/cjs/utils/simple_zod_to_json.js +100 -141
  49. package/dist/cjs/utils/variant_utils.js +1 -1
  50. package/dist/cjs/version.js +1 -1
  51. package/dist/esm/agents/base_agent.js +57 -25
  52. package/dist/esm/agents/callback_context.js +4 -1
  53. package/dist/esm/agents/content_processor_utils.js +25 -9
  54. package/dist/esm/agents/functions.js +83 -29
  55. package/dist/esm/agents/invocation_context.js +3 -1
  56. package/dist/esm/agents/llm_agent.js +228 -116
  57. package/dist/esm/agents/loop_agent.js +16 -5
  58. package/dist/esm/agents/parallel_agent.js +18 -6
  59. package/dist/esm/agents/readonly_context.js +4 -1
  60. package/dist/esm/agents/sequential_agent.js +33 -12
  61. package/dist/esm/artifacts/gcs_artifact_service.js +28 -20
  62. package/dist/esm/artifacts/in_memory_artifact_service.js +18 -4
  63. package/dist/esm/auth/auth_handler.js +3 -1
  64. package/dist/esm/code_executors/base_code_executor.js +12 -1
  65. package/dist/esm/code_executors/built_in_code_executor.js +19 -4
  66. package/dist/esm/code_executors/code_executor_context.js +5 -5
  67. package/dist/esm/common.js +56 -11
  68. package/dist/esm/events/event.js +1 -3
  69. package/dist/esm/examples/base_example_provider.js +16 -1
  70. package/dist/esm/examples/example_util.js +4 -2
  71. package/dist/esm/index.js +19 -19
  72. package/dist/esm/index.js.map +4 -4
  73. package/dist/esm/memory/in_memory_memory_service.js +3 -1
  74. package/dist/esm/models/base_llm.js +8 -4
  75. package/dist/esm/models/gemini_llm_connection.js +1 -0
  76. package/dist/esm/models/google_llm.js +8 -4
  77. package/dist/esm/plugins/base_plugin.js +71 -49
  78. package/dist/esm/plugins/logging_plugin.js +55 -14
  79. package/dist/esm/plugins/plugin_manager.js +56 -24
  80. package/dist/esm/plugins/security_plugin.js +5 -2
  81. package/dist/esm/runner/runner.js +139 -105
  82. package/dist/esm/sessions/in_memory_session_service.js +41 -15
  83. package/dist/esm/telemetry/google_cloud.js +7 -9
  84. package/dist/esm/telemetry/setup.js +23 -9
  85. package/dist/esm/telemetry/tracing.js +37 -15
  86. package/dist/esm/tools/agent_tool.js +25 -13
  87. package/dist/esm/tools/base_tool.js +17 -6
  88. package/dist/esm/tools/forwarding_artifact_service.js +1 -1
  89. package/dist/esm/tools/function_tool.js +13 -8
  90. package/dist/esm/tools/google_search_tool.js +6 -3
  91. package/dist/esm/tools/long_running_tool.js +3 -1
  92. package/dist/esm/tools/mcp/mcp_session_manager.js +22 -12
  93. package/dist/esm/tools/mcp/mcp_tool.js +1 -3
  94. package/dist/esm/tools/mcp/mcp_toolset.js +1 -1
  95. package/dist/esm/tools/tool_context.js +4 -9
  96. package/dist/esm/utils/env_aware_utils.js +1 -1
  97. package/dist/esm/utils/gemini_schema_util.js +10 -4
  98. package/dist/esm/utils/logger.js +43 -2
  99. package/dist/esm/utils/simple_zod_to_json.js +102 -141
  100. package/dist/esm/utils/variant_utils.js +1 -1
  101. package/dist/esm/version.js +1 -1
  102. package/dist/types/agents/base_agent.d.ts +16 -4
  103. package/dist/types/agents/callback_context.d.ts +1 -1
  104. package/dist/types/agents/invocation_context.d.ts +4 -2
  105. package/dist/types/agents/llm_agent.d.ts +43 -31
  106. package/dist/types/agents/loop_agent.d.ts +17 -1
  107. package/dist/types/agents/parallel_agent.d.ts +17 -1
  108. package/dist/types/agents/sequential_agent.d.ts +17 -1
  109. package/dist/types/artifacts/in_memory_artifact_service.d.ts +3 -3
  110. package/dist/types/auth/auth_schemes.d.ts +5 -2
  111. package/dist/types/code_executors/base_code_executor.d.ts +14 -0
  112. package/dist/types/code_executors/built_in_code_executor.d.ts +20 -1
  113. package/dist/types/code_executors/code_executor_context.d.ts +2 -4
  114. package/dist/types/common.d.ts +40 -15
  115. package/dist/types/examples/base_example_provider.d.ts +16 -0
  116. package/dist/types/index.d.ts +3 -3
  117. package/dist/types/models/base_llm_connection.d.ts +1 -1
  118. package/dist/types/models/llm_response.d.ts +1 -1
  119. package/dist/types/plugins/base_plugin.d.ts +50 -40
  120. package/dist/types/plugins/logging_plugin.d.ts +12 -12
  121. package/dist/types/plugins/plugin_manager.d.ts +12 -12
  122. package/dist/types/plugins/security_plugin.d.ts +1 -1
  123. package/dist/types/runner/runner.d.ts +18 -10
  124. package/dist/types/sessions/in_memory_session_service.d.ts +5 -5
  125. package/dist/types/telemetry/setup.d.ts +1 -1
  126. package/dist/types/telemetry/tracing.d.ts +7 -6
  127. package/dist/types/tools/agent_tool.d.ts +15 -1
  128. package/dist/types/tools/base_tool.d.ts +15 -1
  129. package/dist/types/tools/base_toolset.d.ts +2 -1
  130. package/dist/types/tools/forwarding_artifact_service.d.ts +2 -2
  131. package/dist/types/tools/function_tool.d.ts +18 -4
  132. package/dist/types/tools/google_search_tool.d.ts +5 -6
  133. package/dist/types/tools/mcp/mcp_session_manager.d.ts +10 -3
  134. package/dist/types/tools/mcp/mcp_toolset.d.ts +1 -2
  135. package/dist/types/tools/tool_context.d.ts +1 -1
  136. package/dist/types/utils/gemini_schema_util.d.ts +4 -12
  137. package/dist/types/utils/logger.d.ts +11 -10
  138. package/dist/types/utils/simple_zod_to_json.d.ts +5 -4
  139. package/dist/types/version.d.ts +1 -1
  140. package/dist/web/agents/base_agent.js +103 -36
  141. package/dist/web/agents/callback_context.js +4 -1
  142. package/dist/web/agents/content_processor_utils.js +25 -9
  143. package/dist/web/agents/functions.js +83 -29
  144. package/dist/web/agents/invocation_context.js +3 -1
  145. package/dist/web/agents/llm_agent.js +282 -137
  146. package/dist/web/agents/loop_agent.js +16 -5
  147. package/dist/web/agents/parallel_agent.js +18 -6
  148. package/dist/web/agents/readonly_context.js +4 -1
  149. package/dist/web/agents/sequential_agent.js +33 -12
  150. package/dist/web/artifacts/gcs_artifact_service.js +25 -17
  151. package/dist/web/artifacts/in_memory_artifact_service.js +18 -4
  152. package/dist/web/auth/auth_handler.js +3 -1
  153. package/dist/web/code_executors/base_code_executor.js +12 -1
  154. package/dist/web/code_executors/built_in_code_executor.js +19 -4
  155. package/dist/web/code_executors/code_executor_context.js +5 -5
  156. package/dist/web/common.js +56 -11
  157. package/dist/web/events/event.js +1 -3
  158. package/dist/web/examples/base_example_provider.js +16 -1
  159. package/dist/web/examples/example_util.js +4 -2
  160. package/dist/web/index.js +1 -1
  161. package/dist/web/index.js.map +4 -4
  162. package/dist/web/memory/in_memory_memory_service.js +3 -1
  163. package/dist/web/models/base_llm.js +8 -4
  164. package/dist/web/models/gemini_llm_connection.js +1 -0
  165. package/dist/web/models/google_llm.js +8 -4
  166. package/dist/web/plugins/base_plugin.js +71 -49
  167. package/dist/web/plugins/logging_plugin.js +55 -14
  168. package/dist/web/plugins/plugin_manager.js +56 -24
  169. package/dist/web/plugins/security_plugin.js +5 -2
  170. package/dist/web/runner/runner.js +186 -119
  171. package/dist/web/sessions/in_memory_session_service.js +41 -15
  172. package/dist/web/telemetry/google_cloud.js +7 -9
  173. package/dist/web/telemetry/setup.js +23 -9
  174. package/dist/web/telemetry/tracing.js +37 -15
  175. package/dist/web/tools/agent_tool.js +25 -13
  176. package/dist/web/tools/base_tool.js +17 -6
  177. package/dist/web/tools/forwarding_artifact_service.js +1 -1
  178. package/dist/web/tools/function_tool.js +13 -8
  179. package/dist/web/tools/google_search_tool.js +6 -3
  180. package/dist/web/tools/long_running_tool.js +3 -1
  181. package/dist/web/tools/mcp/mcp_session_manager.js +22 -12
  182. package/dist/web/tools/mcp/mcp_tool.js +1 -3
  183. package/dist/web/tools/mcp/mcp_toolset.js +1 -1
  184. package/dist/web/tools/tool_context.js +4 -9
  185. package/dist/web/utils/env_aware_utils.js +1 -1
  186. package/dist/web/utils/gemini_schema_util.js +10 -4
  187. package/dist/web/utils/logger.js +43 -2
  188. package/dist/web/utils/simple_zod_to_json.js +102 -155
  189. package/dist/web/utils/variant_utils.js +1 -1
  190. package/dist/web/version.js +1 -1
  191. package/package.json +5 -3
@@ -26,9 +26,11 @@ var llm_agent_exports = {};
26
26
  __export(llm_agent_exports, {
27
27
  LlmAgent: () => LlmAgent,
28
28
  REQUEST_CONFIRMATION_LLM_REQUEST_PROCESSOR: () => REQUEST_CONFIRMATION_LLM_REQUEST_PROCESSOR,
29
+ isLlmAgent: () => isLlmAgent,
29
30
  responseProcessor: () => responseProcessor
30
31
  });
31
32
  module.exports = __toCommonJS(llm_agent_exports);
33
+ var import_api = require("@opentelemetry/api");
32
34
  var import_lodash_es = require("lodash-es");
33
35
  var import_zod = require("zod");
34
36
  var import_base_code_executor = require("../code_executors/base_code_executor.js");
@@ -47,6 +49,7 @@ var import_tool_confirmation = require("../tools/tool_confirmation.js");
47
49
  var import_tool_context = require("../tools/tool_context.js");
48
50
  var import_env_aware_utils = require("../utils/env_aware_utils.js");
49
51
  var import_logger = require("../utils/logger.js");
52
+ var import_tracing = require("../telemetry/tracing.js");
50
53
  var import_base_agent = require("./base_agent.js");
51
54
  var import_base_llm_processor = require("./base_llm_processor.js");
52
55
  var import_callback_context = require("./callback_context.js");
@@ -60,22 +63,24 @@ var import_run_config = require("./run_config.js");
60
63
  * Copyright 2025 Google LLC
61
64
  * SPDX-License-Identifier: Apache-2.0
62
65
  */
66
+ var _a, _b;
63
67
  const ADK_AGENT_NAME_LABEL_KEY = "adk_agent_name";
64
- async function convertToolUnionToTools(toolUnion, context) {
68
+ async function convertToolUnionToTools(toolUnion, context2) {
65
69
  if (toolUnion instanceof import_base_tool.BaseTool) {
66
70
  return [toolUnion];
67
71
  }
68
- return await toolUnion.getTools(context);
72
+ return await toolUnion.getTools(context2);
69
73
  }
70
74
  class BasicLlmRequestProcessor extends import_base_llm_processor.BaseLlmRequestProcessor {
75
+ // eslint-disable-next-line require-yield
71
76
  async *runAsync(invocationContext, llmRequest) {
72
- var _a;
77
+ var _a2;
73
78
  const agent = invocationContext.agent;
74
- if (!(agent instanceof LlmAgent)) {
79
+ if (!isLlmAgent(agent)) {
75
80
  return;
76
81
  }
77
82
  llmRequest.model = agent.canonicalModel.model;
78
- llmRequest.config = { ...(_a = agent.generateContentConfig) != null ? _a : {} };
83
+ llmRequest.config = { ...(_a2 = agent.generateContentConfig) != null ? _a2 : {} };
79
84
  if (agent.outputSchema) {
80
85
  (0, import_llm_request.setOutputSchema)(llmRequest, agent.outputSchema);
81
86
  }
@@ -92,6 +97,7 @@ class BasicLlmRequestProcessor extends import_base_llm_processor.BaseLlmRequestP
92
97
  }
93
98
  const BASIC_LLM_REQUEST_PROCESSOR = new BasicLlmRequestProcessor();
94
99
  class IdentityLlmRequestProcessor extends import_base_llm_processor.BaseLlmRequestProcessor {
100
+ // eslint-disable-next-line require-yield
95
101
  async *runAsync(invocationContext, llmRequest) {
96
102
  const agent = invocationContext.agent;
97
103
  const si = [`You are an agent. Your internal name is "${agent.name}".`];
@@ -106,13 +112,14 @@ class InstructionsLlmRequestProcessor extends import_base_llm_processor.BaseLlmR
106
112
  /**
107
113
  * Handles instructions and global instructions for LLM flow.
108
114
  */
115
+ // eslint-disable-next-line require-yield
109
116
  async *runAsync(invocationContext, llmRequest) {
110
117
  const agent = invocationContext.agent;
111
118
  if (!(agent instanceof LlmAgent) || !(agent.rootAgent instanceof LlmAgent)) {
112
119
  return;
113
120
  }
114
121
  const rootAgent = agent.rootAgent;
115
- if (rootAgent instanceof LlmAgent && rootAgent.globalInstruction) {
122
+ if (isLlmAgent(rootAgent) && rootAgent.globalInstruction) {
116
123
  const { instruction, requireStateInjection } = await rootAgent.canonicalGlobalInstruction(
117
124
  new import_readonly_context.ReadonlyContext(invocationContext)
118
125
  );
@@ -142,9 +149,10 @@ class InstructionsLlmRequestProcessor extends import_base_llm_processor.BaseLlmR
142
149
  }
143
150
  const INSTRUCTIONS_LLM_REQUEST_PROCESSOR = new InstructionsLlmRequestProcessor();
144
151
  class ContentRequestProcessor {
152
+ // eslint-disable-next-line require-yield
145
153
  async *runAsync(invocationContext, llmRequest) {
146
154
  const agent = invocationContext.agent;
147
- if (!agent || !(agent instanceof LlmAgent)) {
155
+ if (!agent || !isLlmAgent(agent)) {
148
156
  return;
149
157
  }
150
158
  if (agent.includeContents === "default") {
@@ -183,6 +191,7 @@ class AgentTransferLlmRequestProcessor extends import_base_llm_processor.BaseLlm
183
191
  }
184
192
  });
185
193
  }
194
+ // eslint-disable-next-line require-yield
186
195
  async *runAsync(invocationContext, llmRequest) {
187
196
  if (!(invocationContext.agent instanceof LlmAgent)) {
188
197
  return;
@@ -232,7 +241,7 @@ to your parent agent.
232
241
  getTransferTargets(agent) {
233
242
  const targets = [];
234
243
  targets.push(...agent.subAgents);
235
- if (!agent.parentAgent || !(agent.parentAgent instanceof LlmAgent)) {
244
+ if (!agent.parentAgent || !isLlmAgent(agent.parentAgent)) {
236
245
  return targets;
237
246
  }
238
247
  if (!agent.disallowTransferToParent) {
@@ -251,9 +260,9 @@ to your parent agent.
251
260
  const AGENT_TRANSFER_LLM_REQUEST_PROCESSOR = new AgentTransferLlmRequestProcessor();
252
261
  class RequestConfirmationLlmRequestProcessor extends import_base_llm_processor.BaseLlmRequestProcessor {
253
262
  /** Handles tool confirmation information to build the LLM request. */
254
- async *runAsync(invocationContext, llmRequest) {
263
+ async *runAsync(invocationContext) {
255
264
  const agent = invocationContext.agent;
256
- if (!(agent instanceof LlmAgent)) {
265
+ if (!isLlmAgent(agent)) {
257
266
  return;
258
267
  }
259
268
  const events = invocationContext.session.events;
@@ -279,7 +288,9 @@ class RequestConfirmationLlmRequestProcessor extends import_base_llm_processor.B
279
288
  foundConfirmation = true;
280
289
  let toolConfirmation = null;
281
290
  if (functionResponse.response && Object.keys(functionResponse.response).length === 1 && "response" in functionResponse.response) {
282
- toolConfirmation = JSON.parse(functionResponse.response["response"]);
291
+ toolConfirmation = JSON.parse(
292
+ functionResponse.response["response"]
293
+ );
283
294
  } else if (functionResponse.response) {
284
295
  toolConfirmation = new import_tool_confirmation.ToolConfirmation({
285
296
  hint: functionResponse.response["hint"],
@@ -343,8 +354,12 @@ class RequestConfirmationLlmRequestProcessor extends import_base_llm_processor.B
343
354
  if (Object.keys(toolsToResumeWithConfirmation).length === 0) {
344
355
  continue;
345
356
  }
346
- const toolsList = await agent.canonicalTools(new import_readonly_context.ReadonlyContext(invocationContext));
347
- const toolsDict = Object.fromEntries(toolsList.map((tool) => [tool.name, tool]));
357
+ const toolsList = await agent.canonicalTools(
358
+ new import_readonly_context.ReadonlyContext(invocationContext)
359
+ );
360
+ const toolsDict = Object.fromEntries(
361
+ toolsList.map((tool) => [tool.name, tool])
362
+ );
348
363
  const functionResponseEvent = await (0, import_functions.handleFunctionCallList)({
349
364
  invocationContext,
350
365
  functionCalls: Object.values(toolsToResumeWithArgs),
@@ -373,12 +388,12 @@ class CodeExecutionRequestProcessor extends import_base_llm_processor.BaseLlmReq
373
388
  for await (const event of runPreProcessor(invocationContext, llmRequest)) {
374
389
  yield event;
375
390
  }
376
- if (!(invocationContext.agent.codeExecutor instanceof import_base_code_executor.BaseCodeExecutor)) {
391
+ if (!(0, import_base_code_executor.isBaseCodeExecutor)(invocationContext.agent.codeExecutor)) {
377
392
  return;
378
393
  }
379
394
  for (const content of llmRequest.contents) {
380
395
  const delimeters = invocationContext.agent.codeExecutor.codeBlockDelimiters.length ? invocationContext.agent.codeExecutor.codeBlockDelimiters[0] : ["", ""];
381
- const codeExecutionParts = (0, import_code_execution_utils.convertCodeExecutionParts)(
396
+ (0, import_code_execution_utils.convertCodeExecutionParts)(
382
397
  content,
383
398
  delimeters,
384
399
  invocationContext.agent.codeExecutor.executionResultDelimiters
@@ -442,7 +457,10 @@ class CodeExecutionResponseProcessor {
442
457
  if (llmResponse.partial) {
443
458
  return;
444
459
  }
445
- for await (const event of runPostProcessor(invocationContext, llmResponse)) {
460
+ for await (const event of runPostProcessor(
461
+ invocationContext,
462
+ llmResponse
463
+ )) {
446
464
  yield event;
447
465
  }
448
466
  }
@@ -450,27 +468,36 @@ class CodeExecutionResponseProcessor {
450
468
  const responseProcessor = new CodeExecutionResponseProcessor();
451
469
  async function* runPreProcessor(invocationContext, llmRequest) {
452
470
  const agent = invocationContext.agent;
453
- if (!(agent instanceof LlmAgent)) {
471
+ if (!isLlmAgent(agent)) {
454
472
  return;
455
473
  }
456
474
  const codeExecutor = agent.codeExecutor;
457
- if (!codeExecutor || !(codeExecutor instanceof import_base_code_executor.BaseCodeExecutor)) {
475
+ if (!codeExecutor || !(0, import_base_code_executor.isBaseCodeExecutor)(codeExecutor)) {
458
476
  return;
459
477
  }
460
- if (codeExecutor instanceof import_built_in_code_executor.BuiltInCodeExecutor) {
478
+ if ((0, import_built_in_code_executor.isBuiltInCodeExecutor)(codeExecutor)) {
461
479
  codeExecutor.processLlmRequest(llmRequest);
462
480
  return;
463
481
  }
464
482
  if (!codeExecutor.optimizeDataFile) {
465
483
  return;
466
484
  }
467
- const codeExecutorContext = new import_code_executor_context.CodeExecutorContext(new import_state.State(invocationContext.session.state));
485
+ const codeExecutorContext = new import_code_executor_context.CodeExecutorContext(
486
+ new import_state.State(invocationContext.session.state)
487
+ );
468
488
  if (codeExecutorContext.getErrorCount(invocationContext.invocationId) >= codeExecutor.errorRetryAttempts) {
469
489
  return;
470
490
  }
471
- const allInputFiles = extractAndReplaceInlineFiles(codeExecutorContext, llmRequest);
472
- const processedFileNames = new Set(codeExecutorContext.getProcessedFileNames());
473
- const filesToProcess = allInputFiles.filter((f) => !processedFileNames.has(f.name));
491
+ const allInputFiles = extractAndReplaceInlineFiles(
492
+ codeExecutorContext,
493
+ llmRequest
494
+ );
495
+ const processedFileNames = new Set(
496
+ codeExecutorContext.getProcessedFileNames()
497
+ );
498
+ const filesToProcess = allInputFiles.filter(
499
+ (f) => !processedFileNames.has(f.name)
500
+ );
474
501
  for (const file of filesToProcess) {
475
502
  const codeStr = getDataFilePreprocessingCode(file);
476
503
  if (!codeStr) {
@@ -490,7 +517,10 @@ async function* runPreProcessor(invocationContext, llmRequest) {
490
517
  branch: invocationContext.branch,
491
518
  content: codeContent
492
519
  });
493
- const executionId = getOrSetExecutionId(invocationContext, codeExecutorContext);
520
+ const executionId = getOrSetExecutionId(
521
+ invocationContext,
522
+ codeExecutorContext
523
+ );
494
524
  const codeExecutionResult = await codeExecutor.executeCode({
495
525
  invocationContext,
496
526
  codeExecutionInput: {
@@ -517,20 +547,22 @@ async function* runPreProcessor(invocationContext, llmRequest) {
517
547
  }
518
548
  async function* runPostProcessor(invocationContext, llmResponse) {
519
549
  const agent = invocationContext.agent;
520
- if (!(agent instanceof LlmAgent)) {
550
+ if (!isLlmAgent(agent)) {
521
551
  return;
522
552
  }
523
553
  const codeExecutor = agent.codeExecutor;
524
- if (!codeExecutor || !(codeExecutor instanceof import_base_code_executor.BaseCodeExecutor)) {
554
+ if (!codeExecutor || !(0, import_base_code_executor.isBaseCodeExecutor)(codeExecutor)) {
525
555
  return;
526
556
  }
527
557
  if (!llmResponse || !llmResponse.content) {
528
558
  return;
529
559
  }
530
- if (codeExecutor instanceof import_built_in_code_executor.BuiltInCodeExecutor) {
560
+ if ((0, import_built_in_code_executor.isBuiltInCodeExecutor)(codeExecutor)) {
531
561
  return;
532
562
  }
533
- const codeExecutorContext = new import_code_executor_context.CodeExecutorContext(new import_state.State(invocationContext.session.state));
563
+ const codeExecutorContext = new import_code_executor_context.CodeExecutorContext(
564
+ new import_state.State(invocationContext.session.state)
565
+ );
534
566
  if (codeExecutorContext.getErrorCount(invocationContext.invocationId) >= codeExecutor.errorRetryAttempts) {
535
567
  return;
536
568
  }
@@ -548,7 +580,10 @@ async function* runPostProcessor(invocationContext, llmResponse) {
548
580
  branch: invocationContext.branch,
549
581
  content: responseContent
550
582
  });
551
- const executionId = getOrSetExecutionId(invocationContext, codeExecutorContext);
583
+ const executionId = getOrSetExecutionId(
584
+ invocationContext,
585
+ codeExecutorContext
586
+ );
552
587
  const codeExecutionResult = await codeExecutor.executeCode({
553
588
  invocationContext,
554
589
  codeExecutionInput: {
@@ -568,10 +603,10 @@ async function* runPostProcessor(invocationContext, llmResponse) {
568
603
  codeExecutorContext,
569
604
  codeExecutionResult
570
605
  );
571
- llmResponse.content = null;
606
+ llmResponse.content = void 0;
572
607
  }
573
608
  function extractAndReplaceInlineFiles(codeExecutorContext, llmRequest) {
574
- var _a;
609
+ var _a2;
575
610
  const allInputFiles = codeExecutorContext.getInputFiles();
576
611
  const savedFileNames = new Set(allInputFiles.map((f) => f.name));
577
612
  for (let i = 0; i < llmRequest.contents.length; i++) {
@@ -581,7 +616,7 @@ function extractAndReplaceInlineFiles(codeExecutorContext, llmRequest) {
581
616
  }
582
617
  for (let j = 0; j < content.parts.length; j++) {
583
618
  const part = content.parts[j];
584
- const mimeType = (_a = part.inlineData) == null ? void 0 : _a.mimeType;
619
+ const mimeType = (_a2 = part.inlineData) == null ? void 0 : _a2.mimeType;
585
620
  if (!mimeType || !part.inlineData || !DATA_FILE_UTIL_MAP[mimeType]) {
586
621
  continue;
587
622
  }
@@ -603,9 +638,9 @@ Available file: \`${fileName}\`
603
638
  return allInputFiles;
604
639
  }
605
640
  function getOrSetExecutionId(invocationContext, codeExecutorContext) {
606
- var _a;
641
+ var _a2;
607
642
  const agent = invocationContext.agent;
608
- if (!(agent instanceof LlmAgent) || !((_a = agent.codeExecutor) == null ? void 0 : _a.stateful)) {
643
+ if (!isLlmAgent(agent) || !((_a2 = agent.codeExecutor) == null ? void 0 : _a2.stateful)) {
609
644
  return void 0;
610
645
  }
611
646
  let executionId = codeExecutorContext.getExecutionId();
@@ -623,7 +658,9 @@ async function postProcessCodeExecutionResult(invocationContext, codeExecutorCon
623
658
  role: "model",
624
659
  parts: [(0, import_code_execution_utils.buildCodeExecutionResultPart)(codeExecutionResult)]
625
660
  };
626
- const eventActions = (0, import_event_actions.createEventActions)({ stateDelta: codeExecutorContext.getStateDelta() });
661
+ const eventActions = (0, import_event_actions.createEventActions)({
662
+ stateDelta: codeExecutorContext.getStateDelta()
663
+ });
627
664
  if (codeExecutionResult.stderr) {
628
665
  codeExecutorContext.incrementErrorCount(invocationContext.invocationId);
629
666
  } else {
@@ -662,10 +699,7 @@ function getDataFilePreprocessingCode(file) {
662
699
  return void 0;
663
700
  }
664
701
  const varName = getNormalizedFileName(file.name);
665
- const loaderCode = DATA_FILE_UTIL_MAP[file.mimeType].loaderCodeTemplate.replace(
666
- "{filename}",
667
- file.name
668
- );
702
+ const loaderCode = DATA_FILE_UTIL_MAP[file.mimeType].loaderCodeTemplate.replace("{filename}", file.name);
669
703
  return `
670
704
  ${DATA_FILE_HELPER_LIB}
671
705
 
@@ -677,13 +711,19 @@ explore_df(${varName})
677
711
  `;
678
712
  }
679
713
  const CODE_EXECUTION_REQUEST_PROCESSOR = new CodeExecutionRequestProcessor();
680
- class LlmAgent extends import_base_agent.BaseAgent {
714
+ const LLM_AGENT_SIGNATURE_SYMBOL = Symbol.for("google.adk.llmAgent");
715
+ function isLlmAgent(obj) {
716
+ return typeof obj === "object" && obj !== null && LLM_AGENT_SIGNATURE_SYMBOL in obj && obj[LLM_AGENT_SIGNATURE_SYMBOL] === true;
717
+ }
718
+ class LlmAgent extends (_b = import_base_agent.BaseAgent, _a = LLM_AGENT_SIGNATURE_SYMBOL, _b) {
681
719
  constructor(config) {
682
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
720
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
683
721
  super(config);
722
+ /** A unique symbol to identify ADK LLM agent class. */
723
+ this[_a] = true;
684
724
  this.model = config.model;
685
- this.instruction = (_a = config.instruction) != null ? _a : "";
686
- this.globalInstruction = (_b = config.globalInstruction) != null ? _b : "";
725
+ this.instruction = (_a2 = config.instruction) != null ? _a2 : "";
726
+ this.globalInstruction = (_b2 = config.globalInstruction) != null ? _b2 : "";
687
727
  this.tools = (_c = config.tools) != null ? _c : [];
688
728
  this.generateContentConfig = config.generateContentConfig;
689
729
  this.disallowTransferToParent = (_d = config.disallowTransferToParent) != null ? _d : false;
@@ -761,7 +801,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
761
801
  }
762
802
  let ancestorAgent = this.parentAgent;
763
803
  while (ancestorAgent) {
764
- if (ancestorAgent instanceof LlmAgent) {
804
+ if (isLlmAgent(ancestorAgent)) {
765
805
  return ancestorAgent.canonicalModel;
766
806
  }
767
807
  ancestorAgent = ancestorAgent.parentAgent;
@@ -769,47 +809,50 @@ class LlmAgent extends import_base_agent.BaseAgent {
769
809
  throw new Error(`No model found for ${this.name}.`);
770
810
  }
771
811
  /**
772
- * The resolved self.instruction field to construct instruction for this
812
+ * The resolved instruction field to construct instruction for this
773
813
  * agent.
774
814
  *
775
815
  * This method is only for use by Agent Development Kit.
776
816
  * @param context The context to retrieve the session state.
777
- * @returns The resolved self.instruction field.
817
+ * @returns The resolved instruction field.
778
818
  */
779
- async canonicalInstruction(context) {
819
+ async canonicalInstruction(context2) {
780
820
  if (typeof this.instruction === "string") {
781
821
  return { instruction: this.instruction, requireStateInjection: true };
782
822
  }
783
823
  return {
784
- instruction: await this.instruction(context),
824
+ instruction: await this.instruction(context2),
785
825
  requireStateInjection: false
786
826
  };
787
827
  }
788
828
  /**
789
- * The resolved self.instruction field to construct global instruction.
829
+ * The resolved globalInstruction field to construct global instruction.
790
830
  *
791
831
  * This method is only for use by Agent Development Kit.
792
832
  * @param context The context to retrieve the session state.
793
- * @returns The resolved self.global_instruction field.
833
+ * @returns The resolved globalInstruction field.
794
834
  */
795
- async canonicalGlobalInstruction(context) {
835
+ async canonicalGlobalInstruction(context2) {
796
836
  if (typeof this.globalInstruction === "string") {
797
- return { instruction: this.globalInstruction, requireStateInjection: true };
837
+ return {
838
+ instruction: this.globalInstruction,
839
+ requireStateInjection: true
840
+ };
798
841
  }
799
842
  return {
800
- instruction: await this.globalInstruction(context),
843
+ instruction: await this.globalInstruction(context2),
801
844
  requireStateInjection: false
802
845
  };
803
846
  }
804
847
  /**
805
- * The resolved self.tools field as a list of BaseTool based on the context.
848
+ * The resolved tools field as a list of BaseTool based on the context.
806
849
  *
807
850
  * This method is only for use by Agent Development Kit.
808
851
  */
809
- async canonicalTools(context) {
852
+ async canonicalTools(context2) {
810
853
  const resolvedTools = [];
811
854
  for (const toolUnion of this.tools) {
812
- const tools = await convertToolUnionToTools(toolUnion, context);
855
+ const tools = await convertToolUnionToTools(toolUnion, context2);
813
856
  resolvedTools.push(...tools);
814
857
  }
815
858
  return resolvedTools;
@@ -830,7 +873,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
830
873
  return [callback];
831
874
  }
832
875
  /**
833
- * The resolved self.before_model_callback field as a list of
876
+ * The resolved beforeModelCallback field as a list of
834
877
  * SingleBeforeModelCallback.
835
878
  *
836
879
  * This method is only for use by Agent Development Kit.
@@ -839,7 +882,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
839
882
  return LlmAgent.normalizeCallbackArray(this.beforeModelCallback);
840
883
  }
841
884
  /**
842
- * The resolved self.after_model_callback field as a list of
885
+ * The resolved afterModelCallback field as a list of
843
886
  * SingleAfterModelCallback.
844
887
  *
845
888
  * This method is only for use by Agent Development Kit.
@@ -848,7 +891,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
848
891
  return LlmAgent.normalizeCallbackArray(this.afterModelCallback);
849
892
  }
850
893
  /**
851
- * The resolved self.before_tool_callback field as a list of
894
+ * The resolved beforeToolCallback field as a list of
852
895
  * BeforeToolCallback.
853
896
  *
854
897
  * This method is only for use by Agent Development Kit.
@@ -857,7 +900,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
857
900
  return LlmAgent.normalizeCallbackArray(this.beforeToolCallback);
858
901
  }
859
902
  /**
860
- * The resolved self.after_tool_callback field as a list of AfterToolCallback.
903
+ * The resolved afterToolCallback field as a list of AfterToolCallback.
861
904
  *
862
905
  * This method is only for use by Agent Development Kit.
863
906
  */
@@ -874,7 +917,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
874
917
  * @param event The event to process.
875
918
  */
876
919
  maybeSaveOutputToState(event) {
877
- var _a, _b;
920
+ var _a2, _b2;
878
921
  if (event.author !== this.name) {
879
922
  import_logger.logger.debug(
880
923
  `Skipping output save for agent ${this.name}: event authored by ${event.author}`
@@ -893,7 +936,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
893
936
  );
894
937
  return;
895
938
  }
896
- if (!((_b = (_a = event.content) == null ? void 0 : _a.parts) == null ? void 0 : _b.length)) {
939
+ if (!((_b2 = (_a2 = event.content) == null ? void 0 : _a2.parts) == null ? void 0 : _b2.length)) {
897
940
  import_logger.logger.debug(
898
941
  `Skipping output save for agent ${this.name}: event content is empty`
899
942
  );
@@ -913,10 +956,10 @@ class LlmAgent extends import_base_agent.BaseAgent {
913
956
  }
914
957
  event.actions.stateDelta[this.outputKey] = result;
915
958
  }
916
- async *runAsyncImpl(context) {
959
+ async *runAsyncImpl(context2) {
917
960
  while (true) {
918
961
  let lastEvent = void 0;
919
- for await (const event of this.runOneStepAsync(context)) {
962
+ for await (const event of this.runOneStepAsync(context2)) {
920
963
  lastEvent = event;
921
964
  this.maybeSaveOutputToState(event);
922
965
  yield event;
@@ -930,19 +973,20 @@ class LlmAgent extends import_base_agent.BaseAgent {
930
973
  }
931
974
  }
932
975
  }
933
- async *runLiveImpl(context) {
934
- for await (const event of this.runLiveFlow(context)) {
976
+ async *runLiveImpl(context2) {
977
+ for await (const event of this.runLiveFlow(context2)) {
935
978
  this.maybeSaveOutputToState(event);
936
979
  yield event;
937
980
  }
938
- if (context.endInvocation) {
981
+ if (context2.endInvocation) {
939
982
  return;
940
983
  }
941
984
  }
942
985
  // --------------------------------------------------------------------------
943
986
  // #START LlmFlow Logic
944
987
  // --------------------------------------------------------------------------
945
- async *runLiveFlow(invocationContext) {
988
+ // eslint-disable-next-line require-yield
989
+ async *runLiveFlow(_invocationContext) {
946
990
  await Promise.resolve();
947
991
  throw new Error("LlmAgent.runLiveFlow not implemented");
948
992
  }
@@ -953,7 +997,10 @@ class LlmAgent extends import_base_agent.BaseAgent {
953
997
  liveConnectConfig: {}
954
998
  };
955
999
  for (const processor of this.requestProcessors) {
956
- for await (const event of processor.runAsync(invocationContext, llmRequest)) {
1000
+ for await (const event of processor.runAsync(
1001
+ invocationContext,
1002
+ llmRequest
1003
+ )) {
957
1004
  yield event;
958
1005
  }
959
1006
  }
@@ -975,27 +1022,39 @@ class LlmAgent extends import_base_agent.BaseAgent {
975
1022
  author: this.name,
976
1023
  branch: invocationContext.branch
977
1024
  });
978
- for await (const llmResponse of this.callLlmAsync(
979
- invocationContext,
980
- llmRequest,
981
- modelResponseEvent
982
- )) {
983
- for await (const event of this.postprocess(
984
- invocationContext,
985
- llmRequest,
986
- llmResponse,
987
- modelResponseEvent
988
- )) {
989
- modelResponseEvent.id = (0, import_event.createNewEventId)();
990
- modelResponseEvent.timestamp = (/* @__PURE__ */ new Date()).getTime();
991
- yield event;
1025
+ const span = import_tracing.tracer.startSpan("call_llm");
1026
+ const ctx = import_api.trace.setSpan(import_api.context.active(), span);
1027
+ yield* (0, import_tracing.runAsyncGeneratorWithOtelContext)(
1028
+ ctx,
1029
+ this,
1030
+ async function* () {
1031
+ for await (const llmResponse of this.callLlmAsync(
1032
+ invocationContext,
1033
+ llmRequest,
1034
+ modelResponseEvent
1035
+ )) {
1036
+ for await (const event of this.postprocess(
1037
+ invocationContext,
1038
+ llmRequest,
1039
+ llmResponse,
1040
+ modelResponseEvent
1041
+ )) {
1042
+ modelResponseEvent.id = (0, import_event.createNewEventId)();
1043
+ modelResponseEvent.timestamp = (/* @__PURE__ */ new Date()).getTime();
1044
+ yield event;
1045
+ }
1046
+ }
992
1047
  }
993
- }
1048
+ );
1049
+ span.end();
994
1050
  }
995
1051
  async *postprocess(invocationContext, llmRequest, llmResponse, modelResponseEvent) {
996
- var _a;
1052
+ var _a2;
997
1053
  for (const processor of this.responseProcessors) {
998
- for await (const event of processor.runAsync(invocationContext, llmResponse)) {
1054
+ for await (const event of processor.runAsync(
1055
+ invocationContext,
1056
+ llmResponse
1057
+ )) {
999
1058
  yield event;
1000
1059
  }
1001
1060
  }
@@ -1016,7 +1075,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
1016
1075
  }
1017
1076
  }
1018
1077
  yield mergedEvent;
1019
- if (!((_a = (0, import_event.getFunctionCalls)(mergedEvent)) == null ? void 0 : _a.length)) {
1078
+ if (!((_a2 = (0, import_event.getFunctionCalls)(mergedEvent)) == null ? void 0 : _a2.length)) {
1020
1079
  return;
1021
1080
  }
1022
1081
  const functionResponseEvent = await (0, import_functions.handleFunctionCallsAsync)({
@@ -1029,7 +1088,10 @@ class LlmAgent extends import_base_agent.BaseAgent {
1029
1088
  if (!functionResponseEvent) {
1030
1089
  return;
1031
1090
  }
1032
- const authEvent = (0, import_functions.generateAuthEvent)(invocationContext, functionResponseEvent);
1091
+ const authEvent = (0, import_functions.generateAuthEvent)(
1092
+ invocationContext,
1093
+ functionResponseEvent
1094
+ );
1033
1095
  if (authEvent) {
1034
1096
  yield authEvent;
1035
1097
  }
@@ -1071,7 +1133,7 @@ class LlmAgent extends import_base_agent.BaseAgent {
1071
1133
  return agentToRun;
1072
1134
  }
1073
1135
  async *callLlmAsync(invocationContext, llmRequest, modelResponseEvent) {
1074
- var _a, _b, _c, _d, _e;
1136
+ var _a2, _b2, _c, _d, _e;
1075
1137
  const beforeModelResponse = await this.handleBeforeModelCallback(
1076
1138
  invocationContext,
1077
1139
  llmRequest,
@@ -1081,8 +1143,8 @@ class LlmAgent extends import_base_agent.BaseAgent {
1081
1143
  yield beforeModelResponse;
1082
1144
  return;
1083
1145
  }
1084
- (_a = llmRequest.config) != null ? _a : llmRequest.config = {};
1085
- (_c = (_b = llmRequest.config).labels) != null ? _c : _b.labels = {};
1146
+ (_a2 = llmRequest.config) != null ? _a2 : llmRequest.config = {};
1147
+ (_c = (_b2 = llmRequest.config).labels) != null ? _c : _b2.labels = {};
1086
1148
  if (!llmRequest.config.labels[ADK_AGENT_NAME_LABEL_KEY]) {
1087
1149
  llmRequest.config.labels[ADK_AGENT_NAME_LABEL_KEY] = this.name;
1088
1150
  }
@@ -1102,6 +1164,12 @@ class LlmAgent extends import_base_agent.BaseAgent {
1102
1164
  llmRequest,
1103
1165
  modelResponseEvent
1104
1166
  )) {
1167
+ (0, import_tracing.traceCallLlm)({
1168
+ invocationContext,
1169
+ eventId: modelResponseEvent.id,
1170
+ llmRequest,
1171
+ llmResponse
1172
+ });
1105
1173
  const alteredLlmResponse = await this.handleAfterModelCallback(
1106
1174
  invocationContext,
1107
1175
  llmResponse,
@@ -1112,17 +1180,22 @@ class LlmAgent extends import_base_agent.BaseAgent {
1112
1180
  }
1113
1181
  }
1114
1182
  async handleBeforeModelCallback(invocationContext, llmRequest, modelResponseEvent) {
1115
- const callbackContext = new import_callback_context.CallbackContext(
1116
- { invocationContext, eventActions: modelResponseEvent.actions }
1117
- );
1118
- const beforeModelCallbackResponse = await invocationContext.pluginManager.runBeforeModelCallback(
1119
- { callbackContext, llmRequest }
1120
- );
1183
+ const callbackContext = new import_callback_context.CallbackContext({
1184
+ invocationContext,
1185
+ eventActions: modelResponseEvent.actions
1186
+ });
1187
+ const beforeModelCallbackResponse = await invocationContext.pluginManager.runBeforeModelCallback({
1188
+ callbackContext,
1189
+ llmRequest
1190
+ });
1121
1191
  if (beforeModelCallbackResponse) {
1122
1192
  return beforeModelCallbackResponse;
1123
1193
  }
1124
1194
  for (const callback of this.canonicalBeforeModelCallbacks) {
1125
- const callbackResponse = await callback({ context: callbackContext, request: llmRequest });
1195
+ const callbackResponse = await callback({
1196
+ context: callbackContext,
1197
+ request: llmRequest
1198
+ });
1126
1199
  if (callbackResponse) {
1127
1200
  return callbackResponse;
1128
1201
  }
@@ -1130,17 +1203,22 @@ class LlmAgent extends import_base_agent.BaseAgent {
1130
1203
  return void 0;
1131
1204
  }
1132
1205
  async handleAfterModelCallback(invocationContext, llmResponse, modelResponseEvent) {
1133
- const callbackContext = new import_callback_context.CallbackContext(
1134
- { invocationContext, eventActions: modelResponseEvent.actions }
1135
- );
1136
- const afterModelCallbackResponse = await invocationContext.pluginManager.runAfterModelCallback(
1137
- { callbackContext, llmResponse }
1138
- );
1206
+ const callbackContext = new import_callback_context.CallbackContext({
1207
+ invocationContext,
1208
+ eventActions: modelResponseEvent.actions
1209
+ });
1210
+ const afterModelCallbackResponse = await invocationContext.pluginManager.runAfterModelCallback({
1211
+ callbackContext,
1212
+ llmResponse
1213
+ });
1139
1214
  if (afterModelCallbackResponse) {
1140
1215
  return afterModelCallbackResponse;
1141
1216
  }
1142
1217
  for (const callback of this.canonicalAfterModelCallbacks) {
1143
- const callbackResponse = await callback({ context: callbackContext, response: llmResponse });
1218
+ const callbackResponse = await callback({
1219
+ context: callbackContext,
1220
+ response: llmResponse
1221
+ });
1144
1222
  if (callbackResponse) {
1145
1223
  return callbackResponse;
1146
1224
  }
@@ -1153,9 +1231,10 @@ class LlmAgent extends import_base_agent.BaseAgent {
1153
1231
  yield response;
1154
1232
  }
1155
1233
  } catch (modelError) {
1156
- const callbackContext = new import_callback_context.CallbackContext(
1157
- { invocationContext, eventActions: modelResponseEvent.actions }
1158
- );
1234
+ const callbackContext = new import_callback_context.CallbackContext({
1235
+ invocationContext,
1236
+ eventActions: modelResponseEvent.actions
1237
+ });
1159
1238
  if (modelError instanceof Error) {
1160
1239
  const onModelErrorCallbackResponse = await invocationContext.pluginManager.runOnModelErrorCallback({
1161
1240
  callbackContext,
@@ -1188,5 +1267,6 @@ class LlmAgent extends import_base_agent.BaseAgent {
1188
1267
  0 && (module.exports = {
1189
1268
  LlmAgent,
1190
1269
  REQUEST_CONFIRMATION_LLM_REQUEST_PROCESSOR,
1270
+ isLlmAgent,
1191
1271
  responseProcessor
1192
1272
  });