{"_id":"@axon-ai/langchain-tracer","_rev":"5-8b15900339c44909137a10c03c4d2102","name":"@axon-ai/langchain-tracer","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@axon-ai/langchain-tracer","version":"1.0.0","keywords":["langchain","tracing","observability","debugging","ai","agents","monitoring"],"author":{"name":"AXON AI TEAM"},"license":"MIT","_id":"@axon-ai/langchain-tracer@1.0.0","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"dist":{"shasum":"62b38e584bcc9cf3dc2267a862cfe5cb31b01fe1","tarball":"https://registry.npmjs.org/@axon-ai/langchain-tracer/-/langchain-tracer-1.0.0.tgz","fileCount":21,"integrity":"sha512-bqvJbiti6DtxJabON3//V4uG/FIDvhXwlkXO8QshTI2hAZSS13Sdqr7MYgwNqW7FQj45AVyavhgcRszoPGMa7Q==","signatures":[{"sig":"MEUCIDwFec+3fvi3j7KBiCAxvTrcdw142YOFc5cylBVTSoFEAiEA5O1AhHmd8WOU0P3jnVNtDHMxfdhPckLVPtHaIzUZlX0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":246962},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"682867e897af9d168c33c3249e958c90a5f30189","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"vite build","clean":"rm -rf dist","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"repository":{"url":"https://github.com/yourusername/langchain-tracer/Axon.git","type":"git"},"_npmVersion":"11.6.2","description":"LangChain tracing callback handler for AXON","directories":{},"_nodeVersion":"22.20.0","dependencies":{"uuid":"^9.0.1","socket.io-client":"^4.7.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","eslint":"^8.56.0","vitest":"^1.2.0","typescript":"^5.3.0","@types/node":"^20.11.0","@types/uuid":"^9.0.8","vite-plugin-dts":"^3.7.0","@vitest/coverage-v8":"^1.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"peerDependencies":{"@langchain/core":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/langchain-tracer_1.0.0_1762289577414_0.01748087949376642","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Deprecated: Axon is now OTLP-native — use OpenLLMetry/OpenInference pointed at http://localhost:4000"},"1.0.1":{"name":"@axon-ai/langchain-tracer","version":"1.0.1","keywords":["langchain","tracing","observability","debugging","ai","agents","monitoring"],"author":{"name":"AXON AI TEAM"},"license":"MIT","_id":"@axon-ai/langchain-tracer@1.0.1","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"dist":{"shasum":"6aabbe66ceff600ffd35a2032b072530cfc328cb","tarball":"https://registry.npmjs.org/@axon-ai/langchain-tracer/-/langchain-tracer-1.0.1.tgz","fileCount":21,"integrity":"sha512-mywDU0PmCu0QIE1qI+O4NMkf/au7/hzciqUj9EAhvA+g9PcOg8JalBaM9LIv+F6q6QiXw5Fw0FeJ9jiL5oXvEA==","signatures":[{"sig":"MEQCICIZbrYh0iDQhch1nMT+W9uX3GxwQ3RUFEXDfMEmFjC3AiAgAANmpdZ5qBt6NPidl0TDS4GedufF5D3mFNQUhN35Pw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":246963},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"863989cbb9763c74575041c400129a9e946b5bd6","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"vite build","clean":"rm -rf dist","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"repository":{"url":"https://github.com/yourusername/langchain-tracer/Axon.git","type":"git"},"_npmVersion":"11.6.2","description":"LangChain tracing callback handler for AXON","directories":{},"_nodeVersion":"22.20.0","dependencies":{"uuid":"^9.0.1","socket.io-client":"^4.7.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","eslint":"^8.56.0","vitest":"^1.2.0","typescript":"^5.3.0","@types/node":"^20.11.0","@types/uuid":"^9.0.8","vite-plugin-dts":"^3.7.0","@vitest/coverage-v8":"^1.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"peerDependencies":{"@langchain/core":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/langchain-tracer_1.0.1_1762450593320_0.045273344828973716","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Deprecated: Axon is now OTLP-native — use OpenLLMetry/OpenInference pointed at http://localhost:4000"},"1.0.2":{"name":"@axon-ai/langchain-tracer","version":"1.0.2","keywords":["langchain","tracing","observability","debugging","ai","agents","monitoring"],"author":{"name":"AXON AI TEAM"},"license":"MIT","_id":"@axon-ai/langchain-tracer@1.0.2","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"dist":{"shasum":"78421177f72c3b09abf5c331eed96a2ca5fa54da","tarball":"https://registry.npmjs.org/@axon-ai/langchain-tracer/-/langchain-tracer-1.0.2.tgz","fileCount":22,"integrity":"sha512-ahSop0kYs3roKOEI4UfJbOqVqZiOKm8ebRop4HdTP7cqXXzLhzXTnKNJx2fMwwohFxY88uyrLorLr00gyXTLVw==","signatures":[{"sig":"MEUCICfdFUPoYI2s2m7PqdCB1g/EXtqpGZclbyBMshbWrVFxAiEA0/W5GzbpnkG96VbW7leMTx5HtswTghvkXGalnUccpk0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":250584},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"863989cbb9763c74575041c400129a9e946b5bd6","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"vite build","clean":"rm -rf dist","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"repository":{"url":"https://github.com/yourusername/langchain-tracer/Axon.git","type":"git"},"_npmVersion":"11.6.2","description":"LangChain tracing callback handler for AXON","directories":{},"_nodeVersion":"22.20.0","dependencies":{"uuid":"^9.0.1","socket.io-client":"^4.7.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","eslint":"^8.56.0","vitest":"^1.2.0","typescript":"^5.3.0","@types/node":"^20.11.0","@types/uuid":"^9.0.8","vite-plugin-dts":"^3.7.0","@vitest/coverage-v8":"^1.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"peerDependencies":{"@langchain/core":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/langchain-tracer_1.0.2_1762533042249_0.5433144652247908","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Deprecated: Axon is now OTLP-native — use OpenLLMetry/OpenInference pointed at http://localhost:4000"},"1.0.3":{"name":"@axon-ai/langchain-tracer","version":"1.0.3","keywords":["langchain","tracing","observability","debugging","ai","agents","monitoring"],"author":{"name":"Axon Team"},"license":"MIT","_id":"@axon-ai/langchain-tracer@1.0.3","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"homepage":"https://github.com/yourusername/agent-trace-visualizer#readme","bugs":{"url":"https://github.com/yourusername/agent-trace-visualizer/issues"},"dist":{"shasum":"4b3d62c3d928d9b4351bb5470bec31e4d0b098ec","tarball":"https://registry.npmjs.org/@axon-ai/langchain-tracer/-/langchain-tracer-1.0.3.tgz","fileCount":22,"integrity":"sha512-UjDoqoUO8vDrhwNX0Bq7SeyFYV7LhWbjcZf/f3hEgeUs+uuPDOBylVltyG6eHyi8Mw0ucvYAWQMGNWdCsJeA0A==","signatures":[{"sig":"MEUCIFzTmwEqFPS/WF8+4oyfO2RafqhxaydNKE5w8qZnQLkZAiEAll4qyWAdqijntMLkWKbpnYoHK5u6FEHEOsO0lbFA4TQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":250540},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"041ff34bcd3d9c95ecb2a0d51d6b4eac6938afb8","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"vite build","clean":"rm -rf dist","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"repository":{"url":"git+https://github.com/yourusername/agent-trace-visualizer.git","type":"git"},"_npmVersion":"11.6.2","description":"LangChain tracing callback handler for Axon","directories":{},"_nodeVersion":"22.20.0","dependencies":{"uuid":"^9.0.1","socket.io-client":"^4.7.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","eslint":"^8.56.0","vitest":"^1.2.0","typescript":"^5.3.0","@types/node":"^20.11.0","@types/uuid":"^9.0.8","vite-plugin-dts":"^3.7.0","@vitest/coverage-v8":"^1.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"peerDependencies":{"@langchain/core":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/langchain-tracer_1.0.3_1763660246846_0.487746898926658","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Deprecated: Axon is now OTLP-native — use OpenLLMetry/OpenInference pointed at http://localhost:4000"}},"time":{"created":"2025-11-04T20:52:57.350Z","modified":"2026-06-20T14:34:41.312Z","1.0.0":"2025-11-04T20:52:57.617Z","1.0.1":"2025-11-06T17:36:33.544Z","1.0.2":"2025-11-07T16:30:42.447Z","1.0.3":"2025-11-20T17:37:27.038Z"},"bugs":{"url":"https://github.com/yourusername/agent-trace-visualizer/issues"},"author":{"name":"Axon Team"},"license":"MIT","homepage":"https://github.com/yourusername/agent-trace-visualizer#readme","keywords":["langchain","tracing","observability","debugging","ai","agents","monitoring"],"repository":{"url":"git+https://github.com/yourusername/agent-trace-visualizer.git","type":"git"},"description":"LangChain tracing callback handler for Axon","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"}],"readme":"# Axon LangChain Tracer\n\n[![npm version](https://img.shields.io/npm/v/@axon-ai/langchain-tracer.svg)](https://www.npmjs.com/package/@axon-ai/langchain-tracer)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n`@axon-ai/langchain-tracer` is a callback handler for LangChain.js that enables real-time monitoring and visualization of your AI agents, chains, and models with the Axon developer tool.\n\nIt seamlessly captures execution traces, inputs, outputs, and intermediate steps, sending them to the Axon dashboard for easy debugging and analysis.\n\n## ✨ Features\n\n- **Easy Integration**: Add tracing to any LangChain component with a single callback.\n- **Automatic Configuration**: Automatically detects project settings from your Axon configuration.\n- **Real-time**: Streams trace data to the Axon dashboard as it happens.\n- **Comprehensive**: Captures events from LLMs, chains, and tools.\n\n##  Prerequisites\n\nBefore using this tracer, you must have the Axon CLI installed and initialized in your project.\n\n1.  **Install the Axon CLI:**\n    ```bash\n    npm install -g @axon-ai/cli\n    ```\n\n2.  **Initialize Axon in your project:**\n    ```bash\n    axon-ai init --project my-langchain-app\n    ```\n\n3.  **Start the Axon services:**\n    ```bash\n    axon-ai start\n    ```\n\n## 🚀 Installation\n\nInstall the tracer package in your LangChain project:\n\n```bash\nnpm install @axon-ai/langchain-tracer\n```\n\n## ⚡ Quick Start\n\nThe easiest way to get started is with `createAutoTracer`. It automatically reads your project configuration from the `.axon-ai/config.json` file created during `axon-ai init`.\n\n```javascript\nimport { ChatOpenAI } from '@langchain/openai';\nimport { createAutoTracer } from '@axon-ai/langchain-tracer';\n\n// 1. Create a tracer instance\nconst tracer = createAutoTracer();\n\n// 2. Add the tracer to your model's callbacks\nconst model = new ChatOpenAI({\n  modelName: 'gpt-3.5-turbo',\n  callbacks: [tracer] // <-- Add this line\n});\n\n// 3. Run your model\nawait model.invoke(\"Hello, Axon!\");\n\n// Now, check the Axon dashboard to see your trace!\n```\n\n## 📚 API and Usage\n\n### `createAutoTracer()`\n\nCreates a tracer that automatically connects to the Axon backend based on the `.axon-ai/config.json` file in your project. This is the recommended method for most use cases.\n\n### `createTracer(options)`\n\nIf you need to configure the tracer manually (e.g., when running in an environment where the config file is not accessible), you can use `createTracer`.\n\n```javascript\nimport { createTracer } from '@axon-ai/langchain-tracer';\n\nconst tracer = createTracer({\n  projectName: 'my-langchain-app', // Must match the project name in Axon\n  endpoint: 'http://localhost:3000' // Optional: Axon backend endpoint\n});\n```\n\n## Integration Examples\n\nThe tracer can be added to the `callbacks` array of any LangChain component that supports it.\n\n### AgentExecutor\n\nTo trace an entire agent execution, including tool calls:\n\n```javascript\nimport { AgentExecutor } from 'langchain/agents';\n\nconst agentExecutor = new AgentExecutor({\n  agent,\n  tools,\n  callbacks: [tracer] // Add tracer to the executor\n});\n\nawait agentExecutor.invoke({\n  input: \"What is 15 * 23? Then search for information about the result.\"\n});\n```\n\n### LLMChain\n\nTo trace a specific chain:\n\n```javascript\nimport { LLMChain } from 'langchain/chains';\n\nconst chain = new LLMChain({\n  llm: model,\n  prompt,\n  callbacks: [tracer] // Add tracer to the chain\n});\n\nawait chain.invoke({ question: \"What is the capital of France?\" });\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n","readmeFilename":"README.md"}