{"_id":"@axon-ai/backend","_rev":"4-7415faf725950c94f4dfdd820a23d7fd","name":"@axon-ai/backend","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@axon-ai/backend","version":"1.0.0","_id":"@axon-ai/backend@1.0.0","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"dist":{"shasum":"3b56c0714a3c3894ac43e42fdd0aae06c4042a18","tarball":"https://registry.npmjs.org/@axon-ai/backend/-/backend-1.0.0.tgz","fileCount":23,"integrity":"sha512-xiI4HwXEDXV5oqOtu7/yH15C8DRVZ8MV+lNjd8GJT/w8wCbWTR/DKxsbCQ1Vpk1KJ+eyCqsp7xglDe0a6jlzIg==","signatures":[{"sig":"MEQCIEBV6V/IiKjlnBEu219N8vYqGjYN1Qi2PVZj1Ai89C58AiB5NjOedgs9PdrobmcFa17BPNm5GjjuAGMY0Gw1RmOJvg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":552189},"main":"dist/server.js","type":"module","gitHead":"682867e897af9d168c33c3249e958c90a5f30189","scripts":{"dev":"tsx watch src/server.ts","test":"vitest","build":"tsc","start":"node dist/server.js","db:init":"tsx src/database/schema.ts","db:seed":"tsx src/database/seed.ts","test:ui":"vitest --ui","prepublishOnly":"npm run build"},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"_npmVersion":"11.6.2","description":"Backend for AXON with SQLite","directories":{},"_nodeVersion":"22.20.0","dependencies":{"cors":"^2.8.5","uuid":"^9.0.1","dotenv":"^16.4.0","express":"^4.18.2","winston":"^3.11.0","socket.io":"^4.7.0","better-sqlite3":"^9.4.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.2.0","typescript":"^5.3.0","@types/cors":"^2.8.17","@types/node":"^20.11.0","@types/uuid":"^9.0.7","@types/express":"^4.17.21","@types/better-sqlite3":"^7.6.8"},"_npmOperationalInternal":{"tmp":"tmp/backend_1.0.0_1762289636378_0.18181640632765506","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@axon-ai/backend","version":"1.0.1","_id":"@axon-ai/backend@1.0.1","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"dist":{"shasum":"ce173c31ef2664970b0788ba74cf91bcc271ae98","tarball":"https://registry.npmjs.org/@axon-ai/backend/-/backend-1.0.1.tgz","fileCount":23,"integrity":"sha512-W/qYI9exa8D7W9fkp5vIDIc7qYOoQvtJqZPRJY0G2NSsqNHOpA74qA5iw4LRzbH3JuaYNoqDNUPat66JvuThTw==","signatures":[{"sig":"MEUCIQDuInn85HVK0WakeW3AlYObPp4FYP0iFook+5vr7JwBTQIgOCoXLrtfjTqktJfL/lVpTwdBrOxtMyT1FPK3Zd9NIko=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":552189},"main":"dist/server.js","type":"module","gitHead":"863989cbb9763c74575041c400129a9e946b5bd6","scripts":{"dev":"tsx watch src/server.ts","test":"vitest","build":"tsc","start":"node dist/server.js","db:init":"tsx src/database/schema.ts","db:seed":"tsx src/database/seed.ts","test:ui":"vitest --ui","prepublishOnly":"npm run build"},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"_npmVersion":"11.6.2","description":"Backend for AXON with SQLite","directories":{},"_nodeVersion":"22.20.0","dependencies":{"cors":"^2.8.5","uuid":"^9.0.1","dotenv":"^16.4.0","express":"^4.18.2","winston":"^3.11.0","socket.io":"^4.7.0","better-sqlite3":"^9.4.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.2.0","typescript":"^5.3.0","@types/cors":"^2.8.17","@types/node":"^20.11.0","@types/uuid":"^9.0.7","@types/express":"^4.17.21","@types/better-sqlite3":"^7.6.8"},"_npmOperationalInternal":{"tmp":"tmp/backend_1.0.1_1762450513236_0.8422039109266724","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@axon-ai/backend","version":"1.0.2","_id":"@axon-ai/backend@1.0.2","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"dist":{"shasum":"c4cbeb044535f9e3bf99c54759697ea943b131e4","tarball":"https://registry.npmjs.org/@axon-ai/backend/-/backend-1.0.2.tgz","fileCount":24,"integrity":"sha512-zDJf21XS6CUhRPYm5gh0efS4h2bXirFs6Z7c33gtluoWejNWU0nAL4gRAGAHLgo4iQe1YjXO/0LBMiT3dsar1Q==","signatures":[{"sig":"MEUCIQCItttbzdO8g7wPOC32vWoK/xQkSKXPXX32XeJ6SMUVmAIgU43BJM2YiZjJqvAaMvfpcI/3GLBF1uV/2RWfq1Q9814=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":556325},"main":"dist/server.js","type":"module","gitHead":"863989cbb9763c74575041c400129a9e946b5bd6","scripts":{"dev":"tsx watch src/server.ts","test":"vitest","build":"tsc","start":"node dist/server.js","db:init":"tsx src/database/schema.ts","db:seed":"tsx src/database/seed.ts","test:ui":"vitest --ui","prepublishOnly":"npm run build"},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"_npmVersion":"11.6.2","description":"Backend for AXON with SQLite","directories":{},"_nodeVersion":"22.20.0","dependencies":{"cors":"^2.8.5","uuid":"^9.0.1","dotenv":"^16.4.0","express":"^4.18.2","winston":"^3.11.0","socket.io":"^4.7.0","better-sqlite3":"^9.4.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.2.0","typescript":"^5.3.0","@types/cors":"^2.8.17","@types/node":"^20.11.0","@types/uuid":"^9.0.7","@types/express":"^4.17.21","@types/better-sqlite3":"^7.6.8"},"_npmOperationalInternal":{"tmp":"tmp/backend_1.0.2_1762532988655_0.10743445228135307","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@axon-ai/backend","version":"1.0.3","type":"module","description":"Backend for Axon with SQLite","main":"dist/server.js","scripts":{"dev":"tsx watch src/server.ts","build":"tsc","start":"node dist/server.js","test":"vitest","test:ui":"vitest --ui","db:init":"tsx src/database/schema.ts","db:seed":"tsx src/database/seed.ts"},"dependencies":{"express":"^4.18.2","socket.io":"^4.7.0","better-sqlite3":"^9.4.0","cors":"^2.8.5","dotenv":"^16.4.0","uuid":"^9.0.1","winston":"^3.11.0"},"devDependencies":{"@types/express":"^4.17.21","@types/node":"^20.11.0","@types/cors":"^2.8.17","@types/uuid":"^9.0.7","@types/better-sqlite3":"^7.6.8","typescript":"^5.3.0","tsx":"^4.7.0","vitest":"^1.2.0"},"gitHead":"041ff34bcd3d9c95ecb2a0d51d6b4eac6938afb8","_id":"@axon-ai/backend@1.0.3","_nodeVersion":"22.20.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-RV9WhUmMV4GxWJfylTcVG10VCcOPsYcHbLenTBJkTPTTpMxt9EVxNFj0V48iaw34WkhlPMJmzxfTDVeXd8dZgQ==","shasum":"47d3f5b9af506392f7cec3cdb0ceacea511f6a43","tarball":"https://registry.npmjs.org/@axon-ai/backend/-/backend-1.0.3.tgz","fileCount":28,"unpackedSize":540210,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICQ+SleASvzruuu1Bh0qwKJ+zUq/e37MEZQJlCODoF+UAiEAh1dmHo6b+XPYWlI9e1sAU55lV6rVSlyfqio9ehaMVkk="}]},"_npmUser":{"name":"ldwerner","email":"lwerner10@gmail.com"},"directories":{},"maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/backend_1.0.3_1763660221001_0.11441965380988228"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-04T20:53:56.307Z","modified":"2025-11-20T17:37:01.453Z","1.0.0":"2025-11-04T20:53:56.601Z","1.0.1":"2025-11-06T17:35:13.451Z","1.0.2":"2025-11-07T16:29:48.867Z","1.0.3":"2025-11-20T17:37:01.196Z"},"description":"Backend for Axon with SQLite","maintainers":[{"name":"feyikemiagboola","email":"agboolafeyikemi93@gmail.com"},{"name":"ldwerner","email":"lwerner10@gmail.com"},{"name":"jamieraedouglass","email":"Jamieraedouglass@gmail.com"}],"readme":"# Axon Backend\n\n[![npm version](https://img.shields.io/npm/v/@axon-ai/backend.svg)](https://www.npmjs.com/package/@axon-ai/backend)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThe `@axon-ai/backend` package serves as the core data processing and storage component for the Axon developer tool. It receives real-time tracing data from your LangChain applications (via `@axon-ai/langchain-tracer`), stores it in a local SQLite database, and serves this data to the `@axon-ai/dashboard` for visualization.\n\nThis backend is designed to run locally alongside your development environment, providing a private and efficient way to monitor and debug your AI agents and chains without sending sensitive data to external services.\n\n## ✨ Features\n\n-   **Real-time Data Ingestion**: Receives trace events from LangChain applications instantly.\n-   **Local SQLite Storage**: Persists tracing data locally for historical analysis and quick retrieval.\n-   **WebSocket API**: Communicates with the Axon Dashboard via WebSockets for live updates.\n-   **REST API**: Provides endpoints for the dashboard to fetch historical trace data.\n-   **Seamless CLI Integration**: Automatically managed by the `@axon-ai/cli` for an effortless developer experience.\n\n## 🚀 Getting Started (via Axon CLI)\n\nThe Axon Backend is an integral part of the Axon developer tool and is typically managed by the `@axon-ai/cli`. You usually won't need to interact with this package directly.\n\n### 1. Install the Axon CLI\n\nIf you haven't already, install the Axon CLI globally:\n\n```bash\nnpm install -g @axon-ai/cli\n```\n\n### 2. Initialize Your Project\n\nNavigate to your LangChain project directory and initialize Axon:\n\n```bash\naxon-ai init --project my-langchain-app\n```\nThis command sets up the necessary configuration files and automatically initializes the database for the backend.\n\n### 3. Start the Axon Services (Backend & Dashboard)\n\nFrom your project directory, start both the Axon backend and dashboard:\n\n```bash\naxon-ai start\n```\n\nThis command will launch the backend server (usually on `http://localhost:3000`) and the dashboard, connecting them automatically.\n\n## 🛠️ Direct Usage (for Development/Debugging)\n\nIf you need to run the backend independently for development or debugging purposes:\n\n1.  **Clone the Axon repository:**\n    ```bash\n    git clone https://github.com/your-axon-repo/Axon.git\n    cd Axon/backend\n    ```\n\n2.  **Install dependencies:**\n    ```bash\n    npm install\n    ```\n\n3.  **Initialize the database schema:**\n    ```bash\n    npm run db:init\n    ```\n\n4.  **Start the backend in development mode (with auto-reloading):**\n    ```bash\n    npm run dev\n    ```\n\n5.  **Start the backend in production mode:**\n    ```bash\n    npm run build\n    npm start\n    ```\n\n## ⚙️ Configuration\n\nThe backend's port and host can be configured via the `.axon-ai/config.json` file in your project root (created by `axon-ai init`) or by passing options to the `axon-ai start` command.\n\nExample `config.json` snippet:\n```json\n{\n  \"backend\": {\n    \"port\": 3000,\n    \"host\": \"localhost\"\n  }\n}\n```\n\n## 🗄️ Database\n\nThe backend uses SQLite for local data persistence.\n\n-   **Schema Initialization**: The `npm run db:init` script creates the necessary tables. This is automatically handled by `axon-ai init`.\n-   **Data Storage**: All trace events, including LLM calls, tool usage, and chain executions, are stored in this local database.\n\n## 🐛 Troubleshooting\n\nIf you encounter issues with the backend:\n\n-   **Check CLI Status**: Use `axon-ai status` to see if the backend server is running.\n-   **Port Conflicts**: If the backend fails to start, another process might be using port `3000`. You can specify a different port using `axon-ai start -p <new-port>`.\n-   **Logs**: Check the console output where the backend is running for any error messages.\n\n## 🤝 Contributing\n\nContributions are welcome! If you're interested in improving the Axon Backend, please see the main Axon repository for contribution guidelines.\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n","readmeFilename":"README.md"}