@iqai/adk 0.5.9 → 0.6.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.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Content, Part, GroundingMetadata, GenerateContentResponseUsageMetadata, Blob, SpeechConfig, AudioTranscriptionConfig, RealtimeInputConfig, ProactivityConfig, FunctionDeclaration, GenerateContentConfig, Schema, LiveConnectConfig, GoogleGenAI, FunctionCall } from '@google/genai';
2
2
  export { Blob, Content, FunctionDeclaration, Schema as JSONSchema } from '@google/genai';
3
+ import { SpanContext, Tracer, Span } from '@opentelemetry/api';
3
4
  import * as z from 'zod';
4
5
  import { z as z$1, ZodSchema, ZodType } from 'zod';
5
6
  import { LanguageModel } from 'ai';
@@ -7,7 +8,6 @@ import { StorageOptions } from '@google-cloud/storage';
7
8
  import { Kysely, Generated } from 'kysely';
8
9
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
9
10
  import { CreateMessageRequest, CreateMessageResult, Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
10
- import { Tracer } from '@opentelemetry/api';
11
11
 
12
12
  interface LoggerOpts {
13
13
  name: string;
@@ -1122,6 +1122,22 @@ declare class TranscriptionEntry {
1122
1122
  });
1123
1123
  }
1124
1124
 
1125
+ /**
1126
+ * Transfer context for multi-agent workflows
1127
+ * Tracks the chain of agent transfers for telemetry
1128
+ */
1129
+ interface TransferContext {
1130
+ /** Array of agent names in transfer order */
1131
+ transferChain: string[];
1132
+ /** Current depth in transfer chain (0 = root) */
1133
+ transferDepth: number;
1134
+ /** Name of the root agent that started the chain */
1135
+ rootAgentName: string;
1136
+ /** Span context of the root agent for linking */
1137
+ rootSpanContext?: SpanContext;
1138
+ /** Span context of the previous agent in the chain */
1139
+ previousSpanContext?: SpanContext;
1140
+ }
1125
1141
  /**
1126
1142
  * Error thrown when the number of LLM calls exceed the limit.
1127
1143
  */
