Voice
Memory Falda
OpenClaw ContextEngine plugin backing capture/recall with the Falda four-tier memory gateway (Stream / Atoms / Scenes / Core).
Install
npm install
npm
Configuration Example
{
"plugins": {
"memory-falda": {
"faldaUrl": "http://localhost:8078",
"tenant": "default",
"recall": { "strategy": "hybrid", "maxResults": 6, "includeCore": true, "includeScenes": true },
"capture": { "enabled": true, "captureSystem": false, "captureTools": false }
}
}
}
README
# memory-falda
OpenClaw `ContextEngine` plugin that backs capture/recall with the **Falda** four-tier memory gateway (Stream / Atoms / Scenes / Core).
## Layout
- `index.ts` — root shim (`openclaw.extensions[0]`), re-exports the default plugin entry.
- `src/index.ts` — `definePluginEntry({...})` and `api.registerContextEngine("falda", factory)`.
- `src/context-engine.ts` — `FaldaContextEngine implements ContextEngine` (bootstrap / ingest / ingestBatch / assemble / afterTurn / maintain / compact / dispose).
- `src/falda-client.ts` — typed HTTP client for the gateway (`/stream/*`, `/atoms/*`, `/scenes/*`, `/core/*`, `/healthz`).
- `src/config.ts` — config normalization + JSON schema.
- `src/message-utils.ts` — `AgentMessage → FaldaMessage` projection and token estimator.
- `openclaw.plugin.json` — manifest (`kind: "memory"`, `contracts.contextEngines: ["falda"]`, full configSchema).
- `scripts/smoke.mjs` — end-to-end smoke test against a live local gateway.
## Build
```bash
npm install
npm run build # → dist/index.mjs (tsup, ESM, externalizes "openclaw")
npm run typecheck # strict tsc --noEmit
npm run smoke # requires a Falda gateway at $FALDA_URL (default http://localhost:8078)
```
## Configuration (excerpt)
```jsonc
{
"plugins": {
"memory-falda": {
"faldaUrl": "http://localhost:8078",
"tenant": "default",
"recall": { "strategy": "hybrid", "maxResults": 6, "includeCore": true, "includeScenes": true },
"capture": { "enabled": true, "captureSystem": false, "captureTools": false }
}
}
}
```
## Engine contract notes
- `info.id = "falda"`, `ownsCompaction: false`, `turnMaintenanceMode: "background"`.
- `assemble` returns memory content via `systemPromptAddition` (Message has no system role on the assembled `messages[]`).
- `compact` delegates to the host via `delegateCompactionToRuntime(params)`.
- `maintain` is a no-op (`TranscriptRewriteResult { changed: false, ... }`) — distillation happens out-of-band in the gateway.
voice
Comments
Sign in to leave a comment