@agent-inspect/ai-sdk 3.5.0 → 3.5.2

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 (2) hide show
  1. package/README.md +83 -0
  2. package/package.json +4 -3
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # @agent-inspect/ai-sdk
2
+
3
+ Vercel AI SDK telemetry → local AgentInspect traces (metadata-only by default).
4
+
5
+ ## When to use
6
+
7
+ - You use `generateText`, `streamText`, or tool calls via the [AI SDK](https://sdk.vercel.ai/)
8
+ - You want framework-native lifecycle mapping without manual `step()` calls
9
+
10
+ ## When not to use
11
+
12
+ - Non–AI SDK agents (use `observe`, OpenAI Agents, or LangChain adapters)
13
+ - Hosted observability replacement
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install agent-inspect @agent-inspect/ai-sdk ai
19
+ ```
20
+
21
+ **Peer:** `ai@^6.0.0`
22
+
23
+ ## Example
24
+
25
+ ```ts
26
+ import { generateText } from "ai";
27
+ import { agentInspect } from "@agent-inspect/ai-sdk";
28
+
29
+ const integration = agentInspect({ traceDir: ".agent-inspect" });
30
+
31
+ const result = await generateText({
32
+ model: yourModel,
33
+ prompt: "Hello",
34
+ experimental_telemetry: {
35
+ isEnabled: true,
36
+ recordInputs: false,
37
+ recordOutputs: false,
38
+ functionId: "my-agent",
39
+ metadata: integration.getTelemetryMetadata(),
40
+ },
41
+ ...integration.getTelemetryHandlers(),
42
+ });
43
+ ```
44
+
45
+ **Required:** `recordInputs: false` and `recordOutputs: false` — AgentInspect does not upload to Vercel; traces stay local.
46
+
47
+ ## Privacy
48
+
49
+ - Writes JSONL under `.agent-inspect/` only
50
+ - No network calls from AgentInspect
51
+ - Default capture: metadata-only
52
+
53
+ ## API
54
+
55
+ | Export | Purpose |
56
+ | ------ | ------- |
57
+ | `agentInspect(options)` | Telemetry integration factory |
58
+ | `getTelemetryHandlers()` | Spread into AI SDK call |
59
+ | `getTelemetryMetadata()` | Safe metadata for telemetry block |
60
+ | `getDiagnostics()` | Local warnings (e.g. preview mode) |
61
+
62
+ ## CLI
63
+
64
+ `npx agent-inspect list` · `view` · `report` · `check`
65
+
66
+ ## Docs
67
+
68
+ - [AI SDK adoption guide](https://github.com/rajudandigam/agent-inspect/blob/main/docs/AI-SDK-ADOPTION.md)
69
+ - [Starter](https://github.com/rajudandigam/agent-inspect/tree/main/examples/starters/ai-sdk)
70
+ - [Root README](https://github.com/rajudandigam/agent-inspect#readme)
71
+
72
+ ## Troubleshooting
73
+
74
+ - **No trace events:** Ensure `experimental_telemetry.isEnabled: true` and handlers are spread
75
+ - **Preview mode warning:** `capture: "preview"` is not fully implemented; use `metadata-only`
76
+
77
+ ## Version
78
+
79
+ Aligned with `agent-inspect@3.5.x`. Requires AI SDK v6.
80
+
81
+ ## License
82
+
83
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-inspect/ai-sdk",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Optional Vercel AI SDK telemetry integration for AgentInspect local traces",
@@ -12,7 +12,7 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/rajudandigam/agent-inspect/issues"
14
14
  },
15
- "homepage": "https://github.com/rajudandigam/agent-inspect#readme",
15
+ "homepage": "https://github.com/rajudandigam/agent-inspect/tree/main/packages/ai-sdk",
16
16
  "sideEffects": false,
17
17
  "main": "./dist/index.cjs",
18
18
  "module": "./dist/index.mjs",
@@ -30,13 +30,14 @@
30
30
  }
31
31
  },
32
32
  "files": [
33
+ "README.md",
33
34
  "dist"
34
35
  ],
35
36
  "peerDependencies": {
36
37
  "ai": "^6.0.0"
37
38
  },
38
39
  "dependencies": {
39
- "agent-inspect": "3.5.0"
40
+ "agent-inspect": "3.5.2"
40
41
  },
41
42
  "devDependencies": {
42
43
  "ai": "^6.0.210"