@chiligpt/memory
v0.1.0
Published
Persistent agent memory system — storage-adapter-agnostic, LLM-provider-agnostic
Readme
@chili/memory
Persistent agent memory system — storage-adapter-agnostic, LLM-provider-agnostic.
Usage
import { MemoryService, JsonlMemoryStorage } from "@chili/memory";
const service = new MemoryService({
storage: new JsonlMemoryStorage("~/.my-app/memory"),
complete: async (messages, opts) => myLLMClient.complete(messages, opts),
cwd: process.cwd(),
sessionId: generateSessionId(),
});
const { systemPromptAppend } = await service.init();Storage Adapters
| Import | Description |
|---|---|
| @chili/memory | JsonlMemoryStorage, InMemoryStorage |
| @chili/memory/storage/jsonl | JsonlMemoryStorage directly |
| @chili/memory/storage/in-memory | InMemoryStorage directly |
Requirements
Node.js ≥ 19 (for globalThis.crypto.randomUUID()).
