{"_id":"@agent-memory/core","_rev":"4-76d3264d4698be21690cd449b6c18f9b","name":"@agent-memory/core","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@agent-memory/core","version":"0.1.0","license":"MIT","_id":"@agent-memory/core@0.1.0","maintainers":[{"name":"wuhangqi25","email":"wuhangqi25@gmail.com"}],"dist":{"shasum":"2217d80feeb1d1620e09a7201c01b14d733dc758","tarball":"https://registry.npmjs.org/@agent-memory/core/-/core-0.1.0.tgz","fileCount":58,"integrity":"sha512-g/JTfh5DLJZk3lI6qf1XCw5pIqckuraQVonSPgGaYb2ZoebAbXG63PWfiEHG2GFlVTHeOGiyHfrzsq0nR1y3ow==","signatures":[{"sig":"MEQCIFY8R8G/ylojeEpdpd/CC7ADAxtKjvVtEA/t1gEQQmBKAiBFkEjvlm2f0fu4c0Xpu3Y3jkDhHYzOBgQsy/JqpDwBgA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64293},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b64a400250026b15c210c9ae2e1c1316da3b5e4f","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"wuhangqi25","email":"wuhangqi25@gmail.com"},"_npmVersion":"10.9.2","description":"Core library for agent-memory: interfaces, sources, search, and embedding","directories":{},"_nodeVersion":"22.13.1","dependencies":{"uuid":"^11.1.0","env-paths":"^3.0.0","sqlite-vec":"^0.1.7-alpha.2","better-sqlite3":"^11.8.1","@huggingface/transformers":"^3.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1770300523255_0.17782338565199063","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agent-memory/core","version":"0.1.1","license":"MIT","_id":"@agent-memory/core@0.1.1","maintainers":[{"name":"wuhangqi25","email":"wuhangqi25@gmail.com"}],"homepage":"https://github.com/WHQ25/agent-memory#readme","bugs":{"url":"https://github.com/WHQ25/agent-memory/issues"},"dist":{"shasum":"b7122080d6936d08f9ba38255207adf034312c59","tarball":"https://registry.npmjs.org/@agent-memory/core/-/core-0.1.1.tgz","fileCount":59,"integrity":"sha512-69CrtsFYM5WseOzRD0i86ycwEPeaxn8A1VaAzGy0v64w2YTIjcm1e9AQ06vNdkUB2T98k4VXUOPc7GGiQG8ZwQ==","signatures":[{"sig":"MEUCIDtDbcHNx8sB9JTyEVOr+bLW6rzLorT8RxO8aT1e3WXzAiEA6esGIpCV62buh2GAeyUizuNzHlkHwyp4EEeFgt30Nuk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-memory%2fcore@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":66074},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"791f40b8abb923f3c3c12fe4134cd1e824cb0013","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:47dbbe34-3feb-4ff2-869d-389dc96e48f8"}},"repository":{"url":"git+https://github.com/WHQ25/agent-memory.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.2","description":"Core library for agent-memory: interfaces, sources, search, and embedding","directories":{},"_nodeVersion":"24.13.0","dependencies":{"uuid":"^11.1.0","env-paths":"^3.0.0","sqlite-vec":"^0.1.7-alpha.2","better-sqlite3":"^11.8.1","@huggingface/transformers":"^3.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1770303687756_0.5230117668169769","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@agent-memory/core","version":"0.1.2","license":"MIT","_id":"@agent-memory/core@0.1.2","maintainers":[{"name":"wuhangqi25","email":"wuhangqi25@gmail.com"}],"homepage":"https://github.com/WHQ25/agent-memory#readme","bugs":{"url":"https://github.com/WHQ25/agent-memory/issues"},"dist":{"shasum":"3fcaa09a4d5090d0ebb93020eb99c9646d5f1297","tarball":"https://registry.npmjs.org/@agent-memory/core/-/core-0.1.2.tgz","fileCount":59,"integrity":"sha512-yyEypf8WdoKW6F7AIFkGiDTHu2YRikNxXCwqI2pDU4OOQ1aCBbBeW/S35hk1knlqO5aua8MHYc2BnADuZAM8Rg==","signatures":[{"sig":"MEUCIQDRy+QRrQRLjp+0Q6jzkmwB4/+gbBBH3hQff+LRBaPg1AIgAO0ZgEXPJNHQyiKtiQfj+cO0CCasTYZqA2Ahzi3WUqw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-memory%2fcore@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":66074},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"e1aa3e2fcc3eb67065d22799b5a8652437c92611","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:47dbbe34-3feb-4ff2-869d-389dc96e48f8"}},"repository":{"url":"git+https://github.com/WHQ25/agent-memory.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.2","description":"Core library for agent-memory: interfaces, sources, search, and embedding","directories":{},"_nodeVersion":"24.13.0","dependencies":{"uuid":"^11.1.0","env-paths":"^3.0.0","sqlite-vec":"^0.1.7-alpha.2","better-sqlite3":"^11.8.1","@huggingface/transformers":"^3.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.2_1770328976660_0.5447974835436955","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agent-memory/core","version":"0.2.0","description":"Core library for agent-memory: interfaces, sources, search, and embedding","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","dev":"tsc --watch"},"engines":{"node":">=22"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/WHQ25/agent-memory.git","directory":"packages/core"},"dependencies":{"better-sqlite3":"^11.8.1","sqlite-vec":"^0.1.7-alpha.2","@huggingface/transformers":"^3.4.1","env-paths":"^3.0.0","uuid":"^11.1.0"},"gitHead":"ba33df09632d87734211a5ed3f41eb66185d3727","_id":"@agent-memory/core@0.2.0","bugs":{"url":"https://github.com/WHQ25/agent-memory/issues"},"homepage":"https://github.com/WHQ25/agent-memory#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-oH6+MX0Bjazu9oMwLpW4e87zQbHKwbC3WWD54vjxnqua57EbFEyPgYxDI5GNzt0GfMbCEnRaytXCw5bM/dsP6A==","shasum":"f5fab032cafadefca54470ead97cc780d6921702","tarball":"https://registry.npmjs.org/@agent-memory/core/-/core-0.2.0.tgz","fileCount":59,"unpackedSize":66074,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-memory%2fcore@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBXmpRI62wV4IJmn4toDsiIsscPrFRQq4uh2lLCn2dwMAiEArOEgPGv8ECijSjZhvGOIm8+SNI32029fAwlXlBMmDig="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:47dbbe34-3feb-4ff2-869d-389dc96e48f8"}},"directories":{},"maintainers":[{"name":"wuhangqi25","email":"wuhangqi25@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.2.0_1770367532394_0.9044371993996905"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-05T14:08:43.160Z","modified":"2026-02-06T08:45:32.846Z","0.1.0":"2026-02-05T14:08:43.408Z","0.1.1":"2026-02-05T15:01:27.901Z","0.1.2":"2026-02-05T22:02:56.809Z","0.2.0":"2026-02-06T08:45:32.560Z"},"bugs":{"url":"https://github.com/WHQ25/agent-memory/issues"},"license":"MIT","homepage":"https://github.com/WHQ25/agent-memory#readme","repository":{"type":"git","url":"git+https://github.com/WHQ25/agent-memory.git","directory":"packages/core"},"description":"Core library for agent-memory: interfaces, sources, search, and embedding","maintainers":[{"name":"wuhangqi25","email":"wuhangqi25@gmail.com"}],"readme":"# @agent-memory/core\n\nCore library for [agent-memory](https://github.com/WHQ25/agent-memory) — long-term, cross-project memory for AI agents.\n\nProvides memory storage, hybrid search (FTS + vector), embedding, and configuration primitives.\n\n## Install\n\n```bash\nnpm install @agent-memory/core\n```\n\n## Usage\n\n```typescript\nimport { SqliteSource, getDbPath } from '@agent-memory/core';\n\nconst source = new SqliteSource(getDbPath());\nawait source.init();\n\n// Store\nconst mem = await source.add({\n  content: 'Node 22 ESM has path resolution bug in monorepo',\n  tags: ['node', 'esm'],\n});\n\n// Search (hybrid: FTS + vector)\nconst results = await source.search('ESM compatibility');\n\n// Retrieve full content\nconst [full] = await source.get([results[0].id]);\n\nawait source.close();\n```\n\n## Exports\n\n- **`SqliteSource`** — SQLite-backed memory source (FTS5 + sqlite-vec)\n- **`MemorySource`** — Interface for implementing custom sources\n- **Types** — `Memory`, `AddInput`, `UpdateInput`, `SearchOpts`, `ListOpts`, `SearchResult`, `TagCount`, `SourceStats`\n- **Embedding** — `EmbeddingProvider`, `getTransformersProvider()` (nomic-embed-text-v1.5, 768 dims, local)\n- **Search** — `searchPipeline()`, `rrfFuse()` (Reciprocal Rank Fusion)\n- **Config** — `getDbPath()`, `getConfigDir()`, `loadConfig()`, `getConfigValue()`, `setConfigValue()`\n\n## Search Pipeline\n\n```\nsearch(query)\n  ├── FTS5 keyword search (always on)\n  ├── Vector similarity search (when embeddings available)\n  └── RRF Fusion: score = Σ 1/(k + rank_i), k=60\n      → merged, deduplicated, sorted\n      → post-filter by tags/date\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}