@@ -1228,6 +1244,11 @@ declare class InvocationContext {
1228
1244
  * Configurations for live agents under this invocation.
1229
1245
  */
1230
1246
  runConfig?: RunConfig;
1247
+ /**
1248
+ * Transfer context for multi-agent workflows
1249
+ * Tracks agent transfer chain for telemetry
1250
+ */
1251
+ transferContext?: TransferContext;
1231
1252
  /**
1232
1253
  * A container to keep track of different kinds of costs incurred as a part
1233
1254
  * of this invocation.
@@ -1251,6 +1272,7 @@ declare class InvocationContext {
1251
1272
  activeStreamingTools?: Record<string, ActiveStreamingTool>;
1252
1273
  transcriptionCache?: TranscriptionEntry[];
1253
1274
  runConfig?: RunConfig;
1275
+ transferContext?: TransferContext;
1254
1276
  });
1255
1277
  /**
1256
1278
  * App name from the session
@@ -4740,11 +4762,12 @@ type index$4_SingleBeforeToolCallback = SingleBeforeToolCallback;
4740
4762
  type index$4_StreamingMode = StreamingMode;
4741
4763
  declare const index$4_StreamingMode: typeof StreamingMode;
4742
4764
  type index$4_ToolUnion = ToolUnion;
4765
+ type index$4_TransferContext = TransferContext;
4743
4766
  declare const index$4_createBranchContextForSubAgent: typeof createBranchContextForSubAgent;
4744
4767
  declare const index$4_mergeAgentRun: typeof mergeAgentRun;
4745
4768
  declare const index$4_newInvocationContextId: typeof newInvocationContextId;
4746
4769
  declare namespace index$4 {
4747
- export { type index$4_AfterAgentCallback as AfterAgentCallback, type index$4_AfterModelCallback as AfterModelCallback, type index$4_AfterToolCallback as AfterToolCallback, LlmAgent as Agent, index$4_AgentBuilder as AgentBuilder, type index$4_AgentBuilderConfig as AgentBuilderConfig, type index$4_AgentBuilderWithSchema as AgentBuilderWithSchema, type index$4_AgentType as AgentType, index$4_BaseAgent as BaseAgent, type index$4_BeforeAgentCallback as BeforeAgentCallback, type index$4_BeforeModelCallback as BeforeModelCallback, type index$4_BeforeToolCallback as BeforeToolCallback, type index$4_BuiltAgent as BuiltAgent, index$4_CallbackContext as CallbackContext, type index$4_EnhancedRunner as EnhancedRunner, type index$4_FullMessage as FullMessage, type index$4_InstructionProvider as InstructionProvider, index$4_InvocationContext as InvocationContext, index$4_LangGraphAgent as LangGraphAgent, type index$4_LangGraphAgentConfig as LangGraphAgentConfig, type index$4_LangGraphNode as LangGraphNode, index$4_LlmAgent as LlmAgent, type index$4_LlmAgentConfig as LlmAgentConfig, index$4_LlmCallsLimitExceededError as LlmCallsLimitExceededError, index$4_LoopAgent as LoopAgent, type index$4_LoopAgentConfig as LoopAgentConfig, type index$4_MessagePart as MessagePart, type index$4_MultiAgentResponse as MultiAgentResponse, index$4_ParallelAgent as ParallelAgent, type index$4_ParallelAgentConfig as ParallelAgentConfig, index$4_ReadonlyContext as ReadonlyContext, index$4_RunConfig as RunConfig, type index$4_RunnerAskReturn as RunnerAskReturn, index$4_SequentialAgent as SequentialAgent, type index$4_SequentialAgentConfig as SequentialAgentConfig, type index$4_SessionOptions as SessionOptions, type index$4_SingleAfterModelCallback as SingleAfterModelCallback, type index$4_SingleAfterToolCallback as SingleAfterToolCallback, type index$4_SingleAgentCallback as SingleAgentCallback, type index$4_SingleBeforeModelCallback as SingleBeforeModelCallback, type index$4_SingleBeforeToolCallback as SingleBeforeToolCallback, index$4_StreamingMode as StreamingMode, type index$4_ToolUnion as ToolUnion, index$4_createBranchContextForSubAgent as createBranchContextForSubAgent, index$4_mergeAgentRun as mergeAgentRun, index$4_newInvocationContextId as newInvocationContextId };
4770
+ export { type index$4_AfterAgentCallback as AfterAgentCallback, type index$4_AfterModelCallback as AfterModelCallback, type index$4_AfterToolCallback as AfterToolCallback, LlmAgent as Agent, index$4_AgentBuilder as AgentBuilder, type index$4_AgentBuilderConfig as AgentBuilderConfig, type index$4_AgentBuilderWithSchema as AgentBuilderWithSchema, type index$4_AgentType as AgentType, index$4_BaseAgent as BaseAgent, type index$4_BeforeAgentCallback as BeforeAgentCallback, type index$4_BeforeModelCallback as BeforeModelCallback, type index$4_BeforeToolCallback as BeforeToolCallback, type index$4_BuiltAgent as BuiltAgent, index$4_CallbackContext as CallbackContext, type index$4_EnhancedRunner as EnhancedRunner, type index$4_FullMessage as FullMessage, type index$4_InstructionProvider as InstructionProvider, index$4_InvocationContext as InvocationContext, index$4_LangGraphAgent as LangGraphAgent, type index$4_LangGraphAgentConfig as LangGraphAgentConfig, type index$4_LangGraphNode as LangGraphNode, index$4_LlmAgent as LlmAgent, type index$4_LlmAgentConfig as LlmAgentConfig, index$4_LlmCallsLimitExceededError as LlmCallsLimitExceededError, index$4_LoopAgent as LoopAgent, type index$4_LoopAgentConfig as LoopAgentConfig, type index$4_MessagePart as MessagePart, type index$4_MultiAgentResponse as MultiAgentResponse, index$4_ParallelAgent as ParallelAgent, type index$4_ParallelAgentConfig as ParallelAgentConfig, index$4_ReadonlyContext as ReadonlyContext, index$4_RunConfig as RunConfig, type index$4_RunnerAskReturn as RunnerAskReturn, index$4_SequentialAgent as SequentialAgent, type index$4_SequentialAgentConfig as SequentialAgentConfig, type index$4_SessionOptions as SessionOptions, type index$4_SingleAfterModelCallback as SingleAfterModelCallback, type index$4_SingleAfterToolCallback as SingleAfterToolCallback, type index$4_SingleAgentCallback as SingleAgentCallback, type index$4_SingleBeforeModelCallback as SingleBeforeModelCallback, type index$4_SingleBeforeToolCallback as SingleBeforeToolCallback, index$4_StreamingMode as StreamingMode, type index$4_ToolUnion as ToolUnion, type index$4_TransferContext as TransferContext, index$4_createBranchContextForSubAgent as createBranchContextForSubAgent, index$4_mergeAgentRun as mergeAgentRun, index$4_newInvocationContextId as newInvocationContextId };
4748
4771
  }
4749
4772
 
4750
4773
  interface ParsedArtifactUri {
@@ -5575,7 +5598,7 @@ declare class LangfusePlugin extends BasePlugin {
5575
5598
  /**
5576
5599
  * Converts any data to plain text, handling various formats
5577
5600
  */
5578
- private toPlainText;
5601
+ toPlainText(data: any): string;
5579
5602
  /**
5580
5603
  * Serializes Content to structured format for Langfuse
5581
5604
  */
@@ -6100,76 +6123,590 @@ declare class InMemoryRunner<T extends BaseAgent = BaseAgent> extends Runner<T>
6100
6123
  });
6101
6124
  }
6102
6125
 
6126
+ /**
6127
+ * Configuration for the telemetry system
6128
+ */
6103
6129
  interface TelemetryConfig {
6130
+ /** Application name (used as service name) */
6104
6131
  appName: string;
6132
+ /** Application version (optional) */
6105
6133
  appVersion?: string;
6134
+ /** OTLP endpoint for traces (e.g., http://localhost:4318/v1/traces) */
6106
6135
  otlpEndpoint: string;
6136
+ /** Custom headers for OTLP exporter */
6107
6137
  otlpHeaders?: Record<string, string>;
6138
+ /** Deployment environment (e.g., development, staging, production) */
6139
+ environment?: string;
6140
+ /** Enable tracing (default: true) */
6141
+ enableTracing?: boolean;
6142
+ /** Enable metrics (default: true) */
6143
+ enableMetrics?: boolean;
6144
+ /** Enable auto-instrumentation for HTTP, databases, etc. (default: true) */
6145
+ enableAutoInstrumentation?: boolean;
6146
+ /** Capture message content in traces (default: true, set false for privacy) */
6147
+ captureMessageContent?: boolean;
6148
+ /** Sampling ratio for traces (0.0 to 1.0, default: 1.0 = 100%) */
6149
+ samplingRatio?: number;
6150
+ /** Metric export interval in milliseconds (default: 60000 = 1 minute) */
6151
+ metricExportIntervalMs?: number;
6152
+ /** Additional resource attributes */
6153
+ resourceAttributes?: Record<string, string | number | boolean>;
6154
+ }
6155
+ /**
6156
+ * Span attribute data for agent invocations
6157
+ */
6158
+ interface AgentSpanAttributes {
6159
+ agentName: string;
6160
+ agentDescription?: string;
6161
+ sessionId: string;
6162
+ userId?: string;
6163
+ invocationId: string;
6108
6164
  environment?: string;
6165
+ input?: string | Record<string, any>;
6166
+ output?: string | Record<string, any>;
6109
6167
  }
