@byte5ai/palaia 2.3.5 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -122,7 +122,7 @@ OpenClaw Agent
122
122
 
123
123
  ```bash
124
124
  # Clone the repo
125
- git clone https://github.com/iret77/palaia.git
125
+ git clone https://github.com/byte5ai/palaia.git
126
126
  cd palaia/packages/openclaw-plugin
127
127
 
128
128
  # Install deps
package/index.ts CHANGED
@@ -4,16 +4,20 @@
4
4
  * Plugin entry point. Loaded by OpenClaw via jiti (no build step needed).
5
5
  *
6
6
  * Registers:
7
- * - memory_search: Semantic search over Palaia memory
8
- * - memory_get: Read a specific memory entry
9
- * - memory_write: Write new entries (optional, opt-in)
10
- * - before_prompt_build: Query-based contextual recall (opt-in, Issue #65)
11
- * - agent_end: Auto-capture of significant exchanges (opt-in, Issue #64)
12
- * - palaia-recovery: WAL replay on startup
7
+ * - Tools: memory_search, memory_get, memory_write
8
+ * - MemoryPromptSection: Guided tool usage hints
9
+ * - Session hooks (always): session_start, session_end, before_reset,
10
+ * llm_input, llm_output, after_tool_call, subagent_spawning, subagent_ended
11
+ * - ContextEngine (modern) OR legacy hooks (before_prompt_build, agent_end,
12
+ * message_received, message_sending)
13
13
  *
14
- * Phase 1.5: ContextEngine adapter support. When the host provides
15
- * api.registerContextEngine, palaia registers as a ContextEngine.
16
- * Otherwise, falls back to legacy hook-based integration.
14
+ * v3.0 Features:
15
+ * - Session continuity: Auto-briefing on session start / LLM switch
16
+ * - Session summaries: Auto-saved on session end / reset
17
+ * - Tool observations: Tracked via after_tool_call
18
+ * - Progressive disclosure: Compact mode for large memory stores
19
+ * - Privacy markers: <private> blocks excluded from capture
20
+ * - Recency boost: Fresh memories ranked higher
17
21
  *
18
22
  * Activation:
19
23
  * plugins: { slots: { memory: "palaia" } }
@@ -22,6 +26,7 @@
22
26
  import { resolveConfig, type PalaiaPluginConfig } from "./src/config.js";
23
27
  import { registerTools } from "./src/tools.js";
24
28
  import { registerHooks } from "./src/hooks/index.js";
29
+ import { registerSessionHooks } from "./src/hooks/session.js";
25
30
  import { createPalaiaContextEngine } from "./src/context-engine.js";
26
31
  import type { OpenClawPluginApi, OpenClawPluginEntry } from "./src/types.js";
27
32
 
@@ -29,14 +34,12 @@ import type { OpenClawPluginApi, OpenClawPluginEntry } from "./src/types.js";
29
34
  const palaiaPlugin: OpenClawPluginEntry = {
30
35
  id: "palaia",
31
36
  name: "Palaia Memory",
32
- async register(api: OpenClawPluginApi) {
33
- // Issue #66: Plugin config is currently resolved GLOBALLY via api.getConfig("palaia").
37
+ register(api: OpenClawPluginApi) {
38
+ // Issue #66: Plugin config is resolved GLOBALLY via api.pluginConfig.
34
39
  // OpenClaw does NOT provide per-agent config resolution — all agents share the same
35
- // plugin config from openclaw.json → plugins.config.palaia.
36
- // A per-agent resolver would require an OpenClaw upstream change where api.getConfig()
37
- // accepts an agentId parameter or automatically scopes to the current agent context.
38
- // See: https://github.com/iret77/palaia/issues/66
39
- const rawConfig = api.getConfig?.("palaia") as
40
+ // plugin config from openclaw.json → plugins.entries.palaia.config.
41
+ // See: https://github.com/byte5ai/palaia/issues/66
42
+ const rawConfig = api.pluginConfig as
40
43
  | Partial<PalaiaPluginConfig>
41
44
  | undefined;
42
45
  const config = resolveConfig(rawConfig);
@@ -51,9 +54,31 @@ const palaiaPlugin: OpenClawPluginEntry = {
51
54
  // Register agent tools (memory_search, memory_get, memory_write)
52
55
  registerTools(api, config);
53
56
 
57
+ // Register MemoryPromptSection for guided memory tool usage (v3.0)
58
+ if (api.registerMemoryPromptSection) {
59
+ api.registerMemoryPromptSection(({ availableTools }) => {
60
+ const lines: string[] = [];
61
+ if (availableTools.has("memory_search")) {
62
+ lines.push("Use `memory_search` to find relevant memories by semantic query.");
63
+ }
64
+ if (availableTools.has("memory_get")) {
65
+ lines.push("Use `memory_get <id>` to retrieve full memory details by ID.");
66
+ }
67
+ if (availableTools.has("memory_write")) {
68
+ lines.push("Use `memory_write` for processes/SOPs and tasks only — conversation knowledge is auto-captured.");
69
+ }
70
+ return lines;
71
+ });
72
+ }
73
+
74
+ // Session lifecycle hooks are always registered (session_start, session_end,
75
+ // before_reset, llm_input, llm_output, after_tool_call).
76
+ // These work independently of the ContextEngine vs legacy hooks choice.
77
+ registerSessionHooks(api, config);
78
+
54
79
  // Register ContextEngine when available, otherwise use legacy hooks
55
80
  if (api.registerContextEngine) {
56
- api.registerContextEngine("palaia", createPalaiaContextEngine(api, config));
81
+ api.registerContextEngine("palaia", () => createPalaiaContextEngine(api, config));
57
82
  } else {
58
83
  registerHooks(api, config); // Legacy fallback
59
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byte5ai/palaia",
3
- "version": "2.3.5",
3
+ "version": "2.5.1",
4
4
  "description": "Palaia memory backend for OpenClaw",
5
5
  "main": "index.ts",
6
6
  "openclaw": {
@@ -25,7 +25,7 @@
25
25
  "license": "MIT",
26
26
  "repository": {
27
27
  "type": "git",
28
- "url": "https://github.com/iret77/palaia.git",
28
+ "url": "https://github.com/byte5ai/palaia.git",
29
29
  "directory": "packages/openclaw-plugin"
30
30
  },
31
31
  "peerDependencies": {
package/skill/SKILL.md CHANGED
@@ -1,14 +1,143 @@
1
1
  ---
2
2
  name: palaia
3
- version: "2.2.0"
3
+ version: "2.5.1"
4
4
  description: >
5
5
  Local, crash-safe persistent memory for OpenClaw agents.
6
6
  SQLite-backed by default. Semantic search, projects, scopes, auto-capture.
7
+ After installing or updating, run: palaia doctor --fix to complete setup.
8
+ metadata:
9
+ openclaw:
10
+ emoji: "\U0001F9E0"
11
+ requires:
12
+ bins: ["palaia"]
13
+ install:
14
+ - id: pip
15
+ kind: pip
16
+ package: "palaia[fastembed]"
17
+ bins: ["palaia"]
18
+ label: "Install Palaia with semantic search (pip)"
19
+ postInstall:
20
+ - command: "palaia init"
21
+ label: "Initialize Palaia store"
22
+ - command: "npm install -g @byte5ai/palaia@latest"
23
+ label: "Install OpenClaw plugin (npm)"
24
+ postUpdate:
25
+ - command: "python3 -m pip install --upgrade 'palaia[fastembed]' && (npm install -g @byte5ai/palaia@latest 2>/dev/null || true) && palaia doctor --fix && palaia warmup"
26
+ label: "Upgrade Palaia with semantic search (pip + npm plugin) and run health checks"
27
+ postUpdateMessage: >
28
+ Palaia has been updated to v2.5. New: agent isolation mode (--isolated), modern CLI
29
+ design, backup-restore auto-fix. Run `palaia doctor --fix` to upgrade.
30
+ plugin:
31
+ slot: memory
32
+ package: "@byte5ai/palaia"
7
33
  ---
8
34
 
9
- # Palaia v2.2 — Agent Memory (Plugin)
35
+ # Palaia v2.4 — Agent Memory Skill
10
36
 
11
- Palaia is your memory system. It gives you persistent, searchable, crash-safe memory across sessions. Palaia is already installed and configured via the OpenClaw plugin — just use the commands below.
37
+ Palaia is the memory system for OpenClaw agents. It gives you persistent, searchable, crash-safe memory across sessions. You don't need to understand how it works — just use the commands below.
38
+
39
+ <!-- begin:install -->
40
+ ## First-Time Setup
41
+
42
+ When a user asks you to "set up palaia", "enable memory", or "remember things across sessions", run these steps:
43
+
44
+ ```bash
45
+ pip install "palaia[fastembed]"
46
+ ```
47
+
48
+ ```bash
49
+ palaia init
50
+ ```
51
+
52
+ This creates `.palaia/` with SQLite storage and automatically configures fastembed for semantic search. No manual configuration needed.
53
+
54
+ Confirm success to the user: "Memory is ready. I'll automatically remember important context from our conversations."
55
+
56
+ If `pip` is not available, try alternatives in this order:
57
+ ```bash
58
+ python3 -m pip install "palaia[fastembed]"
59
+ uv tool install "palaia[fastembed]"
60
+ pipx install "palaia[fastembed]"
61
+ ```
62
+
63
+ Optional extras (install as needed):
64
+ ```bash
65
+ pip install "palaia[mcp]" # MCP server for Claude Desktop, Cursor
66
+ pip install "palaia[curate]" # Knowledge curation
67
+ ```
68
+
69
+ Note: `palaia[fastembed]` already includes sqlite-vec for native SIMD vector search. No separate install needed.
70
+
71
+ ### OpenClaw Plugin Setup (for Auto-Capture and Auto-Recall)
72
+
73
+ After the CLI is installed, wire it into OpenClaw:
74
+
75
+ ```bash
76
+ npm install -g @byte5ai/palaia@latest
77
+ ```
78
+
79
+ Then activate in OpenClaw config (read existing values first, never overwrite arrays):
80
+ ```bash
81
+ PALAIA_PATH="$(npm root -g)/@byte5ai/palaia"
82
+ ```
83
+
84
+ Add to `openclaw.json`:
85
+ ```json
86
+ {
87
+ "plugins": {
88
+ "load": { "paths": ["<PALAIA_PATH>"] },
89
+ "allow": ["..existing..", "palaia"],
90
+ "slots": { "memory": "palaia" },
91
+ "entries": { "palaia": { "enabled": true } }
92
+ }
93
+ }
94
+ ```
95
+
96
+ Restart the gateway and verify:
97
+ ```bash
98
+ openclaw gateway restart
99
+ palaia doctor
100
+ ```
101
+
102
+ ### Agent Identity (optional)
103
+
104
+ Single-agent systems work with the default name. For multi-agent setups:
105
+ ```bash
106
+ palaia init --agent YOUR_AGENT_NAME
107
+ ```
108
+
109
+ ## Updating Palaia
110
+
111
+ When the user asks to update, or when `palaia status` shows a version mismatch:
112
+
113
+ ```bash
114
+ palaia upgrade
115
+ ```
116
+ This auto-detects the install method (pip/uv/pipx), preserves all installed extras (fastembed, mcp, sqlite-vec, curate), runs `palaia doctor --fix`, and upgrades the OpenClaw plugin if installed. No manual steps needed.
117
+
118
+ **If `palaia upgrade` is not recognized** (versions before v2.3.0), update manually:
119
+
120
+ ```bash
121
+ # Step 1: Find install method
122
+ which palaia
123
+
124
+ # Step 2: Upgrade (use the method matching the path from Step 1)
125
+ # pip (path contains site-packages or .local):
126
+ pip install --upgrade "palaia[fastembed]"
127
+ # uv (path contains uv):
128
+ uv tool install "palaia[fastembed]"
129
+ # pipx (path contains pipx):
130
+ pipx install "palaia[fastembed]" --force
131
+
132
+ # Step 3: Health check + migration
133
+ palaia doctor --fix
134
+
135
+ # Step 4: Update OpenClaw plugin (if installed)
136
+ npm install -g @byte5ai/palaia@latest
137
+ ```
138
+
139
+ After the manual update, `palaia upgrade` will be available for future updates.
140
+ <!-- end:install -->
12
141
 
13
142
  ## Auto-Check (run every time this skill is loaded)
14
143
 
@@ -38,6 +167,100 @@ Conversations are automatically captured when the OpenClaw plugin is active. You
38
167
 
39
168
  ---
40
169
 
170
+ ## Storage & Search
171
+
172
+ ### Database Backends
173
+
174
+ | Backend | Use Case | Vector Search | Install |
175
+ |---------|----------|---------------|---------|
176
+ | **SQLite** (default) | Local, single-agent or small team | sqlite-vec (native KNN) or Python fallback | Included |
177
+ | **PostgreSQL** | Distributed teams, multiple hosts | pgvector (ANN, IVFFlat/HNSW) | `pip install 'palaia[postgres]'` |
178
+
179
+ SQLite is zero-config — `palaia init` creates a single `palaia.db` file with WAL mode for crash safety. For teams with agents on multiple machines, PostgreSQL centralizes the store:
180
+ ```bash
181
+ palaia config set database_url postgresql://user:pass@host/db
182
+ # or: export PALAIA_DATABASE_URL=postgresql://...
183
+ ```
184
+
185
+ ### Semantic Vector Search
186
+
187
+ Palaia uses **hybrid search**: BM25 keyword matching (always active) combined with semantic vector embeddings (when a provider is configured). This finds memories by meaning, not just keywords.
188
+
189
+ **Embedding providers** (checked in chain order, first available wins):
190
+
191
+ | Provider | Type | Latency | Install |
192
+ |----------|------|---------|---------|
193
+ | **fastembed** | Local (CPU) | ~10ms/query | `pip install 'palaia[fastembed]'` (default) |
194
+ | **sentence-transformers** | Local (CPU/GPU) | ~10ms/query | `pip install 'palaia[sentence-transformers]'` |
195
+ | **Ollama** | Local (server) | ~50ms/query | `ollama pull nomic-embed-text` |
196
+ | **OpenAI** | API | ~200ms/query | Set `OPENAI_API_KEY` |
197
+ | **Gemini** | API | ~200ms/query | Set `GEMINI_API_KEY` |
198
+ | **BM25** | Built-in | <1ms/query | Always available (keyword only) |
199
+
200
+ Configure the chain: `palaia config set embedding_chain '["fastembed", "bm25"]'`
201
+
202
+ Check what's available: `palaia detect`
203
+
204
+ ### Embed Server (Performance)
205
+
206
+ For fast CLI queries, palaia runs a background embed-server that keeps the model loaded in memory:
207
+ ```bash
208
+ palaia embed-server --socket --daemon # Start background server
209
+ palaia embed-server --status # Check if running
210
+ palaia embed-server --stop # Stop server
211
+ ```
212
+ Without the server, each CLI call loads the model fresh (~3-5s). With the embed-server: **~1.5s per CLI query** (Python startup + server call) or **<500ms via MCP/Plugin** (no CLI overhead).
213
+
214
+ The OpenClaw plugin starts the embed-server automatically. For CLI-only usage, it auto-starts on first query when a local provider (fastembed, sentence-transformers) is configured.
215
+
216
+ ### MCP Server (Claude Desktop, Cursor, any MCP host)
217
+
218
+ Palaia works as a standalone MCP memory server — **no OpenClaw required**. Any AI tool that supports MCP can use palaia as persistent local memory.
219
+
220
+ ```bash
221
+ pip install 'palaia[mcp]'
222
+ palaia-mcp # Start MCP server (stdio)
223
+ palaia-mcp --root /path/to/.palaia # Explicit store
224
+ palaia-mcp --read-only # No writes (untrusted hosts)
225
+ ```
226
+
227
+ **Claude Desktop** (`~/.config/claude/claude_desktop_config.json`):
228
+ ```json
229
+ {
230
+ "mcpServers": {
231
+ "palaia": {
232
+ "command": "palaia-mcp",
233
+ "args": []
234
+ }
235
+ }
236
+ }
237
+ ```
238
+
239
+ **Cursor** (Settings → MCP Servers → Add, or `.cursor/mcp.json`):
240
+ - Command: `palaia-mcp`
241
+ - Arguments: (none, or `--root /path/to/.palaia`)
242
+
243
+ **Claude Code** (`~/.claude/settings.json`):
244
+ ```json
245
+ {"mcpServers": {"palaia": {"command": "palaia-mcp"}}}
246
+ ```
247
+
248
+ **MCP Tools:**
249
+
250
+ | Tool | Purpose |
251
+ |------|---------|
252
+ | `palaia_search` | Semantic + keyword search across all memories |
253
+ | `palaia_store` | Save new memory (fact, process, task) |
254
+ | `palaia_read` | Read a specific entry by ID |
255
+ | `palaia_edit` | Update an existing entry |
256
+ | `palaia_list` | List entries by tier, type, or project |
257
+ | `palaia_status` | Show store health, entry counts, provider info |
258
+ | `palaia_gc` | Run garbage collection (tier rotation) |
259
+
260
+ **Read-only mode** (`--read-only`): Disables `palaia_store`, `palaia_edit`, `palaia_gc`. Use this when connecting untrusted AI tools that should only read memories, not modify them.
261
+
262
+ ---
263
+
41
264
  ## Commands Reference
42
265
 
43
266
  ### `palaia write` — Save structured knowledge
@@ -69,6 +292,9 @@ palaia query "what's the rate limit"
69
292
  # Filter by type and status
70
293
  palaia query "tasks" --type task --status open
71
294
 
295
+ # Filter by tags
296
+ palaia query "session-summary" --tags session-summary
297
+
72
298
  # Search within a project
73
299
  palaia query "deploy steps" --project myapp
74
300
 
@@ -103,6 +329,9 @@ palaia list
103
329
  # Filter by tier, type, status
104
330
  palaia list --tier warm --type task --status open --priority high
105
331
 
332
+ # Limit results
333
+ palaia list --type task --status open --limit 5
334
+
106
335
  # Filter by project or assignee
107
336
  palaia list --project myapp --assignee Elliot
108
337
  ```
