@iqai/adk 0.5.9 → 0.6.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,152 @@
1
1
  # @iqai/adk
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3f78ed9: Fix: Wire up all missing plugin lifecycle callbacks
8
+
9
+ The PluginManager had several callback methods defined but never invoked, causing plugins implementing guardrails, logging, or error recovery to be silently ignored.
10
+
11
+ This fix adds the missing calls for:
12
+
13
+ - `beforeModelCallback` / `afterModelCallback` - intercept LLM requests/responses
14
+ - `onModelErrorCallback` - handle/recover from LLM errors
15
+ - `beforeToolCallback` / `afterToolCallback` - intercept tool execution
16
+ - `onToolErrorCallback` - handle/recover from tool errors
17
+
18
+ All 12 plugin callbacks are now properly wired up and invoked at the appropriate lifecycle points.
19
+
20
+ ## 0.6.0
21
+
22
+ ### Minor Changes
23
+
24
+ - c2f9b02: ## Comprehensive Telemetry System Overhaul
25
+
26
+ This release introduces a complete redesign of the telemetry system with extensive features for observability and monitoring.
27
+
28
+ ### ✨ New Features
29
+
30
+ **Modular Architecture**
31
+
32
+ - Refactored from monolithic to service-based design
33
+ - Separate modules for tracing, metrics, setup, and utilities
34
+ - Clean `telemetryService` API replacing low-level functions
35
+
36
+ **Metrics Support**
37
+
38
+ - Full metrics collection with OpenTelemetry SDK
39
+ - Counters: agent invocations, tool executions, LLM calls
40
+ - Histograms: duration tracking, token usage (input/output/total)
41
+ - OTLP HTTP exporter for metrics
42
+
43
+ **Privacy Controls**
44
+
45
+ - `ADK_CAPTURE_MESSAGE_CONTENT` environment variable
46
+ - Fine-grained control over sensitive data capture
47
+ - Disable prompt/completion logging for production
48
+
49
+ **Semantic Conventions**
50
+
51
+ - OpenTelemetry GenAI conventions (v1.37+)
52
+ - ADK-specific namespace (`adk.*`) for custom attributes
53
+ - Standardized attribute names across all spans
54
+
55
+ **Enhanced Tracing**
56
+
57
+ - Automatic agent invocation tracing with status tracking
58
+ - Tool execution spans with arguments and results
59
+ - LLM call tracing with token usage metrics
60
+ - Async generator support for streaming responses
61
+
62
+ **Resource Auto-Detection**
63
+
64
+ - Automatic detection of host, OS, and process information
65
+ - Custom resource attributes support
66
+ - Service instance identification
67
+
68
+ **Configuration**
69
+
70
+ - Comprehensive initialization options
71
+ - Sampling ratio control for production
72
+ - Configurable metric export intervals
73
+ - Custom OTLP headers for authentication
74
+
75
+ ### 🔧 Breaking Changes
76
+
77
+ - `initializeTelemetry()` → `telemetryService.initialize()`
78
+ - `shutdownTelemetry()` → `telemetryService.shutdown()`
79
+ - Legacy `telemetry.ts` now wraps new service for backward compatibility
80
+
81
+ ### 📊 Integration
82
+
83
+ All core components now automatically report metrics:
84
+
85
+ - `BaseAgent.runAsyncInternal()`: Agent metrics
86
+ - `functions.ts`: Tool execution metrics
87
+ - `base-llm-flow.ts`: LLM token and duration metrics
88
+
89
+ ### 📚 Documentation
90
+
91
+ - Comprehensive README in `src/telemetry/`
92
+ - Updated observability example with Jaeger + Langfuse
93
+ - Practical examples demonstrating all features
94
+
95
+ ### 🛠️ Technical Details
96
+
97
+ **Dependencies Added**:
98
+
99
+ - `@opentelemetry/sdk-metrics@^2.1.0`
100
+ - `@opentelemetry/exporter-metrics-otlp-http@^0.205.0`
101
+
102
+ **Supported Backends**:
103
+
104
+ - Jaeger (local development)
105
+ - Langfuse
106
+ - Datadog
107
+ - New Relic
108
+ - Any OTLP-compatible backend
109
+
110
+ This release provides a production-ready observability foundation for AI applications built with ADK.
111
+
112
+ ### Patch Changes
113
+
114
+ - 7186de5: Fix: Convert Zod schemas to JSON Schema in BasicLlmRequestProcessor
115
+ - 1387333: Improvements to telementry
116
+
117
+ ## Unreleased
118
+
119
+ ### Major Changes
120
+
121
+ - **BREAKING: Telemetry aligned with OpenTelemetry GenAI Semantic Conventions v1.38.0**
122
+
123
+ The ADK telemetry system has been updated to fully comply with the latest OpenTelemetry GenAI semantic conventions. This ensures better interoperability with industry-standard observability platforms and provides richer, more standardized telemetry data.
124
+
125
+ **Breaking Changes:**
126
+
127
+ - `gen_ai.system` → `gen_ai.provider.name` (automatic provider detection from model names)
128
+ - `gen_ai.usage.total_tokens` removed (compute client-side: input + output)
129
+ - `call_llm` operation deprecated in favor of standard `chat`, `text_completion`, `generate_content`
130
+ - `traceCallback` signature changed: removed unused `targetName` parameter
131
+
132
+ **New Features:**
133
+
134
+ - Automatic provider detection (OpenAI, Anthropic, Google, AWS Bedrock, Mistral, Groq, Cohere, etc.)
135
+ - Enhanced LLM attributes: `response.id`, `response.model`, `output.type`, `top_k`, `frequency_penalty`, `presence_penalty`, `stop_sequences`, `seed`
136
+ - Structured content capture: `system_instructions`, `input.messages`, `output.messages`, `tool.definitions`
137
+ - Agent ID tracking: `gen_ai.agent.id` for unique agent identification
138
+ - Tool argument/result capture: `gen_ai.tool.call.arguments`, `gen_ai.tool.call.result`
139
+ - Standard metrics constants: `gen_ai.client.operation.duration`, `gen_ai.client.token.usage`
140
+ - Error type tracking: `error.type` attribute for low-cardinality error identification
141
+
142
+ **Backward Compatibility:**
143
+
144
+ - Deprecated constants are still available but will be removed in v1.0.0
145
+ - All `adk.*` namespace attributes remain unchanged
146
+ - Legacy content events preserved for one release cycle
147
+
148
+ See [TELEMETRY_MIGRATION.md](./TELEMETRY_MIGRATION.md) for detailed migration guide.
149
+
3
150
  ## 0.5.9