6110
6168
  /**
6111
- * Telemetry service for the ADK
6112
- * Handles OpenTelemetry initialization, tracing, and cleanup
6169
+ * Span attribute data for tool executions
6170
+ */
6171
+ interface ToolSpanAttributes {
6172
+ toolName: string;
6173
+ toolDescription?: string;
6174
+ toolType: string;
6175
+ toolCallId: string;
6176
+ args: Record<string, any>;
6177
+ response: any;
6178
+ sessionId: string;
6179
+ userId?: string;
6180
+ eventId: string;
6181
+ }
6182
+ /**
6183
+ * Span attribute data for LLM calls
6184
+ */
6185
+ interface LlmSpanAttributes {
6186
+ model: string;
6187
+ maxTokens?: number;
6188
+ temperature?: number;
6189
+ topP?: number;
6190
+ inputTokens?: number;
6191
+ outputTokens?: number;
6192
+ totalTokens?: number;
6193
+ finishReason?: string;
6194
+ sessionId: string;
6195
+ userId?: string;
6196
+ invocationId: string;
6197
+ eventId: string;
6198
+ }
6199
+ /**
6200
+ * Metric dimensions for agent metrics
6201
+ */
6202
+ interface AgentMetricDimensions {
6203
+ agentName: string;
6204
+ environment?: string;
6205
+ status: "success" | "error";
6206
+ }
6207
+ /**
6208
+ * Metric dimensions for tool metrics
6209
+ */
6210
+ interface ToolMetricDimensions {
6211
+ toolName: string;
6212
+ agentName?: string;
6213
+ environment?: string;
6214
+ status: "success" | "error";
6215
+ }
6216
+ /**
6217
+ * Metric dimensions for LLM metrics
6218
+ */
6219
+ interface LlmMetricDimensions {
6220
+ model: string;
6221
+ agentName?: string;
6222
+ environment?: string;
6223
+ status: "success" | "error";
6224
+ }
6225
+ /**
6226
+ * Parameters for tracing an agent invocation
6227
+ */
6228
+ interface TraceAgentParams {
6229
+ agent: {
6230
+ name: string;
6231
+ description?: string;
6232
+ };
6233
+ invocationContext: InvocationContext;
6234
+ }
6235
+ /**
6236
+ * Parameters for tracing a tool call
6237
+ */
6238
+ interface TraceToolParams {
6239
+ tool: BaseTool;
6240
+ args: Record<string, any>;
6241
+ functionResponseEvent: Event;
6242
+ llmRequest?: LlmRequest;
6243
+ invocationContext?: InvocationContext;
6244
+ }
6245
+ /**
6246
+ * Parameters for tracing an LLM call
6247
+ */
6248
+ interface TraceLlmParams {
6249
+ invocationContext: InvocationContext;
6250
+ eventId: string;
6251
+ llmRequest: LlmRequest;
6252
+ llmResponse: LlmResponse;
6253
+ }
6254
+ /**
6255
+ * Telemetry statistics
6256
+ */
6257
+ interface TelemetryStats {
6258
+ agentInvocations: number;
6259
+ toolExecutions: number;
6260
+ llmCalls: number;
6261
+ totalTokens: number;
6262
+ errors: number;
6263
+ }
6264
+ /**
6265
+ * Parameters for tracing a callback execution
6266
+ */
6267
+ interface TraceCallbackParams {
6268
+ callbackType: "before_agent" | "after_agent" | "before_tool" | "after_tool" | "before_model" | "after_model";
6269
+ callbackName?: string;
6270
+ callbackIndex: number;
6271
+ invocationContext?: InvocationContext;
6272
+ }
6273
+ /**
6274
+ * Enhanced tool span attributes with execution tracking
6275
+ */
6276
+ interface EnhancedToolSpanAttributes extends ToolSpanAttributes {
6277
+ executionOrder?: number;
6278
+ parallelGroup?: string;
6279
+ retryCount?: number;
6280
+ isCallbackOverride?: boolean;
6281
+ }
6282
+ /**
6283
+ * Enhanced LLM span attributes with streaming metrics
6284
+ */
6285
+ interface EnhancedLlmSpanAttributes extends LlmSpanAttributes {
6286
+ streaming?: boolean;
6287
+ timeToFirstTokenMs?: number;
6288
+ chunkCount?: number;
6289
+ cachedTokens?: number;
6290
+ contextWindowUsedPct?: number;
6291
+ }
6292
+ /**
6293
+ * Parameters for tracing an agent transfer
6294
+ */
6295
+ interface TraceAgentTransferParams {
6296
+ sourceAgent: string;
6297
+ targetAgent: string;
6298
+ reason?: string;
6299
+ transferContext: TransferContext;
6300
+ invocationContext?: InvocationContext;
6301
+ }
6302
+ /**
6303
+ * Error span attributes
6304
+ */
6305
+ interface ErrorSpanAttributes {
6306
+ errorCategory: "tool_error" | "model_error" | "transfer_error" | "callback_error" | "memory_error" | "session_error" | "plugin_error" | "unknown_error";
6307
+ errorRecoverable: boolean;
6308
+ errorRetryRecommended: boolean;
6309
+ errorMessage: string;
6310
+ errorStack?: string;
6311
+ }
6312
+ /**
6313
+ * Parameters for tracing memory operations
6314
+ */
6315
+ interface TraceMemoryParams {
6316
+ operation: "search" | "insert" | "delete";
6317
+ query?: string;
6318
+ resultsCount?: number;
6319
+ sessionId: string;
6320
+ invocationContext?: InvocationContext;
6321
+ }
6322
+ /**
6323
+ * Parameters for tracing session operations
6324
+ */
6325
+ interface TraceSessionParams {
6326
+ operation: "create" | "get" | "update" | "delete";
6327
+ sessionId: string;
6328
+ userId?: string;
6329
+ found?: boolean;
6330
+ }
6331
+ /**
6332
+ * Parameters for tracing plugin hooks
6333
+ */
6334
+ interface TracePluginParams {
6335
+ pluginName: string;
6336
+ hook: "before_agent" | "after_agent" | "before_model" | "after_model" | "on_event";
6337
+ agentName?: string;
6338
+ invocationContext?: InvocationContext;
6339
+ }
6340
+
6341
+ /**
6342
+ * Semantic Conventions and Constants
6343
+ * OpenTelemetry semantic conventions for ADK telemetry
6344
+ */
6345
+ /**
6346
+ * Standard OpenTelemetry GenAI semantic conventions
6347
+ * Reference: https://opentelemetry.io/docs/specs/semconv/gen-ai/
6348
+ * Version: v1.38.0 (development status)
6349
+ */
6350
+ declare const SEMCONV: {
6351
+ readonly GEN_AI_PROVIDER_NAME: "gen_ai.provider.name";
6352
+ readonly GEN_AI_OPERATION_NAME: "gen_ai.operation.name";
6353
+ readonly GEN_AI_AGENT_ID: "gen_ai.agent.id";
6354
+ readonly GEN_AI_AGENT_NAME: "gen_ai.agent.name";
6355
+ readonly GEN_AI_AGENT_DESCRIPTION: "gen_ai.agent.description";
6356
+ readonly GEN_AI_CONVERSATION_ID: "gen_ai.conversation.id";
6357
+ readonly GEN_AI_TOOL_NAME: "gen_ai.tool.name";
6358
+ readonly GEN_AI_TOOL_DESCRIPTION: "gen_ai.tool.description";
6359
+ readonly GEN_AI_TOOL_TYPE: "gen_ai.tool.type";
6360
+ readonly GEN_AI_TOOL_CALL_ID: "gen_ai.tool.call.id";
6361
+ readonly GEN_AI_TOOL_CALL_ARGUMENTS: "gen_ai.tool.call.arguments";
6362
+ readonly GEN_AI_TOOL_CALL_RESULT: "gen_ai.tool.call.result";
6363
+ readonly GEN_AI_TOOL_DEFINITIONS: "gen_ai.tool.definitions";
6364
+ readonly GEN_AI_REQUEST_MODEL: "gen_ai.request.model";
6365
+ readonly GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens";
6366
+ readonly GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature";
6367
+ readonly GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p";
6368
+ readonly GEN_AI_REQUEST_TOP_K: "gen_ai.request.top_k";
6369
+ readonly GEN_AI_REQUEST_FREQUENCY_PENALTY: "gen_ai.request.frequency_penalty";
6370
+ readonly GEN_AI_REQUEST_PRESENCE_PENALTY: "gen_ai.request.presence_penalty";
6371
+ readonly GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences";
6372
+ readonly GEN_AI_REQUEST_CHOICE_COUNT: "gen_ai.request.choice.count";
6373
+ readonly GEN_AI_REQUEST_SEED: "gen_ai.request.seed";
6374
+ readonly GEN_AI_RESPONSE_ID: "gen_ai.response.id";
6375
+ readonly GEN_AI_RESPONSE_MODEL: "gen_ai.response.model";
6376
+ readonly GEN_AI_RESPONSE_FINISH_REASONS: "gen_ai.response.finish_reasons";
6377
+ readonly GEN_AI_OUTPUT_TYPE: "gen_ai.output.type";
6378
+ readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
6379
+ readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
6380
+ readonly GEN_AI_SYSTEM_INSTRUCTIONS: "gen_ai.system_instructions";
6381
+ readonly GEN_AI_INPUT_MESSAGES: "gen_ai.input.messages";
6382
+ readonly GEN_AI_OUTPUT_MESSAGES: "gen_ai.output.messages";
6383
+ readonly SERVER_ADDRESS: "server.address";
6384
+ readonly SERVER_PORT: "server.port";
6385
+ readonly ERROR_TYPE: "error.type";
6386
+ readonly GEN_AI_DATA_SOURCE_ID: "gen_ai.data_source.id";
6387
+ readonly GEN_AI_EMBEDDINGS_DIMENSION_COUNT: "gen_ai.embeddings.dimension.count";
6388
+ readonly GEN_AI_REQUEST_ENCODING_FORMATS: "gen_ai.request.encoding_formats";
6389
+ /**
6390
+ * @deprecated Use GEN_AI_PROVIDER_NAME instead
6391
+ */
6392
+ readonly GEN_AI_SYSTEM: "gen_ai.system";
6393
+ /**
6394
+ * @deprecated Total tokens should be computed client-side from input + output
6395
+ */
6396
+ readonly GEN_AI_USAGE_TOTAL_TOKENS: "gen_ai.usage.total_tokens";
6397
+ /**
6398
+ * @deprecated Use GEN_AI_INPUT_MESSAGES or structured events instead
6399
+ */
6400
+ readonly GEN_AI_CONTENT_PROMPT: "gen_ai.content.prompt";
6401
+ /**
6402
+ * @deprecated Use GEN_AI_OUTPUT_MESSAGES or structured events instead
6403
+ */
6404
+ readonly GEN_AI_CONTENT_COMPLETION: "gen_ai.content.completion";
6405
+ };
6406
+ /**
6407
+ * ADK-specific attribute namespace
6408
+ * Custom attributes for IQAI ADK framework
6409
+ */
6410
+ declare const ADK_ATTRS: {
6411
+ readonly SYSTEM_NAME: "adk.system.name";
6412
+ readonly SYSTEM_VERSION: "adk.system.version";
6413
+ readonly SESSION_ID: "adk.session.id";
6414
+ readonly USER_ID: "adk.user.id";
6415
+ readonly INVOCATION_ID: "adk.invocation.id";
6416
+ readonly EVENT_ID: "adk.event.id";
6417
+ readonly ENVIRONMENT: "adk.environment";
6418
+ readonly AGENT_NAME: "adk.agent.name";
6419
+ readonly AGENT_DESCRIPTION: "adk.agent.description";
6420
+ readonly TRANSFER_SOURCE_AGENT: "adk.transfer.source_agent";
6421
+ readonly TRANSFER_TARGET_AGENT: "adk.transfer.target_agent";
6422
+ readonly TRANSFER_CHAIN: "adk.transfer.chain";
6423
+ readonly TRANSFER_DEPTH: "adk.transfer.depth";
6424
+ readonly TRANSFER_ROOT_AGENT: "adk.transfer.root_agent";
6425
+ readonly TRANSFER_REASON: "adk.transfer.reason";
6426
+ readonly TOOL_NAME: "adk.tool.name";
6427
+ readonly TOOL_ARGS: "adk.tool.args";
6428
+ readonly TOOL_RESPONSE: "adk.tool.response";
6429
+ readonly TOOL_EXECUTION_ORDER: "adk.tool.execution_order";
6430
+ readonly TOOL_PARALLEL_GROUP: "adk.tool.parallel_group";
6431
+ readonly TOOL_RETRY_COUNT: "adk.tool.retry_count";
6432
+ readonly TOOL_IS_CALLBACK_OVERRIDE: "adk.tool.is_callback_override";
6433
+ readonly LLM_MODEL: "adk.llm.model";
6434
+ readonly LLM_REQUEST: "adk.llm.request";
6435
+ readonly LLM_RESPONSE: "adk.llm.response";
6436
+ readonly LLM_STREAMING: "adk.llm.streaming";
6437
+ readonly LLM_TIME_TO_FIRST_TOKEN: "adk.llm.time_to_first_token_ms";
6438
+ readonly LLM_CHUNK_COUNT: "adk.llm.chunk_count";
6439
+ readonly LLM_CACHED_TOKENS: "adk.llm.cached_tokens";
6440
+ readonly LLM_CONTEXT_WINDOW_USED_PCT: "adk.llm.context_window_used_pct";
6441
+ readonly CALLBACK_TYPE: "adk.callback.type";
6442
+ readonly CALLBACK_NAME: "adk.callback.name";
6443
+ readonly CALLBACK_INDEX: "adk.callback.index";
6444
+ readonly ERROR_CATEGORY: "adk.error.category";
6445
+ readonly ERROR_RECOVERABLE: "adk.error.recoverable";
6446
+ readonly ERROR_RETRY_RECOMMENDED: "adk.error.retry_recommended";
6447
+ readonly MEMORY_QUERY: "adk.memory.query";
6448
+ readonly MEMORY_RESULTS_COUNT: "adk.memory.results_count";
6449
+ readonly PLUGIN_NAME: "adk.plugin.name";
6450
+ readonly PLUGIN_HOOK: "adk.plugin.hook";
6451
+ };
6452
+ /**
6453
+ * Operation names for different trace operations
6454
+ * Reference: https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/
6455
+ */
6456
+ declare const OPERATIONS: {
6457
+ readonly CHAT: "chat";
6458
+ readonly TEXT_COMPLETION: "text_completion";
6459
+ readonly GENERATE_CONTENT: "generate_content";
6460
+ readonly INVOKE_AGENT: "invoke_agent";
6461
+ readonly CREATE_AGENT: "create_agent";
6462
+ readonly EXECUTE_TOOL: "execute_tool";
6463
+ readonly TRANSFER_AGENT: "transfer_agent";
6464
+ readonly EXECUTE_CALLBACK: "execute_callback";
6465
+ readonly SEARCH_MEMORY: "search_memory";
6466
+ readonly INSERT_MEMORY: "insert_memory";
6467
+ readonly EXECUTE_PLUGIN: "execute_plugin";
6468
+ /**
6469
+ * @deprecated Use CHAT, TEXT_COMPLETION, or GENERATE_CONTENT instead
6470
+ */
6471
+ readonly CALL_LLM: "call_llm";
6472
+ };
6473
+ /**
6474
+ * System identifier for IQAI ADK
6475
+ */
6476
+ declare const ADK_SYSTEM_NAME = "iqai-adk";
6477
+ /**
6478
+ * Environment variable names
6479
+ */
6480
+ declare const ENV_VARS: {
6481
+ readonly CAPTURE_MESSAGE_CONTENT: "ADK_CAPTURE_MESSAGE_CONTENT";
6482
+ readonly OTEL_SERVICE_NAME: "OTEL_SERVICE_NAME";
6483
+ readonly OTEL_RESOURCE_ATTRIBUTES: "OTEL_RESOURCE_ATTRIBUTES";
6484
+ readonly OTEL_EXPORTER_OTLP_ENDPOINT: "OTEL_EXPORTER_OTLP_ENDPOINT";
6485
+ readonly OTEL_EXPORTER_OTLP_HEADERS: "OTEL_EXPORTER_OTLP_HEADERS";
6486
+ readonly NODE_ENV: "NODE_ENV";
6487
+ };
6488
+ /**
6489
+ * Metric names
6490
+ * Includes both standard OpenTelemetry GenAI metrics and ADK-specific metrics
6491
+ */
6492
+ declare const METRICS: {
6493
+ readonly GEN_AI_CLIENT_OPERATION_DURATION: "gen_ai.client.operation.duration";
6494
+ readonly GEN_AI_CLIENT_TOKEN_USAGE: "gen_ai.client.token.usage";
6495
+ readonly GEN_AI_SERVER_REQUEST_DURATION: "gen_ai.server.request.duration";
6496
+ readonly GEN_AI_SERVER_TIME_TO_FIRST_TOKEN: "gen_ai.server.time_to_first_token";
6497
+ readonly GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN: "gen_ai.server.time_per_output_token";
6498
+ readonly AGENT_INVOCATIONS: "adk.agent.invocations";
6499
+ readonly TOOL_EXECUTIONS: "adk.tool.executions";
6500
+ readonly LLM_CALLS: "adk.llm.calls";
6501
+ readonly ERRORS: "adk.errors";
6502
+ readonly AGENT_DURATION: "adk.agent.duration";
6503
+ readonly TOOL_DURATION: "adk.tool.duration";
6504
+ readonly LLM_DURATION: "adk.llm.duration";
6505
+ readonly LLM_TOKENS: "adk.llm.tokens";
6506
+ readonly LLM_INPUT_TOKENS: "adk.llm.tokens.input";
6507
+ readonly LLM_OUTPUT_TOKENS: "adk.llm.tokens.output";
6508
+ };
6509
+ /**
6510
+ * Default configuration values
6511
+ */
6512
+ declare const DEFAULTS: {
6513
+ readonly SAMPLING_RATIO: 1;
6514
+ readonly METRIC_EXPORT_INTERVAL_MS: 60000;
6515
+ readonly SHUTDOWN_TIMEOUT_MS: 5000;
6516
+ readonly CAPTURE_MESSAGE_CONTENT: true;
6517
+ readonly ENABLE_TRACING: true;
6518
+ readonly ENABLE_METRICS: true;
6519
+ readonly ENABLE_AUTO_INSTRUMENTATION: true;
6520
+ };
6521
+
6522
+ /**
6523
+ * Telemetry Utilities
6524
+ * Helper functions for telemetry operations
6525
+ */
6526
+
6527
+ /**
6528
+ * Check if message content should be captured in traces
6529
+ * Based on ADK_CAPTURE_MESSAGE_CONTENT environment variable
6530
+ */
6531
+ declare function shouldCaptureContent(): boolean;
6532
+ /**
6533
+ * Extract text content from a Content object or array of Parts
6534
+ * Handles the common pattern of extracting readable text from message parts
6535
+ */
6536
+ declare function extractTextFromContent(content: Content | {
6537
+ parts?: Part[];
6538
+ } | undefined): string;
6539
+ /**
6540
+ * Safely stringify an object to JSON
6541
+ * Returns a placeholder string if serialization fails
6542
+ */
6543
+ declare function safeJsonStringify(obj: any): string;
6544
+ /**
6545
+ * Get environment name from NODE_ENV or custom environment variable
6546
+ */
6547
+ declare function getEnvironment(): string | undefined;
6548
+ /**
6549
+ * Build a sanitized LLM request object for tracing
6550
+ * Excludes non-serializable fields and optionally excludes content
6551
+ */
6552
+ declare function buildLlmRequestForTrace(llmRequest: any, includeContent?: boolean): Record<string, any>;
6553
+ /**
6554
+ * Build a sanitized LLM response object for tracing
6555
+ */
6556
+ declare function buildLlmResponseForTrace(llmResponse: any, includeContent?: boolean): Record<string, any>;
6557
+ /**
6558
+ * Format attributes for OpenTelemetry span
6559
+ * Ensures all values are compatible with OTel attribute types
6560
+ */
6561
+ declare function formatSpanAttributes(attributes: Record<string, any>): Record<string, string | number | boolean | string[]>;
6562
+
6563
+ /**
6564
+ * Main telemetry service
6565
+ * Unified interface for all telemetry operations
6113
6566
  */