@@ -136,7 +365,7 @@ palaia memo inbox # Check for messages
136
365
  palaia memo ack <memo-id> # Mark as read
137
366
  ```
138
367
 
139
- ### `palaia priorities` — Injection priority management
368
+ ### `palaia priorities` — Injection priority management (NEW in v2.2)
140
369
 
141
370
  Control which memories are injected into each agent's context.
142
371
 
@@ -156,7 +385,7 @@ palaia priorities set typeWeight.process 0.5 --agent orchestrator
156
385
 
157
386
  Config stored in `.palaia/priorities.json` with layered overrides: global -> per-agent -> per-project.
158
387
 
159
- ### `palaia curate analyze/apply` — Knowledge curation
388
+ ### `palaia curate analyze/apply` — Knowledge curation (NEW in v2.2)
160
389
 
161
390
  For migrating knowledge to a new instance, cleaning up old entries, or reviewing accumulated knowledge.
162
391
 
@@ -186,6 +415,8 @@ palaia sync import ./export/ --dry-run # Preview first
186
415
  palaia sync import ./export/
187
416
  ```
188
417
 
418
+ Note: The old `palaia export`/`palaia import` aliases still work but are deprecated.
419
+
189
420
  ### `palaia package export/import` — Portable knowledge packages
190
421
 