4
151
 
5
152
  ### Patch Changes
package/README.md CHANGED
@@ -1,34 +1,29 @@
1
1
  <div align="center">
2
-
3
- <img src="https://files.catbox.moe/vumztw.png" alt="ADK TypeScript Logo" width="100" />
4
-
5
- <br/>
6
-
7
- # @iqai/adk
8
-
9
- **The core TypeScript library for building sophisticated AI agents with multi-LLM support, advanced tools, and flexible conversation flows.**
10
-
11
- *Production-ready Multi-Agent Systems • Extensible Architecture*
12
-
13
- <p align="center">
14
- <a href="https://www.npmjs.com/package/@iqai/adk">
15
- <img src="https://img.shields.io/npm/v/@iqai/adk" alt="NPM Version" />
16
- </a>
17
- <a href="https://www.npmjs.com/package/@iqai/adk">
18
- <img src="https://img.shields.io/npm/dm/@iqai/adk" alt="NPM Downloads" />
19
- </a>
20
- <a href="https://github.com/IQAIcom/adk-ts/blob/main/LICENSE.md">
21
- <img src="https://img.shields.io/npm/l/@iqai/adk" alt="License" />
22
- </a>
23
- <a href="https://github.com/IQAIcom/adk-ts">
24
- <img src="https://img.shields.io/github/stars/IQAIcom/adk-ts?style=social" alt="GitHub Stars" />
25
- </a>
26
- </p>
2
+ <img src="https://files.catbox.moe/vumztw.png" alt="ADK-TS Logo" width="100" />
3
+ <br/>
4
+ <h1>@iqai/adk</h1>
5
+ <b>The core TypeScript library for building sophisticated AI agents with multi-LLM support, advanced tools, and flexible conversation flows.</b>
6
+ <br/>
7
+ <i>Production-ready • Multi-Agent Systems • Extensible Architecture</i>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/@iqai/adk">
11
+ <img src="https://img.shields.io/npm/v/@iqai/adk" alt="NPM Version" />
12
+ </a>
13
+ <a href="https://www.npmjs.com/package/@iqai/adk">
14
+ <img src="https://img.shields.io/npm/dm/@iqai/adk" alt="NPM Downloads" />
15
+ </a>
16
+ <a href="https://github.com/IQAIcom/adk-ts/blob/main/LICENSE.md">
17
+ <img src="https://img.shields.io/npm/l/@iqai/adk" alt="License" />
18
+ </a>
19
+ <a href="https://github.com/IQAIcom/adk-ts">
20
+ <img src="https://img.shields.io/github/stars/IQAIcom/adk-ts?style=social" alt="GitHub Stars" />
21
+ </a>
22
+ </p>
23
+ </div>
27
24
 
28
25
  ---
29
26
 
30
- </div>
31
-
32
27
  ## 🌟 Overview
33
28
 
34
29
  `@iqai/adk` is the core TypeScript library for the Agent Development Kit, providing the foundational tools and abstractions to build sophisticated AI agents. It enables seamless integration with multiple Large Language Models (LLMs), advanced tool usage, and persistent memory capabilities.