6114
6567
  declare class TelemetryService {
6115
- private sdk;
6116
- private isInitialized;
6117
- private tracer;
6118
- private config;
6119
- constructor();
6120
6568
  /**
6121
- * Initialize telemetry with the provided configuration
6569
+ * Initialize telemetry system
6122
6570
  */
6123
- initialize(config: TelemetryConfig): void;
6124
- /**
6125
- * Get the tracer instance
6126
- */
6127
- getTracer(): Tracer;
6571
+ initialize(config: TelemetryConfig): Promise<void>;
6128
6572
  /**
6129
6573
  * Check if telemetry is initialized
6130
6574
  */
6131
6575
  get initialized(): boolean;
6132
6576
  /**
6133
- * Get the current configuration
6577
+ * Get current configuration
6134
6578
  */
6135
6579
  getConfig(): TelemetryConfig | null;
6136
6580
  /**
6137
- * Shutdown telemetry with optional timeout
6581
+ * Get tracer instance
6138
6582
  */
6139
- shutdown(timeoutMs?: number): Promise<void>;
6583
+ getTracer(): Tracer;
6584
+ /**
6585
+ * Get currently active span
6586
+ */
6587
+ getActiveSpan(): Span | undefined;
6588
+ /**
6589
+ * Check if content capture is enabled
6590
+ */
6591
+ shouldCaptureContent(): boolean;
6592
+ /**
6593
+ * Trace an agent invocation
6594
+ */
6595
+ traceAgentInvocation(agent: {
6596
+ name: string;
6597
+ description?: string;
6598
+ }, invocationContext: InvocationContext, input?: string | Record<string, any>, output?: string | Record<string, any>): void;
6140
6599
  /**
6141
- * Traces a tool call by adding detailed attributes to the current span.
6600
+ * Trace a tool call
6142
6601
  */
6143
6602
  traceToolCall(tool: BaseTool, args: Record<string, any>, functionResponseEvent: Event, llmRequest?: LlmRequest, invocationContext?: InvocationContext): void;
6144
6603
  /**
6145
- * Traces a call to the LLM by adding detailed attributes to the current span.
6604
+ * Trace an LLM call
6146
6605
  */
6147
6606
  traceLlmCall(invocationContext: InvocationContext, eventId: string, llmRequest: LlmRequest, llmResponse: LlmResponse): void;
6148
6607
  /**
6149
- * Wraps an async generator with tracing
6608
+ * Wrap an async generator with tracing
6150
6609
  */
6151
- traceAsyncGenerator<T>(spanName: string, generator: AsyncGenerator<T, void, unknown>): AsyncGenerator<T, void, unknown>;
6152
- private _safeJsonStringify;
6610
+ traceAsyncGenerator<T>(spanName: string, generator: AsyncGenerator<T, void, unknown>, attributes?: Record<string, any>): AsyncGenerator<T, void, unknown>;
6153
6611
  /**
6154
- * Builds a dictionary representation of the LLM request for tracing.
6155
- *
6156
- * This function prepares a dictionary representation of the LlmRequest
6157
- * object, suitable for inclusion in a trace. It excludes fields that cannot
6158
- * be serialized (e.g., function pointers) and avoids sending bytes data.
6612
+ * Execute a function within a traced span
6613
+ */
6614
+ withSpan<T>(spanName: string, fn: (span: Span) => Promise<T>, attributes?: Record<string, any>): Promise<T>;
6615
+ /**
6616
+ * Set attributes on the active span
6617
+ */
6618
+ setActiveSpanAttributes(attributes: Record<string, any>): void;
6619
+ /**
6620
+ * Record an exception on the active span
6621
+ */
6622
+ recordException(error: Error, attributes?: Record<string, any>): void;
6623
+ /**
6624
+ * Add an event to the active span
6625
+ */
6626
+ addEvent(name: string, attributes?: Record<string, any>): void;
6627
+ /**
6628
+ * Trace a callback execution
6629
+ */
6630
+ traceCallback(callbackType: string, callbackName: string | undefined, callbackIndex: number, invocationContext?: InvocationContext): void;
6631
+ /**
6632
+ * Trace an agent transfer
6633
+ */
6634
+ traceAgentTransfer(sourceAgent: string, targetAgent: string, transferChain: string[], transferDepth: number, reason?: string, invocationContext?: InvocationContext): void;
6635
+ /**
6636
+ * Record enhanced tool execution attributes
6637
+ */
6638
+ traceEnhancedTool(executionOrder?: number, parallelGroup?: string, retryCount?: number, isCallbackOverride?: boolean): void;
6639
+ /**
6640
+ * Record enhanced LLM attributes
6641
+ */
6642
+ traceEnhancedLlm(streaming?: boolean, timeToFirstTokenMs?: number, chunkCount?: number, cachedTokens?: number, contextWindowUsedPct?: number): void;
6643
+ /**
6644
+ * Record standardized error information
6645
+ */
6646
+ traceError(error: Error, category: "tool_error" | "model_error" | "transfer_error" | "callback_error" | "memory_error" | "session_error" | "plugin_error" | "unknown_error", recoverable?: boolean, retryRecommended?: boolean): void;
6647
+ /**
6648
+ * Trace memory operations
6649
+ */
6650
+ traceMemoryOperation(operation: "search" | "insert" | "delete", sessionId: string, query?: string, resultsCount?: number, invocationContext?: InvocationContext): void;
6651
+ /**
6652
+ * Trace plugin hook execution
6159
6653
  */
6160
- private _buildLlmRequestForTrace;
6654
+ tracePluginHook(pluginName: string, hook: string, agentName?: string, invocationContext?: InvocationContext): void;
6161
6655
  /**
6162
- * Excludes non-serializable fields from config, similar to Python's exclude logic
6656
+ * Record an agent invocation
6163
6657
  */
6164
- private _excludeNonSerializableFromConfig;
6658
+ recordAgentInvocation(dimensions: AgentMetricDimensions): void;
6659
+ /**
6660
+ * Record agent duration
6661
+ */
6662
+ recordAgentDuration(durationMs: number, dimensions: AgentMetricDimensions): void;
6663
+ /**
6664
+ * Record a tool execution
6665
+ */
6666
+ recordToolExecution(dimensions: ToolMetricDimensions): void;
6667
+ /**
6668
+ * Record tool duration
6669
+ */
6670
+ recordToolDuration(durationMs: number, dimensions: ToolMetricDimensions): void;
6671
+ /**
6672
+ * Record an LLM call
6673
+ */
6674
+ recordLlmCall(dimensions: LlmMetricDimensions): void;
6675
+ /**
6676
+ * Record LLM duration
6677
+ */
6678
+ recordLlmDuration(durationMs: number, dimensions: LlmMetricDimensions): void;
6679
+ /**
6680
+ * Record LLM token usage
6681
+ */
6682
+ recordLlmTokens(inputTokens: number, outputTokens: number, dimensions: LlmMetricDimensions): void;
6683
+ /**
6684
+ * Record an error
6685
+ */
6686
+ recordError(errorType: "agent" | "tool" | "llm", context: string): void;
6687
+ /**
6688
+ * Flush all pending telemetry data
6689
+ */
6690
+ flush(timeoutMs?: number): Promise<void>;
6691
+ /**
6692
+ * Shutdown telemetry system
6693
+ */
6694
+ shutdown(timeoutMs?: number): Promise<void>;
6165
6695
  }