191
422
  ```bash
@@ -199,6 +430,14 @@ palaia package import myapp.palaia-pkg.json --project target --merge skip
199
430
  palaia package info myapp.palaia-pkg.json
200
431
  ```
201
432
 
433
+ ### `palaia upgrade` — Update to latest version
434
+
435
+ ```bash
436
+ palaia upgrade
437
+ ```
438
+
439
+ Auto-detects the install method (pip/uv/pipx/brew), preserves all installed extras (fastembed, mcp, sqlite-vec, curate), runs `palaia doctor --fix`, and upgrades the OpenClaw npm plugin if present. Always use this instead of manual pip commands.
440
+
202
441
  ### `palaia doctor` — Diagnostics and auto-fix
203
442
 
204
443
  ```bash
@@ -285,7 +524,7 @@ Palaia's CLI output contains contextual hints prefixed with `[palaia]`. These ar
285
524
 
286
525
  ---
287
526
 
288
- ## Multi-Agent Coordination
527
+ ## Multi-Agent Setup
289
528
 
290
529
  ### Scopes across agents
291
530
  - `private` entries are only visible to the writing agent
@@ -344,6 +583,66 @@ Distinguish sessions of the same agent:
344
583
  palaia instance set Claw-Main
345
584
  ```
346
585
 
