@agent-inspect/langchain 3.5.0 → 3.5.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/README.md +69 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @agent-inspect/langchain
|
|
2
|
+
|
|
3
|
+
LangChain callback handler → local AgentInspect traces.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- LangChain or LangGraph apps using `@langchain/core` callbacks
|
|
8
|
+
- You want `persist: true` local JSONL without a hosted backend
|
|
9
|
+
|
|
10
|
+
## When not to use
|
|
11
|
+
|
|
12
|
+
- Raw LangGraph without LangChain callbacks (wire callbacks at integration points)
|
|
13
|
+
- Hosted LangSmith as replacement
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install agent-inspect @agent-inspect/langchain @langchain/core
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Peer:** `@langchain/core@^1.0.0`
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { AgentInspectCallback } from "@agent-inspect/langchain";
|
|
27
|
+
|
|
28
|
+
const handler = new AgentInspectCallback({
|
|
29
|
+
traceDir: ".agent-inspect",
|
|
30
|
+
runName: "my-chain",
|
|
31
|
+
persist: true,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Pass handler to your chain / runnable callbacks
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Privacy
|
|
38
|
+
|
|
39
|
+
- Local files only; metadata-only default
|
|
40
|
+
- No AgentInspect network activity
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
| Export | Purpose |
|
|
45
|
+
| ------ | ------- |
|
|
46
|
+
| `AgentInspectCallback` | LangChain `BaseCallbackHandler` |
|
|
47
|
+
| `extractModelName`, `safePreview` | Metadata helpers |
|
|
48
|
+
|
|
49
|
+
## CLI
|
|
50
|
+
|
|
51
|
+
`npx agent-inspect view` · `check` · `eval`
|
|
52
|
+
|
|
53
|
+
## Docs
|
|
54
|
+
|
|
55
|
+
- [Adapters](https://github.com/rajudandigam/agent-inspect/blob/main/docs/ADAPTERS.md)
|
|
56
|
+
- [Starter](https://github.com/rajudandigam/agent-inspect/tree/main/examples/starters/langchain)
|
|
57
|
+
|
|
58
|
+
## Troubleshooting
|
|
59
|
+
|
|
60
|
+
- **Empty trace:** Set `persist: true` and ensure callbacks are attached to the runnable
|
|
61
|
+
- **LangGraph:** Route through LangChain callback surfaces where possible
|
|
62
|
+
|
|
63
|
+
## Version
|
|
64
|
+
|
|
65
|
+
`agent-inspect@3.5.x`
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-inspect/langchain",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/rajudandigam/agent-inspect/issues"
|
|
15
15
|
},
|
|
16
|
-
"homepage": "https://github.com/rajudandigam/agent-inspect
|
|
16
|
+
"homepage": "https://github.com/rajudandigam/agent-inspect/tree/main/packages/langchain",
|
|
17
17
|
"sideEffects": false,
|
|
18
18
|
"main": "./dist/index.cjs",
|
|
19
19
|
"module": "./dist/index.mjs",
|
|
@@ -31,13 +31,14 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
|
+
"README.md",
|
|
34
35
|
"dist"
|
|
35
36
|
],
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"@langchain/core": "^1.0.0"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"agent-inspect": "3.5.
|
|
41
|
+
"agent-inspect": "3.5.1"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@langchain/core": "^1.0.0"
|