6166
6696
  declare const telemetryService: TelemetryService;
6167
6697
  declare const tracer: Tracer;
6168
- declare const initializeTelemetry: (config: TelemetryConfig) => void;
6698
+ declare const initializeTelemetry: (config: TelemetryConfig) => Promise<void>;
6169
6699
  declare const shutdownTelemetry: (timeoutMs?: number) => Promise<void>;
6700
+ declare const traceAgentInvocation: (agent: {
6701
+ name: string;
6702
+ description?: string;
6703
+ }, invocationContext: InvocationContext, input?: string | Record<string, any>, output?: string | Record<string, any>) => void;
6170
6704
  declare const traceToolCall: (tool: BaseTool, args: Record<string, any>, functionResponseEvent: Event, llmRequest?: LlmRequest, invocationContext?: InvocationContext) => void;
6171
6705
  declare const traceLlmCall: (invocationContext: InvocationContext, eventId: string, llmRequest: LlmRequest, llmResponse: LlmResponse) => void;
6706
+ declare const recordAgentInvocation: (dimensions: AgentMetricDimensions) => void;
6707
+ declare const recordToolExecution: (dimensions: ToolMetricDimensions) => void;
6708
+ declare const recordLlmCall: (dimensions: LlmMetricDimensions) => void;
6172
6709
 