586
+ ### Agent Isolation Mode
587
+
588
+ For focused agents (Sonnet/Codex) that should only see their own memories:
589
+
590
+ **1. Configure in `priorities.json`:**
591
+ ```json
592
+ {
593
+ "agents": {
594
+ "dev-worker": {
595
+ "scopeVisibility": ["private"],
596
+ "captureScope": "private",
597
+ "maxInjectedChars": 2000,
598
+ "recallMinScore": 0.85
599
+ }
600
+ }
601
+ }
602
+ ```
603
+ Or via CLI:
604
+ ```bash
605
+ palaia priorities set scopeVisibility private --agent dev-worker
606
+ palaia priorities set captureScope private --agent dev-worker
607
+ palaia priorities set maxInjectedChars 2000 --agent dev-worker
608
+ palaia priorities set recallMinScore 0.85 --agent dev-worker
609
+ ```
610
+
611
+ **2. Set agent identity:**
612
+ ```bash
613
+ export PALAIA_AGENT=dev-worker
614
+ ```
615
+
616
+ **3. Auto-capture stays on** (crash safety net). Cleanup happens after the work package.
617
+
618
+ **4. After accepting work:**
619
+ ```bash
620
+ palaia prune --agent dev-worker --tags auto-capture --protect-type process
621
+ ```
622
+ This removes session noise while preserving learned SOPs.
623
+
624
+ #### Pre-configured Agent Profiles
625
+
626
+ | Profile | scopeVisibility | captureScope | maxInjectedChars | recallMinScore | autoCapture |
627
+ |---------|----------------|--------------|-----------------|----------------|-------------|
628
+ | **Isolated Worker** | `["private"]` | `private` | 2000 | 0.85 | true |
629
+ | **Orchestrator** | `["private","team","public"]` | `team` | 4000 | 0.7 | true |
630
+ | **Lean Worker** | `["private"]` | `private` | 1000 | 0.9 | false |
631
+
632
+ #### Orchestrator Lifecycle (process template)
633
+
634
+ Save this as a process entry for the orchestrator to recall:
635
+ ```bash
636
+ palaia write "## Dev-Agent Lifecycle
637
+ 1. Create agent identity: export PALAIA_AGENT=dev-worker-{task-id}
638
+ 2. Configure isolation: palaia priorities set scopeVisibility private --agent dev-worker-{task-id}
639
+ 3. Configure capture: palaia priorities set captureScope private --agent dev-worker-{task-id}
640
+ 4. Assign work package via prompt
641
+ 5. After acceptance: palaia prune --agent dev-worker-{task-id} --tags auto-capture --protect-type process
642
+ 6. Verify: palaia list --agent dev-worker-{task-id} --type process
643
+ 7. Process knowledge persists for future tasks" --type process --tags workflow,orchestration --scope private
644
+ ```
645
+
347
646
  ---
