{"_id":"@0xkobold/pi-learn","_rev":"7-2f5d5d765ba75041b831000624d7705b","name":"@0xkobold/pi-learn","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@0xkobold/pi-learn","version":"0.1.0","keywords":["pi-package","memory","agent","honcho","learning"],"author":{"name":"Moikapy","email":"moikapy@devmoi.com"},"license":"MIT","_id":"@0xkobold/pi-learn@0.1.0","maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"pi":{"image":"https://ollama.com/public/ollama.png","extensions":["./dist/index.js"]},"dist":{"shasum":"e9938bfb34983da53ccea9f2a87b4d7621e0e8de","tarball":"https://registry.npmjs.org/@0xkobold/pi-learn/-/pi-learn-0.1.0.tgz","fileCount":42,"integrity":"sha512-0BjRHigg0oMMDvQET9OUYK5Hb4Xz3HDlMrHOT1mLUShmWBwC1h9nUpqUmnXWLnGufiAzC2suYadRR0w0BLgd6Q==","signatures":[{"sig":"MEQCIAdm/tlesQWXUgUZ2+hoPIHMg4nohr5tjBj+Vg/AZmRhAiBqBkmcK5avvH3sOFqPdXFbT8LN3rgw6HQYhuNL4kFRJA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":319390},"main":"dist/index.js","types":"dist/index.d.ts","vitest":{"exclude":["node_modules","dist"],"include":["tests/**/*.test.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./shared":{"types":"./dist/shared.d.ts","import":"./dist/shared.js"},"./renderers":{"types":"./dist/renderers.d.ts","import":"./dist/renderers.js"}},"gitHead":"ac197a53258e0a0df4f5164e8d0182155554a7a5","scripts":{"dev":"tsc --watch","test":"vitest","build":"tsc","test:run":"vitest run"},"_npmUser":{"name":"moikapy","email":"warrenckhan@gmail.com"},"_npmVersion":"10.9.2","description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"better-sqlite3":"^12.8.0","@0xkobold/pi-ollama":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","typescript":"^5.9.3","@types/node":"^25.5.0","@sinclair/typebox":"^0.34.48","@mariozechner/pi-tui":"^0.62.0","@mariozechner/pi-coding-agent":"^0.62.0"},"peerDependencies":{"@sinclair/typebox":">=0.32.0","@mariozechner/pi-coding-agent":">=0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-learn_0.1.0_1774312313654_0.011740875822628727","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@0xkobold/pi-learn","version":"0.2.0","keywords":["pi-package","memory","agent","honcho","learning"],"author":{"name":"Warren Gates","email":"wbgates@gmail.com"},"license":"MIT","_id":"@0xkobold/pi-learn@0.2.0","maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"pi":{"image":"https://ollama.com/public/ollama.png","extensions":["./dist/index.js"]},"dist":{"shasum":"7b4a6d6151dcb5f0244808cce057218d3b158cfc","tarball":"https://registry.npmjs.org/@0xkobold/pi-learn/-/pi-learn-0.2.0.tgz","fileCount":42,"integrity":"sha512-U7fjuYwm77SmG6WujghZ+hZZz2Ni2lM2NlzuGpOFsgL7DDlmmM2CliFUQMEi8B8oRXrwgDlzbZoDOs4yu8/7Lg==","signatures":[{"sig":"MEQCIFwLfX7+2bDMcxVA3+zX/ndmtYmbufqRCLlTQvqOZEySAiAzQ+DDYg1gUTKWF8QeeIgzHcYj+AM2KJxq8a0+SpkxIg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":321738},"main":"dist/index.js","types":"dist/index.d.ts","vitest":{"exclude":["node_modules","dist"],"include":["tests/**/*.test.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./shared":{"types":"./dist/shared.d.ts","import":"./dist/shared.js"},"./renderers":{"types":"./dist/renderers.d.ts","import":"./dist/renderers.js"}},"gitHead":"bd78222a910e8e7aab67360288a9591b5f6b87e6","scripts":{"dev":"tsc --watch","test":"vitest","build":"tsc","test:run":"vitest run"},"_npmUser":{"name":"moikapy","email":"warrenckhan@gmail.com"},"_npmVersion":"9.2.0","description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","directories":{},"_nodeVersion":"20.19.2","dependencies":{"@0xkobold/pi-ollama":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","bun-types":"^1.3.11","typescript":"^5.9.3","@types/node":"^25.5.0","@sinclair/typebox":"^0.34.48","@mariozechner/pi-tui":"^0.62.0","@mariozechner/pi-coding-agent":"^0.62.0"},"peerDependencies":{"@sinclair/typebox":">=0.32.0","@mariozechner/pi-coding-agent":">=0.62.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-learn_0.2.0_1774324304806_0.6945109438498882","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@0xkobold/pi-learn","version":"0.2.1","keywords":["pi-package","memory","agent","honcho","learning"],"author":{"name":"Warren Gates","email":"wbgates@gmail.com"},"license":"MIT","_id":"@0xkobold/pi-learn@0.2.1","maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"pi":{"image":"https://ollama.com/public/ollama.png","extensions":["./dist/index.js"]},"dist":{"shasum":"85aa01456008b5c77916268b05e119097c7b8e75","tarball":"https://registry.npmjs.org/@0xkobold/pi-learn/-/pi-learn-0.2.1.tgz","fileCount":42,"integrity":"sha512-Yk/OMvcSE1KgyrorGChU+1AiRJiZ99syACXUMDj8wcSuZZCGWrRmSJ+l0pLsTQRoxwE1+vGLjKINseTRH1Z7Qw==","signatures":[{"sig":"MEQCICabD9Ucw9+MsUxa+bG6edLoueioh07vBZ4O5Zarlt1SAiAe74lyhdZjbvrMhxTWQ1Bifpum57iBNHY2/z+cWM47rw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":335681},"main":"dist/index.js","types":"dist/index.d.ts","vitest":{"exclude":["node_modules","dist"],"include":["tests/**/*.test.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./shared":{"types":"./dist/shared.d.ts","import":"./dist/shared.js"},"./renderers":{"types":"./dist/renderers.d.ts","import":"./dist/renderers.js"}},"gitHead":"f14da23383123fe65d367d5224f3a9636ae4f217","scripts":{"dev":"tsc --watch","test":"vitest","build":"tsc","test:run":"vitest run"},"_npmUser":{"name":"moikapy","email":"warrenckhan@gmail.com"},"_npmVersion":"9.2.0","description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","directories":{},"_nodeVersion":"20.19.2","dependencies":{"sql.js":"^1.14.1","@0xkobold/pi-ollama":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","bun-types":"^1.3.11","typescript":"^5.9.3","@types/node":"^25.5.0","@types/sql.js":"^1.4.10","@sinclair/typebox":"^0.34.48","@mariozechner/pi-tui":"^0.62.0","@mariozechner/pi-coding-agent":"^0.62.0"},"peerDependencies":{"@sinclair/typebox":">=0.32.0","@mariozechner/pi-coding-agent":">=0.62.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-learn_0.2.1_1774369568160_0.16869513589954876","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@0xkobold/pi-learn","version":"0.2.2","keywords":["pi-package","memory","agent","honcho","learning"],"author":{"name":"Warren Gates","email":"wbgates@gmail.com"},"license":"MIT","_id":"@0xkobold/pi-learn@0.2.2","maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"homepage":"https://github.com/0xKobold/pi-learn#readme","bugs":{"url":"https://github.com/0xKobold/pi-learn/issues"},"pi":{"image":"https://ollama.com/public/ollama.png","extensions":["./dist/index.mjs"]},"dist":{"shasum":"f20b8b55c64444ccd04820bfbf1ee1df773eb334","tarball":"https://registry.npmjs.org/@0xkobold/pi-learn/-/pi-learn-0.2.2.tgz","fileCount":36,"integrity":"sha512-30rbtbPSvZDckHp69EmWM6GS5vZtnE7W2kjRyPVdXVlk+mn4pzTK7k9S1Z5KbPkcLhP0o2uLZ2h637W0gX2XeQ==","signatures":[{"sig":"MEUCIQCowLy44h3tQ+L8ipKPpizOKlc5e3CCvCTpzOCVrQuR/AIgdC+9EfF2Onwfy1A24+aWxpvWTVtyOyzgAe1xUqHDu6o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":488198},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","vitest":{"exclude":["node_modules","dist","tests/hybrid-integration.test.mjs"],"include":["tests/**/*.test.ts"],"coverage":{"enabled":false}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./shared":{"types":"./dist/shared.d.ts","import":"./dist/shared.js"},"./renderers":{"types":"./dist/renderers.d.ts","import":"./dist/renderers.js"}},"gitHead":"65309ee99cd6bb36d78c26825a7852c18b7fe254","scripts":{"dev":"tsc --watch","test":"vitest run tests/fast-e2e.test.ts","build":"tsc && node build-extension.js","test:all":"vitest run tests/fast-e2e.test.ts tests/hybrid.test.ts tests/renderers.test.ts tests/shared.test.ts tests/store.test.ts tests/store.unit.test.ts","build:tsc":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"moikapy","email":"warrenckhan@gmail.com"},"repository":{"url":"git+https://github.com/0xKobold/pi-learn.git","type":"git"},"_npmVersion":"9.2.0","description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","directories":{},"_nodeVersion":"20.19.2","dependencies":{"sql.js":"^1.14.1","@0xkobold/pi-ollama":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","esbuild":"^0.24.2","bun-types":"^1.3.11","typescript":"^5.9.3","@types/node":"^25.5.0","@types/sql.js":"^1.4.11","@sinclair/typebox":"^0.34.48","@mariozechner/pi-tui":"^0.62.0","@mariozechner/pi-coding-agent":"^0.62.0"},"peerDependencies":{"ollama":">=0.6.0","@sinclair/typebox":">=0.32.0","@mariozechner/pi-coding-agent":">=0.62.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-learn_0.2.2_1775237828210_0.7271512691645776","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@0xkobold/pi-learn","version":"0.2.3","keywords":["pi-package","memory","agent","honcho","learning"],"author":{"name":"Warren Gates","email":"wbgates@gmail.com"},"license":"MIT","_id":"@0xkobold/pi-learn@0.2.3","maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"homepage":"https://github.com/0xKobold/pi-learn#readme","bugs":{"url":"https://github.com/0xKobold/pi-learn/issues"},"pi":{"image":"https://ollama.com/public/ollama.png","extensions":["./dist/index.mjs"]},"dist":{"shasum":"9674e0299498fc1c3cd71ecd4fe6b5acfbe3f155","tarball":"https://registry.npmjs.org/@0xkobold/pi-learn/-/pi-learn-0.2.3.tgz","fileCount":57,"integrity":"sha512-Sh3jVYYtI8vmtYlG7EuYAWMoi6L5ZlB380MAFt3jdZXELbKQSMxBADsP/CevX5uJ9I9k3HKtga7pv+xQloCfuA==","signatures":[{"sig":"MEUCIHEVD8GFwAEUg/gLrOArxOqEdkv6668jkV6qdKZysaRtAiEAzty02OHU1YxmnQ/arbzzBBLAfCWO0YMSf04YhuYtgs8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":582561},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","vitest":{"exclude":["node_modules","dist","tests/hybrid-integration.test.mjs"],"include":["tests/**/*.test.ts"],"coverage":{"enabled":false}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./shared":{"types":"./dist/shared.d.ts","import":"./dist/shared.js"},"./renderers":{"types":"./dist/renderers.d.ts","import":"./dist/renderers.js"}},"gitHead":"8cb5a7e5649e83e6f45063e4e3c2cbc349e7e207","scripts":{"dev":"tsc --watch","test":"vitest run tests/fast-e2e.test.ts","build":"tsc && node build-extension.js","test:all":"vitest run tests/fast-e2e.test.ts tests/hybrid.test.ts tests/renderers.test.ts tests/shared.test.ts tests/store.test.ts tests/store.unit.test.ts","build:tsc":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"moikapy","email":"warrenckhan@gmail.com"},"repository":{"url":"git+https://github.com/0xKobold/pi-learn.git","type":"git"},"_npmVersion":"9.2.0","description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","directories":{},"_nodeVersion":"20.19.2","dependencies":{"sql.js":"^1.14.1","@0xkobold/pi-ollama":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","esbuild":"^0.24.2","bun-types":"^1.3.11","typescript":"^5.9.3","@types/node":"^25.5.0","@types/sql.js":"^1.4.11","@sinclair/typebox":"^0.34.48","@mariozechner/pi-tui":"^0.62.0","@mariozechner/pi-coding-agent":"^0.62.0"},"peerDependencies":{"ollama":">=0.6.0","@sinclair/typebox":">=0.32.0","@mariozechner/pi-coding-agent":">=0.62.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-learn_0.2.3_1775441714862_0.867783897846226","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@0xkobold/pi-learn","version":"0.3.0","keywords":["pi-package","memory","agent","honcho","learning"],"author":{"name":"Warren Gates","email":"wbgates@gmail.com"},"license":"MIT","_id":"@0xkobold/pi-learn@0.3.0","maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"homepage":"https://github.com/0xKobold/pi-learn#readme","bugs":{"url":"https://github.com/0xKobold/pi-learn/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"74abebcef64c72751397fcac43da392d9071ba4f","tarball":"https://registry.npmjs.org/@0xkobold/pi-learn/-/pi-learn-0.3.0.tgz","fileCount":57,"integrity":"sha512-MW+9NFODnixGB17e6z/7fRmhTljL17Mn/u6cCqXftYJRfCX5vBcAtCh3i+zIh+pBYD7j+o5EfYOSsGcv969F3g==","signatures":[{"sig":"MEUCIAgiyyp/I2NckMFcZhllrF0AIKIZfv6yKn91HNw8a9uoAiEApchJ9qlKWJJuDaJjduCDIAqHrOxgVClXLKbPAzUwQIw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":582984},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","vitest":{"exclude":["node_modules","dist","tests/hybrid-integration.test.mjs"],"include":["tests/**/*.test.ts"],"coverage":{"enabled":false}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./shared":{"types":"./dist/shared.d.ts","import":"./dist/shared.js"},"./renderers":{"types":"./dist/renderers.d.ts","import":"./dist/renderers.js"},"./core/store":{"types":"./dist/core/store.d.ts","import":"./dist/core/store.js"},"./core/context":{"types":"./dist/core/context.d.ts","import":"./dist/core/context.js"},"./core/reasoning":{"types":"./dist/core/reasoning.d.ts","import":"./dist/core/reasoning.js"}},"gitHead":"231b21192f631aecba0b2a82ea9068f3dcca0121","scripts":{"dev":"tsc --watch","test":"vitest run tests/fast-e2e.test.ts","build":"tsc && node build-extension.js","test:all":"vitest run tests/fast-e2e.test.ts tests/hybrid.test.ts tests/renderers.test.ts tests/shared.test.ts tests/store.test.ts tests/store.unit.test.ts","build:tsc":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"moikapy","email":"warrenckhan@gmail.com"},"repository":{"url":"git+https://github.com/0xKobold/pi-learn.git","type":"git"},"_npmVersion":"11.6.2","description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","directories":{},"_nodeVersion":"25.1.0","dependencies":{"sql.js":"^1.14.1","@0xkobold/pi-ollama":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","esbuild":"^0.28.0","bun-types":"^1.3.11","typescript":"^5.9.3","@types/node":"^25.5.0","@types/sql.js":"^1.4.11","@sinclair/typebox":"^0.34.48","@mariozechner/pi-tui":"^0.62.0","@mariozechner/pi-coding-agent":"^0.62.0"},"peerDependencies":{"ollama":">=0.6.0","@sinclair/typebox":">=0.32.0","@mariozechner/pi-coding-agent":">=0.62.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-learn_0.3.0_1775588818077_0.31041494564280403","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@0xkobold/pi-learn","version":"0.4.0","description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","keywords":["pi-package","memory","agent","honcho","learning"],"author":{"name":"Warren Gates","email":"wbgates@gmail.com"},"license":"MIT","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./shared":{"import":"./dist/shared.js","types":"./dist/shared.d.ts"},"./renderers":{"import":"./dist/renderers.js","types":"./dist/renderers.d.ts"},"./core/store":{"import":"./dist/core/store.js","types":"./dist/core/store.d.ts"},"./core/reasoning":{"import":"./dist/core/reasoning.js","types":"./dist/core/reasoning.d.ts"},"./core/context":{"import":"./dist/core/context.js","types":"./dist/core/context.d.ts"}},"scripts":{"build":"tsc && node build-extension.js","build:tsc":"tsc","dev":"tsc --watch","test":"vitest run tests/fast-e2e.test.ts","test:all":"vitest run tests/fast-e2e.test.ts tests/hybrid.test.ts tests/renderers.test.ts tests/shared.test.ts tests/store.test.ts tests/store.unit.test.ts","test:watch":"vitest","prepublishOnly":"npm run build"},"pi":{"extensions":["./dist/index.js"]},"peerDependencies":{"@mariozechner/pi-coding-agent":">=0.62.0","@sinclair/typebox":">=0.32.0","ollama":">=0.6.0"},"repository":{"type":"git","url":"git+https://github.com/0xKobold/pi-learn.git"},"bugs":{"url":"https://github.com/0xKobold/pi-learn/issues"},"homepage":"https://github.com/0xKobold/pi-learn#readme","dependencies":{"@0xkobold/pi-ollama":"^0.2.0","sql.js":"^1.14.1"},"devDependencies":{"@mariozechner/pi-coding-agent":"^0.62.0","@mariozechner/pi-tui":"^0.62.0","@sinclair/typebox":"^0.34.48","@types/node":"^25.5.0","@types/sql.js":"^1.4.11","bun-types":"^1.3.11","esbuild":"^0.28.0","typescript":"^5.9.3","vitest":"^4.1.1"},"vitest":{"include":["tests/**/*.test.ts"],"exclude":["node_modules","dist","tests/hybrid-integration.test.mjs"],"coverage":{"enabled":false}},"gitHead":"fe6eac4b5075fef371ed553f69160fab7124b018","_id":"@0xkobold/pi-learn@0.4.0","_nodeVersion":"25.1.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-r1KyH7cpUXh2+pr8gioUO4pq4n0CvL7DPHxnYPRwlZRItjFTw5Pbl+dML8onNzP9BgzvnJDP1uyURSZqpve4Zw==","shasum":"b4986e4df4f67f6978bcf26f23239fe886315320","tarball":"https://registry.npmjs.org/@0xkobold/pi-learn/-/pi-learn-0.4.0.tgz","fileCount":57,"unpackedSize":622289,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDhhjEpN0HP3qo/UPGbrH/oMsylr4jYTZp+QrIz6IMyLgIgJj/zElepdhL2tI+eoCaCJgzTZ8xMK+R927cMuRYV3dY="}]},"_npmUser":{"name":"moikapy","email":"warrenckhan@gmail.com"},"directories":{},"maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-learn_0.4.0_1775709714232_0.2775261317857778"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-24T00:31:53.564Z","modified":"2026-04-09T04:41:54.543Z","0.1.0":"2026-03-24T00:31:53.820Z","0.2.0":"2026-03-24T03:51:44.941Z","0.2.1":"2026-03-24T16:26:08.296Z","0.2.2":"2026-04-03T17:37:08.414Z","0.2.3":"2026-04-06T02:15:15.040Z","0.3.0":"2026-04-07T19:06:58.228Z","0.4.0":"2026-04-09T04:41:54.382Z"},"bugs":{"url":"https://github.com/0xKobold/pi-learn/issues"},"author":{"name":"Warren Gates","email":"wbgates@gmail.com"},"license":"MIT","homepage":"https://github.com/0xKobold/pi-learn#readme","keywords":["pi-package","memory","agent","honcho","learning"],"repository":{"type":"git","url":"git+https://github.com/0xKobold/pi-learn.git"},"description":"Open-source memory infrastructure for pi agents - inspired by Honcho. Provides peer representations, reasoning, and context assembly for stateful AI agents.","maintainers":[{"name":"moikapy","email":"warrenckhan@gmail.com"}],"readme":"# @0xkobold/pi-learn\n\nOpen-source memory infrastructure for [pi](https://pi.dev) agents, inspired by [Honcho](https://honcho.dev).\n\nPart of the [0xKobold](https://github.com/0xKobold) ecosystem.\n\n## Installation\n\n### Bundled (recommended)\n\n```bash\npi install npm:@0xkobold/pi-kobold\n# pi-learn loaded as sub-extension automatically\n```\n\n### Standalone\n\n```bash\npi install npm:@0xkobold/pi-learn\n\n# Or in pi-config.ts\n{\n  extensions: [\n    'npm:@0xkobold/pi-learn'\n  ]\n}\n\n# Or temporary (testing)\npi -e npm:@0xkobold/pi-learn\n```\n\n## Features\n\n- **Peer Representations**: Build rich mental models of users through reasoning\n- **LLM-Based Reasoning**: Uses Ollama for embeddings and reasoning (local or cloud)\n- **Context Assembly**: Retrieves relevant context for agent prompts\n- **Vector Search**: Semantic similarity search using embeddings with keyword fallback\n- **Dreaming**: Background/creative reasoning synthesis\n- **Observation Bridge**: Unprocessed observations automatically flow into reasoning pipeline\n- **Session Summarization**: Auto-generates short and long summaries at message thresholds\n- **Retention Policies**: Automatic data pruning\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                        Pi-Learn                             │\n├─────────────────────────────────────────────────────────────┤\n│  Session Events    │  SQLiteStore   │  Reasoning Engine   │\n│  ────────────────  │  ─────────────  │  ────────────────  │\n│  • session_start   │  • Workspaces   │  • Message batch    │\n│  • before_agent    │  • Peers        │  • Conclusions      │\n│  • message_end     │  • Sessions     │  • Observations     │\n│  • turn_end        │  • Messages     │  • Peer cards       │\n│                    │  • Conclusions  │  • Summaries        │\n│                    │  • Observations │  • Dreaming        │\n├─────────────────────────────────────────────────────────────┤\n│                    Ollama Integration                       │\n│  ┌─────────────────┐        ┌─────────────────────────┐  │\n│  │ Embeddings       │        │ Reasoning Model          │  │\n│  │ nomic-embed-     │        │ (configurable)          │  │\n│  │ text-v2-moe      │        │                          │  │\n│  └─────────────────┘        └─────────────────────────┘  │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Data Model\n\nInspired by Honcho's hierarchical structure:\n\n1. **Workspace**: Top-level container (isolated namespaces)\n2. **Peer**: User, agent, or entity being observed\n3. **Session**: Interaction thread between peers\n4. **Message**: Individual conversation entries\n5. **Observation**: Raw observations stored before reasoning\n6. **Conclusion**: Synthesized insights from reasoning\n7. **Representation**: Aggregated peer knowledge\n\n## Reasoning Pipeline\n\nMessages flow through a full pipeline:\n\n1. **Add message** → stored with `processed=false`\n2. **learn_reason_now** → fetches unprocessed observations, runs LLM reasoning, saves conclusions with embeddings, marks observations as processed\n3. **autoSummarize** → generates short summaries every 20 messages, long summaries every 60 messages\n4. **searchSimilar** → uses vector similarity (cosine similarity on embeddings) with keyword fallback\n\n### Conclusion Types\n\n- **Deductive**: Certain conclusions from explicit premises (90% confidence)\n- **Inductive**: Patterns observed across messages (70% confidence)\n- **Abductive**: Simplest explanations for behavior (50% confidence)\n\n## Peer Cards\n\nBiographical cache:\n\n- Name, occupation\n- Interests, traits, goals\n- Updated through reasoning or manually\n\n## Dreaming\n\nDreaming is background reasoning that synthesizes deeper insights:\n\n- Runs on a schedule (configurable interval)\n- Looks at broader patterns across sessions\n- Generates creative hypotheses about the peer\n- Can update peer cards with insights\n\n## Retention Policies\n\nAutomatic data pruning:\n\n- **Summaries**: Default 30 days retention\n- **Conclusions**: Default 90 days retention\n- **Messages**: Forever by default (configurable)\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `/learn status` | Show memory status |\n| `/learn context` | Show assembled context |\n| `/learn config` | Show configuration |\n| `/learn enable` | Enable reasoning |\n| `/learn disable` | Disable reasoning |\n| `/learn dream` | Trigger dream cycle |\n| `/learn prune` | Prune old data |\n\n## Tools (14 total)\n\n| Tool | Description |\n|------|-------------|\n| `learn_add_message` | Add a message to memory |\n| `learn_add_observation` | Store raw observation for later reasoning |\n| `learn_add_messages_batch` | Batch add multiple messages |\n| `learn_get_context` | Retrieve assembled peer context |\n| `learn_query` | Search memory with embeddings |\n| `learn_reason_now` | Trigger immediate reasoning on unprocessed observations |\n| `learn_trigger_dream` | Manually trigger dreaming |\n| `learn_get_peer_card` | Get biographical info card |\n| `learn_update_peer_card` | Update peer card manually |\n| `learn_list_peers` | List all peers in workspace |\n| `learn_get_stats` | Get memory statistics |\n| `learn_get_summaries` | Get peer summaries |\n| `learn_prune` | Trigger retention pruning |\n| `learn_search_sessions` | Search sessions by keyword |\n| `learn_get_session` | Get specific session with messages |\n| `learn_list_sessions` | List all sessions |\n| `learn_tag_session` | Tag sessions for categorization |\n\n## Configuration\n\n```json\n{\n  \"learn\": {\n    \"workspaceId\": \"default\",\n    \"reasoningEnabled\": true,\n    \"reasoningModel\": \"kimi-k2.5:cloud\",\n    \"embeddingModel\": \"nomic-embed-text-v2-moe:latest\",\n    \"tokenBatchSize\": 1000,\n    \"dream\": {\n      \"enabled\": true,\n      \"intervalMs\": 3600000,\n      \"minMessagesSinceLastDream\": 5,\n      \"batchSize\": 50\n    },\n    \"retention\": {\n      \"summaryRetentionDays\": 30,\n      \"conclusionRetentionDays\": 90,\n      \"retentionDays\": 0\n    }\n  },\n  \"ollama\": {\n    \"apiKey\": \"your-api-key\"\n  }\n}\n```\n\nEnvironment variables:\n\n- `LEARN_REASONING_MODEL` - Override reasoning model\n- `LEARN_EMBEDDING_MODEL` - Override embedding model\n- `LEARN_TOKEN_BATCH_SIZE` - Override token batch size\n- `OLLAMA_API_KEY` - Override Ollama API key\n\n## API Functions\n\nLibrary functions are importable for programmatic use:\n\n```typescript\n// Core modules\nimport { SQLiteStore } from \"@0xkobold/pi-learn/core/store\";\nimport { ReasoningEngine, type ReasonedConclusion } from \"@0xkobold/pi-learn/core/reasoning\";\nimport { ContextAssembler } from \"@0xkobold/pi-learn/core/context\";\n\n// Shared types and utilities\nimport { cosineSimilarity, GLOBAL_WORKSPACE_ID } from \"@0xkobold/pi-learn/shared\";\n\n// CLI renderers\nimport { renderStats, renderPeerCard } from \"@0xkobold/pi-learn/renderers\";\n\n// Use vector search\nconst store = new SQLiteStore(dbPath);\nconst results = await store.searchSimilar(workspaceId, peerId, \"query text\", 10);\n\n// Manual reasoning\nconst reasoningEngine = new ReasoningEngine(ollama, model);\nconst conclusions = await reasoningEngine.reasonOnObservations(workspaceId, peerId, observations);\n\n// Auto-summarize at thresholds\nconst assembler = new ContextAssembler(store, ollama, model);\nawait assembler.autoSummarize(workspaceId, peerId, reasoningEngine);\n```\n\n## Local Storage\n\nData is stored in SQLite at `~/.pi/memory/pi-learn.db`:\n\n```sql\n-- Tables\nworkspaces, peers, sessions, messages,\nobservations, conclusions, summaries, peer_cards\n\n-- Indexes for performance\nidx_conclusions_peer, idx_conclusions_created,\nidx_summaries_peer, idx_messages_session\n```\n\n## Ollama Requirements\n\nPi-learn requires Ollama running locally or via cloud:\n\n- **Embeddings**: `nomic-embed-text-v2-moe:latest` (required for semantic search)\n- **Reasoning**: Any Ollama chat model (default: `kimi-k2.5:cloud`)\n\n```bash\n# Pull required models\nollama pull nomic-embed-text-v2-moe:latest\n\n# Pull your preferred reasoning model\nollama pull kimi-k2.5:cloud\n```\n\n## Related Packages\n\n- [`@0xkobold/pi-kobold`](https://github.com/0xKobold/pi-kobold) — Meta-extension that bundles this and other sub-extensions\n- [`@0xkobold/pi-ollama`](https://github.com/0xKobold/pi-ollama) — Ollama integration for pi agents\n- [`@0xkobold/pi-persona`](https://github.com/0xKobold/pi-persona) — Scope-aware persona management\n\n## Local Development\n\n```bash\ngit clone https://github.com/0xKobold/pi-learn\ncd pi-learn\nnpm install\nnpm run build\npi install ./\n```\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md) for version history.\n\n## License\n\nMIT","readmeFilename":"README.md"}