6173
6710
  declare const VERSION = "0.1.0";
6174
6711
 
6175
- export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, AgentTool, type AgentToolConfig, type AgentType, index$4 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BasePlugin, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index$3 as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, type EventCompaction, index$7 as Events, type EventsCompactionConfig, type EventsSummarizer, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$2 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, LangfusePlugin, type LangfusePluginOptions, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, LlmEventSummarizer, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, McpCoinGeckoPro, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpPolymarket, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$1 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$5 as Models, type MultiAgentResponse, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type ParsedArtifactUri, type PerInvocationResult, type PerToolFailuresCounter, PlanReActPlanner, type PluginCallbackName, PluginManager, PrebuiltMetrics, REFLECT_AND_RETRY_RESPONSE_TYPE, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, ReflectAndRetryToolPlugin, type ReflectAndRetryToolPluginOptions, RougeEvaluator, RunConfig, Runner, type RunnerAskReturn, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolFailureResponse, type ToolUnion, index$6 as Tools, TrackingScope, TrajectoryEvaluator, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiRagMemoryService, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, convertMcpToolToBaseTool, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, generateAuthEvent, generateClientFunctionCallId, getArtifactUri, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isArtifactRef, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, parseArtifactUri, pluginCallbackNameSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, runCompactionForSlidingWindow, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
6712
+ export { ADK_ATTRS, ADK_SYSTEM_NAME, AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, type AgentMetricDimensions, type AgentSpanAttributes, AgentTool, type AgentToolConfig, type AgentType, index$4 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BasePlugin, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DEFAULTS, DatabaseSessionService, ENV_VARS, EnhancedAuthConfig, type EnhancedLlmSpanAttributes, type EnhancedRunner, type EnhancedToolSpanAttributes, type ErrorSpanAttributes, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index$3 as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, type EventCompaction, index$7 as Events, type EventsCompactionConfig, type EventsSummarizer, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$2 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, LangfusePlugin, type LangfusePluginOptions, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, LlmEventSummarizer, type LlmMetricDimensions, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, type LlmSpanAttributes, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, METRICS, McpAbi, McpAtp, McpBamm, McpCoinGecko, McpCoinGeckoPro, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpPolymarket, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$1 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$5 as Models, type MultiAgentResponse, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OPERATIONS, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type ParsedArtifactUri, type PerInvocationResult, type PerToolFailuresCounter, PlanReActPlanner, type PluginCallbackName, PluginManager, PrebuiltMetrics, REFLECT_AND_RETRY_RESPONSE_TYPE, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, ReflectAndRetryToolPlugin, type ReflectAndRetryToolPluginOptions, RougeEvaluator, RunConfig, Runner, type RunnerAskReturn, SEMCONV, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type TelemetryStats, type ThinkingConfig, type ToolConfig, ToolContext, type ToolFailureResponse, type ToolMetricDimensions, type ToolSpanAttributes, type ToolUnion, index$6 as Tools, type TraceAgentParams, type TraceAgentTransferParams, type TraceCallbackParams, type TraceLlmParams, type TraceMemoryParams, type TracePluginParams, type TraceSessionParams, type TraceToolParams, TrackingScope, TrajectoryEvaluator, type TransferContext, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiRagMemoryService, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, buildLlmRequestForTrace, buildLlmResponseForTrace, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, convertMcpToolToBaseTool, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, extractTextFromContent, formatSpanAttributes, generateAuthEvent, generateClientFunctionCallId, getArtifactUri, getEnvironment, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isArtifactRef, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, parseArtifactUri, pluginCallbackNameSchema, populateClientFunctionCallId, recordAgentInvocation, recordLlmCall, recordToolExecution, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, runCompactionForSlidingWindow, safeJsonStringify, shouldCaptureContent, shutdownTelemetry, telemetryService, traceAgentInvocation, traceLlmCall, traceToolCall, tracer };