348
647
 
349
648
  ## When to Use What
@@ -359,10 +658,11 @@ palaia instance set Claw-Main
359
658
  | Check system health | `palaia status` |
360
659
  | Something is wrong | `palaia doctor --fix` |
361
660
  | Clean up old entries | `palaia gc` |
661
+ | Clean up agent session noise | `palaia prune --agent NAME --tags auto-capture --protect-type process` |
362
662
  | Review accumulated knowledge | `palaia curate analyze` |
363
663
  | Share knowledge | `palaia sync export` or `palaia package export` |
364
664
  | Check for messages | `palaia memo inbox` |
365
- | Start of session | `palaia doctor` then `palaia query "active work"` then `palaia memo inbox` |
665
+ | Start of session | Session briefing is now automatic. Just run `palaia doctor` and check `palaia memo inbox`. |
366
666
 
367
667
  **Do NOT manually write:** facts, decisions, or preferences that came up in the current conversation. Auto-Capture handles these.
368
668
 
@@ -401,6 +701,33 @@ palaia init --capture-level <off|minimal|normal|aggressive>
401
701
 
402
702
  ---
403
703
 
704
+ ## Session Continuity (NEW in v2.4)
705
+
706
+ Session continuity gives agents automatic context restoration across sessions. These features work out of the box with the OpenClaw plugin -- no manual setup needed.
707
+
708
+ ### Session Briefings
709
+ On session start, Palaia automatically injects a briefing with the last session summary and any open tasks. This means agents resume work without needing to manually search for context.
710
+
711
+ ### Session Summaries
712
+ When a session ends or resets, Palaia auto-saves a summary of what happened. These are stored as entries with the `session-summary` tag and can be queried:
713
+ ```bash
714
+ palaia query "session-summary" --tags session-summary
715
+ ```
716
+
717
+ ### Privacy Markers
718
+ Wrap sensitive content in `<private>...</private>` blocks to exclude it from auto-capture. Private blocks are stripped before any extraction runs.
719
+
720
+ ### Recency Boost
721
+ Fresh memories are ranked higher in recall results. The boost factor is configurable via `recallRecencyBoost` (default `0.3`, set to `0` to disable).
722
+
723
+ ### Progressive Disclosure
724
+ When result sets exceed 100 entries, Palaia uses compact mode to keep context manageable. Use `--limit` to control result size explicitly:
725
+ ```bash
726
+ palaia list --type task --status open --limit 5
727
+ ```
728
+
729
+ ---
730
+
404
731
  ## Plugin Configuration (OpenClaw)
405
732
 
406
733
  Set in `openclaw.json` under `plugins.entries.palaia.config`:
@@ -418,6 +745,11 @@ Set in `openclaw.json` under `plugins.entries.palaia.config`:
418
745
  | `embeddingServer` | `true` | Keep embedding model loaded for fast queries |
419
746
  | `showMemorySources` | `true` | Show memory source footnotes |
420
747
  | `showCaptureConfirm` | `true` | Show capture confirmations |
748
+ | `sessionSummary` | `true` | Auto-save session summaries on end/reset |
749
+ | `sessionBriefing` | `true` | Load session context on session start |
750
+ | `sessionBriefingMaxChars` | `1500` | Max chars for session briefing injection |
751
+ | `captureToolObservations` | `true` | Track tool usage as session context |
752
+ | `recallRecencyBoost` | `0.3` | Boost factor for fresh memories (0=off) |
421
753
 
422
754
  ---
423
755
 
@@ -437,15 +769,33 @@ Set in `openclaw.json` under `plugins.entries.palaia.config`:
437
769
  | Problem | What to do |
438
770
  |---------|-----------|
439
771
  | Something is wrong | `palaia doctor --fix` first, debug second |
772
+ | `palaia init` fails | Check permissions on the directory, disk space, and Python version. Report the exact error to the user. |
440
773
  | `palaia write` fails | Run `palaia doctor --fix`, then retry. If WAL replay needed, run `palaia recover`. |
441
774
  | `palaia query` returns nothing | Try `palaia query "..." --all` to include COLD tier. Check `palaia list` to verify entries exist. |
442
775
  | Entries seem missing | `palaia recover` then `palaia list --tier cold` |
443
- | Slow queries | `palaia warmup` then check `palaia detect` |
776
+ | Slow queries | `pip install 'palaia[sqlite-vec]'` for native vector search, then `palaia warmup`. Check `palaia detect` and `palaia status` |
444
777
  | Provider not available | Chain auto-falls back. Check `palaia status` |
778
+ | `.palaia` missing | `palaia init` |
445
779
  | Embedding provider unavailable | BM25 works without embeddings. Check `palaia detect` for available providers. |
446
780
 
447
781
  If `palaia doctor --fix` cannot resolve an issue, report the full error output to the user. Do not guess at fixes.
448
782
 
449
783
  ---
450
784
 
785
+ ## Configuration Keys
786
+
787
+ | Key | Default | Description |
788
+ |-----|---------|-------------|
789
+ | `default_scope` | `team` | Default visibility for new entries |
790
+ | `embedding_chain` | *(auto)* | Ordered list of search providers |
791
+ | `database_backend` | `sqlite` | Storage backend (`sqlite` or `postgres`) |
792
+ | `hot_threshold_days` | `7` | Days before HOT -> WARM |
793
+ | `warm_threshold_days` | `30` | Days before WARM -> COLD |
794
+ | `hot_max_entries` | `50` | Max entries in HOT tier |
795
+ | `decay_lambda` | `0.1` | Decay rate for memory scores |
796
+ | `embed_server_auto_start` | `true` | Auto-start embed-server daemon on first CLI query |
797
+ | `embed_server_idle_timeout` | `1800` | Daemon auto-shutdown after N seconds idle |
798
+
799
+ ---
800
+
451
801
  (c) 2026 byte5 GmbH -- MIT License
package/src/config.ts CHANGED
@@ -62,6 +62,18 @@ export interface PalaiaPluginConfig {
62
62
  // ── Embedding Server (v2.0.8) ──────────────────────────────
63
63
  /** Enable long-lived embedding server subprocess for fast queries (default: true) */
64
64
  embeddingServer: boolean;
65
+
66
+ // ── Session Continuity (v3.0) ─────────────────────────────
67
+ /** Enable automatic session summaries on session end/reset (default: true) */
68
+ sessionSummary: boolean;
69
+ /** Enable session briefing injection on session start (default: true) */
70
+ sessionBriefing: boolean;
71
+ /** Max characters for session briefing (default: 1500) */
72
+ sessionBriefingMaxChars: number;
73
+ /** Enable tool observation tracking via after_tool_call hook (default: true) */
74
+ captureToolObservations: boolean;
75
+ /** Recency boost factor for recall (0 = off, 0.3 = 30% boost for <24h entries) */
76
+ recallRecencyBoost: number;
65
77
  }
66
78
 
67
79
  export const DEFAULT_RECALL_TYPE_WEIGHTS: RecallTypeWeights = {
@@ -86,6 +98,11 @@ export const DEFAULT_CONFIG: PalaiaPluginConfig = {
86
98
  recallTypeWeight: { ...DEFAULT_RECALL_TYPE_WEIGHTS },
87
99
  recallMinScore: 0.7,
88
100
  embeddingServer: true,
101
+ sessionSummary: true,
102
+ sessionBriefing: true,
103
+ sessionBriefingMaxChars: 1500,
104
+ captureToolObservations: true,
105
+ recallRecencyBoost: 0.3,
89
106
  };
90
107
 
91
108
  /**