@byte5ai/palaia 2.3.6 → 2.7.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/skill/SKILL.md CHANGED
@@ -1,25 +1,154 @@
1
1
  ---
2
2
  name: palaia
3
- version: "2.2.0"
3
+ version: "2.7.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: "openclaw plugins install @byte5ai/palaia"
23
+ label: "Install OpenClaw plugin"
24
+ postUpdate:
25
+ - command: "python3 -m pip install --upgrade 'palaia[fastembed]' && openclaw plugins install @byte5ai/palaia && palaia doctor --fix && palaia warmup"
26
+ label: "Upgrade palaia with semantic search + plugin and run health checks"
27
+ postUpdateMessage: >
28
+ palaia has been updated to v2.7. New: WebUI memory explorer (`palaia ui`),
29
+ improved doctor checks (legacy files, plugin registration), search timeout
30
+ fix, security hardening (localhost-only UI).
31
+ Run `palaia doctor --fix` to upgrade.
32
+ plugin:
33
+ slot: memory
34
+ package: "@byte5ai/palaia"
7
35
  ---
8
36
 
9
- # Palaia v2.2 — Agent Memory (Plugin)
37
+ # palaia v2.7 — Agent Memory Skill
10
38
 
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.
39
+ 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.
40
+
41
+ <!-- begin:install -->
42
+ ## First-Time Setup
43
+
44
+ When a user asks you to "set up palaia", "enable memory", or "remember things across sessions", run these steps:
45
+
46
+ ```bash
47
+ pip install "palaia[fastembed]"
48
+ ```
49
+
50
+ ```bash
51
+ palaia init
52
+ ```
53
+
54
+ This creates `.palaia/` with SQLite storage and automatically configures fastembed for semantic search. No manual configuration needed.
55
+
56
+ Confirm success to the user: "Memory is ready. I'll automatically remember important context from our conversations."
57
+
58
+ If `pip` is not available, try alternatives in this order:
59
+ ```bash
60
+ python3 -m pip install "palaia[fastembed]"
61
+ uv tool install "palaia[fastembed]"
62
+ pipx install "palaia[fastembed]"
63
+ ```
64
+
65
+ Optional extras (install as needed):
66
+ ```bash
67
+ pip install "palaia[mcp]" # MCP server for Claude Desktop, Cursor
68
+ pip install "palaia[curate]" # Knowledge curation
69
+ ```
70
+
71
+ Note: `palaia[fastembed]` already includes sqlite-vec for native SIMD vector search. No separate install needed.
72
+
73
+ ### OpenClaw Plugin Setup (for Auto-Capture and Auto-Recall)
74
+
75
+ After the CLI is installed, wire it into OpenClaw:
76
+
77
+ ```bash
78
+ openclaw plugins install @byte5ai/palaia
79
+ ```
80
+
81
+ Then activate the memory slot in OpenClaw config:
82
+ ```json5
83
+ // openclaw.json
84
+ {
85
+ plugins: {
86
+ slots: { memory: "palaia" }
87
+ }
88
+ }
89
+ ```
90
+
91
+ Restart the gateway and verify:
92
+ ```bash
93
+ openclaw gateway restart
94
+ palaia doctor
95
+ ```
96
+
97
+ ### Agent Identity (optional)
98
+
99
+ Single-agent systems work with the default name. For multi-agent setups:
100
+ ```bash
101
+ palaia init --agent YOUR_AGENT_NAME
102
+ ```
103
+
104
+ ## Updating palaia
105
+
106
+ When the user asks to update, or when `palaia status` shows a version mismatch:
107
+
108
+ ```bash
109
+ palaia upgrade
110
+ ```
111
+ 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.
112
+
113
+ **If `palaia upgrade` is not recognized** (versions before v2.3.0), update manually:
114
+
115
+ ```bash
116
+ # Step 1: Find install method
117
+ which palaia
118
+
119
+ # Step 2: Upgrade (use the method matching the path from Step 1)
120
+ # pip (path contains site-packages or .local):
121
+ pip install --upgrade "palaia[fastembed]"
122
+ # uv (path contains uv):
123
+ uv tool install "palaia[fastembed]"
124
+ # pipx (path contains pipx):
125
+ pipx install "palaia[fastembed]" --force
126
+
127
+ # Step 3: Health check + migration
128
+ palaia doctor --fix
129
+
130
+ # Step 4: Update OpenClaw plugin (if installed)
131
+ openclaw plugins install @byte5ai/palaia
132
+ ```
133
+
134
+ After the manual update, `palaia upgrade` will be available for future updates.
135
+ <!-- end:install -->
12
136
 
13
137
  ## Auto-Check (run every time this skill is loaded)
14
138
 
15
- Before doing anything else with Palaia, run `palaia doctor` silently. If it reports ANY warnings, address them immediately by following `palaia doctor --fix` recommendations. Do not proceed with other Palaia tasks until doctor reports no issues.
139
+ Before doing anything else with palaia, run `palaia doctor` silently. If it reports ANY warnings, address them immediately by following `palaia doctor --fix` recommendations. Do not proceed with other palaia tasks until doctor reports no issues.
16
140
 
17
141
  ---
18
142
 
19
143
  ## Core Concepts
20
144
 
21
- ### Auto-Capture
22
- Conversations are automatically captured when the OpenClaw plugin is active. You do NOT need to manually write things from conversations — Palaia handles it. Manual `palaia write` is only for structured knowledge: processes, tasks, and knowledge from external sources.
145
+ ### Auto-Capture vs. Manual Write
146
+ Conversations are automatically captured when the OpenClaw plugin is active. Auto-capture handles routine knowledge extraction from conversations.
147
+
148
+ **Manual writes (`palaia write`) are higher value.** When you or the user identify something as especially important — a key decision, a reusable workflow, a critical fact from an external source — write it manually. Manually written entries are ranked higher than auto-captured ones in recall results, so they surface more prominently in future sessions. Use manual writes for:
149
+ - Important facts, decisions, or context from external sources
150
+ - Reusable processes and workflows (team runbooks)
151
+ - Sticky notes / reminders for future sessions (tasks)
23
152
 
24
153
  ### Three Tiers
25
154
  - **HOT** — Active memories (< 7 days or frequently accessed). Always searched.
@@ -33,8 +162,102 @@ Conversations are automatically captured when the OpenClaw plugin is active. You
33
162
 
34
163
  ### Entry Types
35
164
  - **memory** — Facts, decisions, learnings (default)
36
- - **process** — Workflows, checklists, SOPs
37
- - **task** — Action items with status, priority, assignee, due date
165
+ - **process** — Workflows, checklists, SOPs (team runbooks)
166
+ - **task** — Sticky notes / reminders for future sessions. Tasks are ephemeral: when marked done, they are automatically deleted. Never auto-captured — only created by explicit `palaia write --type task`.
167
+
168
+ ---
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.
38
261
 
39
262
  ---
40
263
 
@@ -42,22 +265,28 @@ Conversations are automatically captured when the OpenClaw plugin is active. You
42
265
 
43
266
  ### `palaia write` — Save structured knowledge
44
267
 
45
- Only use for explicit process/task entries, or knowledge from external sources. Conversation knowledge is auto-captured.
268
+ Use for important facts, reusable processes, sticky-note tasks, and knowledge from external sources. Manually written entries rank higher than auto-captured ones in recall.
46
269
 
47
270
  ```bash
48
- # Save a fact from outside the conversation
271
+ # Save an important fact (ranks higher than auto-capture)
49
272
  palaia write "API rate limit is 100 req/min" --type memory --tags api,limits
50
273
 
51
- # Record a step-by-step process
52
- palaia write "1. Build 2. Test 3. Deploy" --type process --project myapp
274
+ # Record a reusable team workflow (use specific, unique titles!)
275
+ palaia write "Backend: Deploy to staging via Docker" --type process --project myapp --scope team
53
276
 
54
- # Create a task with structured fields
55
- palaia write "fix login bug" --type task --priority high --assignee Elliot --due-date 2026-04-01
277
+ # Create a sticky note for a future session (deleted when done)
278
+ palaia write "verify backup works after schema migration" --type task
56
279
 
57
280
  # Save to a specific project with scope
58
281
  palaia write "Use JWT for auth" --project backend --scope team --tags decision
59
282
  ```
60
283
 
284
+ **Process naming convention:** Use the format `[Domain]: [What it does]` for process titles. Specific titles prevent duplicates and make processes findable.
285
+ - Good: `"Release: PyPI publish + ClawHub sync"`, `"Backend: Deploy to staging via Docker"`
286
+ - Bad: `"Deploy steps"`, `"Release process"` (too generic, will collide with other similar processes)
287
+
288
+ Before writing a new process, search for existing ones: `palaia query "deploy" --type process`. If a similar process exists, update it with `palaia edit <id>` instead of creating a new one.
289
+
61
290
  ### `palaia query` — Semantic search
62
291
 
63
292
  Find memories by meaning, not just keywords.
@@ -69,6 +298,9 @@ palaia query "what's the rate limit"
69
298
  # Filter by type and status
70
299
  palaia query "tasks" --type task --status open
71
300
 
301
+ # Filter by tags
302
+ palaia query "session-summary" --tags session-summary
303
+
72
304
  # Search within a project
73
305
  palaia query "deploy steps" --project myapp
74
306
 
@@ -103,6 +335,9 @@ palaia list
103
335
  # Filter by tier, type, status
104
336
  palaia list --tier warm --type task --status open --priority high
105
337
 
338
+ # Limit results
339
+ palaia list --type task --status open --limit 5
340
+
106
341
  # Filter by project or assignee
107
342
  palaia list --project myapp --assignee Elliot
108
343
  ```
@@ -136,7 +371,7 @@ palaia memo inbox # Check for messages
136
371
  palaia memo ack <memo-id> # Mark as read
137
372
  ```
138
373
 
139
- ### `palaia priorities` — Injection priority management
374
+ ### `palaia priorities` — Injection priority management (NEW in v2.2)
140
375
 
141
376
  Control which memories are injected into each agent's context.
142
377
 
@@ -156,7 +391,7 @@ palaia priorities set typeWeight.process 0.5 --agent orchestrator
156
391
 
157
392
  Config stored in `.palaia/priorities.json` with layered overrides: global -> per-agent -> per-project.
158
393
 
159
- ### `palaia curate analyze/apply` — Knowledge curation
394
+ ### `palaia curate analyze/apply` — Knowledge curation (NEW in v2.2)
160
395
 
161
396
  For migrating knowledge to a new instance, cleaning up old entries, or reviewing accumulated knowledge.
162
397
 
@@ -186,6 +421,8 @@ palaia sync import ./export/ --dry-run # Preview first
186
421
  palaia sync import ./export/
187
422
  ```
188
423
 
424
+ Note: The old `palaia export`/`palaia import` aliases still work but are deprecated.
425
+
189
426
  ### `palaia package export/import` — Portable knowledge packages
190
427
 
191
428
  ```bash
@@ -199,6 +436,25 @@ palaia package import myapp.palaia-pkg.json --project target --merge skip
199
436
  palaia package info myapp.palaia-pkg.json
200
437
  ```
201
438
 
439
+ ### `palaia upgrade` — Update to latest version
440
+
441
+ ```bash
442
+ palaia upgrade
443
+ ```
444
+
445
+ 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.
446
+
447
+ ### `palaia ui` — Local memory explorer (NEW in v2.7)
448
+
449
+ ```bash
450
+ pip install 'palaia[ui]' # One-time: install FastAPI + uvicorn
451
+ palaia ui # Opens browser at http://127.0.0.1:8384
452
+ palaia ui --port 9000 # Custom port (auto-fallback if busy)
453
+ palaia ui --no-browser # Don't auto-open browser
454
+ ```
455
+
456
+ Browse, search, create, edit, and delete entries in the browser. Manual entries are highlighted with a gold border (1.3× recall boost). Tasks are post-its: clicking ✓ deletes them. The health pill in the header shows doctor status with actionable warnings. Localhost only — no authentication, no network exposure.
457
+
202
458
  ### `palaia doctor` — Diagnostics and auto-fix
203
459
 
204
460
  ```bash
@@ -218,6 +474,15 @@ palaia gc --aggressive # Also clears COLD tier
218
474
  palaia gc --budget 200 # Keep max N entries
219
475
  ```
220
476
 
477
+ ### `palaia prune` — Selective cleanup (NEW in v2.5)
478
+
479
+ ```bash
480
+ palaia prune --agent moneypenny # Remove auto-captured entries by agent
481
+ palaia prune --tags auto-capture # Remove all auto-captured entries
482
+ palaia prune --dry-run # Preview what would be removed
483
+ palaia prune --protect-type process # Never delete process entries
484
+ ```
485
+
221
486
  ### `palaia config` — Configuration
222
487
 
223
488
  ```bash
@@ -247,10 +512,13 @@ palaia project locks # List all active locks
247
512
  ### `palaia edit` — Modify existing entries
248
513
 
249
514
  ```bash
250
- palaia edit <id> --status done
515
+ palaia edit <id> --status done # For tasks: this DELETES the entry (sticky note completed)
516
+ palaia edit <id> --status wontfix # For tasks: also deletes (cancelled reminder)
251
517
  palaia edit <id> "updated content" --tags new,tags --priority high
252
518
  ```
253
519
 
520
+ **Task lifecycle:** Tasks are sticky notes. When you mark a task as `done` or `wontfix`, it is automatically deleted — not archived. This is intentional: completed reminders have no long-term value. If the outcome of the task should be remembered, write a separate memory entry before marking the task done.
521
+
254
522
  ### Other commands
255
523
 
256
524
  ```bash
@@ -269,7 +537,7 @@ All commands support `--json` for machine-readable output.
269
537
 
270
538
  ## Smart Nudging
271
539
 
272
- Palaia's CLI output contains contextual hints prefixed with `[palaia]`. These are important guidance.
540
+ palaia's CLI output contains contextual hints prefixed with `[palaia]`. These are important guidance.
273
541
 
274
542
  **As an agent, you should:**
275
543
  - Read and act on nudge messages in CLI output
@@ -285,7 +553,7 @@ Palaia's CLI output contains contextual hints prefixed with `[palaia]`. These ar
285
553
 
286
554
  ---
287
555
 
288
- ## Multi-Agent Coordination
556
+ ## Multi-Agent Setup
289
557
 
290
558
  ### Scopes across agents
291
559
  - `private` entries are only visible to the writing agent
@@ -344,29 +612,90 @@ Distinguish sessions of the same agent:
344
612
  palaia instance set Claw-Main
345
613
  ```
346
614
 
615
+ ### Agent Isolation Mode
616
+
617
+ For focused agents (Sonnet/Codex) that should only see their own memories:
618
+
619
+ **1. Configure in `priorities.json`:**
620
+ ```json
621
+ {
622
+ "agents": {
623
+ "dev-worker": {
624
+ "scopeVisibility": ["private"],
625
+ "captureScope": "private",
626
+ "maxInjectedChars": 2000,
627
+ "recallMinScore": 0.85
628
+ }
629
+ }
630
+ }
631
+ ```
632
+ Or via CLI:
633
+ ```bash
634
+ palaia priorities set scopeVisibility private --agent dev-worker
635
+ palaia priorities set captureScope private --agent dev-worker
636
+ palaia priorities set maxInjectedChars 2000 --agent dev-worker
637
+ palaia priorities set recallMinScore 0.85 --agent dev-worker
638
+ ```
639
+
640
+ **2. Set agent identity:**
641
+ ```bash
642
+ export PALAIA_AGENT=dev-worker
643
+ ```
644
+
645
+ **3. Auto-capture stays on** (crash safety net). Cleanup happens after the work package.
646
+
647
+ **4. After accepting work:**
648
+ ```bash
649
+ palaia prune --agent dev-worker --tags auto-capture --protect-type process
650
+ ```
651
+ This removes session noise while preserving learned SOPs.
652
+
653
+ #### Pre-configured Agent Profiles
654
+
655
+ | Profile | scopeVisibility | captureScope | maxInjectedChars | recallMinScore | autoCapture |
656
+ |---------|----------------|--------------|-----------------|----------------|-------------|
657
+ | **Isolated Worker** | `["private"]` | `private` | 2000 | 0.85 | true |
658
+ | **Orchestrator** | `["private","team","public"]` | `team` | 4000 | 0.7 | true |
659
+ | **Lean Worker** | `["private"]` | `private` | 1000 | 0.9 | false |
660
+
661
+ #### Orchestrator Lifecycle (process template)
662
+
663
+ Save this as a process entry for the orchestrator to recall:
664
+ ```bash
665
+ palaia write "## Dev-Agent Lifecycle
666
+ 1. Create agent identity: export PALAIA_AGENT=dev-worker-{task-id}
667
+ 2. Configure isolation: palaia priorities set scopeVisibility private --agent dev-worker-{task-id}
668
+ 3. Configure capture: palaia priorities set captureScope private --agent dev-worker-{task-id}
669
+ 4. Assign work package via prompt
670
+ 5. After acceptance: palaia prune --agent dev-worker-{task-id} --tags auto-capture --protect-type process
671
+ 6. Verify: palaia list --agent dev-worker-{task-id} --type process
672
+ 7. Process knowledge persists for future tasks" --type process --tags workflow,orchestration --scope private
673
+ ```
674
+
347
675
  ---
348
676
 
349
677
  ## When to Use What
350
678
 
351
679
  | Situation | Command |
352
680
  |-----------|---------|
353
- | Remember a fact (not from conversation) | `palaia write "..." --type memory` |
354
- | Record a process/SOP | `palaia write "steps..." --type process` |
355
- | Create a task | `palaia write "fix bug" --type task --priority high` |
356
- | Mark task done | `palaia edit <id> --status done` |
681
+ | Save an important fact or decision | `palaia write "..." --type memory` (ranks higher than auto-capture) |
682
+ | Document a reusable workflow | `palaia write "Domain: Steps..." --type process --scope team` |
683
+ | Leave a reminder for future sessions | `palaia write "check X after Y" --type task` (auto-deleted when done) |
684
+ | Mark a reminder as done | `palaia edit <id> --status done` (deletes the task) |
357
685
  | Find something | `palaia query "..."` |
358
- | Find open tasks | `palaia list --type task --status open` |
686
+ | Find open reminders | `palaia list --type task --status open` |
359
687
  | Check system health | `palaia status` |
360
688
  | Something is wrong | `palaia doctor --fix` |
361
689
  | Clean up old entries | `palaia gc` |
690
+ | Clean up agent session noise | `palaia prune --agent NAME --tags auto-capture --protect-type process` |
362
691
  | Review accumulated knowledge | `palaia curate analyze` |
363
692
  | Share knowledge | `palaia sync export` or `palaia package export` |
364
693
  | Check for messages | `palaia memo inbox` |
365
- | Start of session | `palaia doctor` then `palaia query "active work"` then `palaia memo inbox` |
694
+ | Start of session | Session briefing is automatic. Just run `palaia doctor` and check `palaia memo inbox`. |
366
695
 
367
- **Do NOT manually write:** facts, decisions, or preferences that came up in the current conversation. Auto-Capture handles these.
696
+ **Auto-capture** handles routine conversation knowledge. **Manual writes rank higher** in recall use them when something is especially important, reusable, or comes from an external source.
368
697
 
369
- **DO manually write:** processes, tasks with structured fields, knowledge from external sources, project setup.
698
+ **DO manually write:** key decisions, reusable processes (team runbooks), sticky-note reminders (tasks), important facts from external sources.
370
699
 
371
700
  ---
372
701
 
@@ -401,6 +730,33 @@ palaia init --capture-level <off|minimal|normal|aggressive>
401
730
 
402
731
  ---
403
732
 
733
+ ## Session Continuity (NEW in v2.4)
734
+
735
+ Session continuity gives agents automatic context restoration across sessions. These features work out of the box with the OpenClaw plugin -- no manual setup needed.
736
+
737
+ ### Session Briefings
738
+ Session briefings are injected automatically at session start. They contain your last session summary and any open tasks (sticky notes). Read the briefing carefully — it is your primary context for continuing previous work. Do not ask the user "where did we leave off?" when a briefing is present. Instead, acknowledge the context and continue seamlessly.
739
+
740
+ ### Session Summaries
741
+ 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:
742
+ ```bash
743
+ palaia query "session-summary" --tags session-summary
744
+ ```
745
+
746
+ ### Privacy Markers
747
+ Wrap sensitive content in `<private>...</private>` blocks to exclude it from auto-capture. Private blocks are stripped before any extraction runs.
748
+
749
+ ### Recency Boost
750
+ Fresh memories are ranked higher in recall results. The boost factor is configurable via `recallRecencyBoost` (default `0.3`, set to `0` to disable).
751
+
752
+ ### Progressive Disclosure
753
+ When result sets exceed 100 entries, palaia uses compact mode to keep context manageable. Use `--limit` to control result size explicitly:
754
+ ```bash
755
+ palaia list --type task --status open --limit 5
756
+ ```
757
+
758
+ ---
759
+
404
760
  ## Plugin Configuration (OpenClaw)
405
761
 
406
762
  Set in `openclaw.json` under `plugins.entries.palaia.config`:
@@ -418,6 +774,12 @@ Set in `openclaw.json` under `plugins.entries.palaia.config`:
418
774
  | `embeddingServer` | `true` | Keep embedding model loaded for fast queries |
419
775
  | `showMemorySources` | `true` | Show memory source footnotes |
420
776
  | `showCaptureConfirm` | `true` | Show capture confirmations |
777
+ | `sessionSummary` | `true` | Auto-save session summaries on end/reset |
778
+ | `sessionBriefing` | `true` | Load session context on session start |
779
+ | `sessionBriefingMaxChars` | `1500` | Max chars for session briefing injection |
780
+ | `captureToolObservations` | `true` | Track tool usage as session context |
781
+ | `recallRecencyBoost` | `0.3` | Boost factor for fresh memories (0=off) |
782
+ | `manualEntryBoost` | `1.3` | Boost factor for manually written entries vs auto-captured (1.0=off) |
421
783
 
422
784
  ---
423
785
 
@@ -437,15 +799,33 @@ Set in `openclaw.json` under `plugins.entries.palaia.config`:
437
799
  | Problem | What to do |
438
800
  |---------|-----------|
439
801
  | Something is wrong | `palaia doctor --fix` first, debug second |
802
+ | `palaia init` fails | Check permissions on the directory, disk space, and Python version. Report the exact error to the user. |
440
803
  | `palaia write` fails | Run `palaia doctor --fix`, then retry. If WAL replay needed, run `palaia recover`. |
441
804
  | `palaia query` returns nothing | Try `palaia query "..." --all` to include COLD tier. Check `palaia list` to verify entries exist. |
442
805
  | Entries seem missing | `palaia recover` then `palaia list --tier cold` |
443
- | Slow queries | `palaia warmup` then check `palaia detect` |
806
+ | Slow queries | `pip install 'palaia[sqlite-vec]'` for native vector search, then `palaia warmup`. Check `palaia detect` and `palaia status` |
444
807
  | Provider not available | Chain auto-falls back. Check `palaia status` |
808
+ | `.palaia` missing | `palaia init` |
445
809
  | Embedding provider unavailable | BM25 works without embeddings. Check `palaia detect` for available providers. |
446
810
 
447
811
  If `palaia doctor --fix` cannot resolve an issue, report the full error output to the user. Do not guess at fixes.
448
812
 
449
813
  ---
450
814
 
815
+ ## Configuration Keys
816
+
817
+ | Key | Default | Description |
818
+ |-----|---------|-------------|
819
+ | `default_scope` | `team` | Default visibility for new entries |
820
+ | `embedding_chain` | *(auto)* | Ordered list of search providers |
821
+ | `database_backend` | `sqlite` | Storage backend (`sqlite` or `postgres`) |
822
+ | `hot_threshold_days` | `7` | Days before HOT -> WARM |
823
+ | `warm_threshold_days` | `30` | Days before WARM -> COLD |
824
+ | `hot_max_entries` | `50` | Max entries in HOT tier |
825
+ | `decay_lambda` | `0.1` | Decay rate for memory scores |
826
+ | `embed_server_auto_start` | `true` | Auto-start embed-server daemon on first CLI query |
827
+ | `embed_server_idle_timeout` | `1800` | Daemon auto-shutdown after N seconds idle |
828
+
829
+ ---
830
+
451
831
  (c) 2026 byte5 GmbH -- MIT License
package/src/config.ts CHANGED
@@ -12,7 +12,7 @@ export interface RecallTypeWeights {
12
12
  export interface PalaiaPluginConfig {
13
13
  /** Path to palaia binary (default: auto-detect) */
14
14
  binaryPath?: string;
15
- /** Palaia workspace path (default: agent workspace) */
15
+ /** palaia workspace path (default: agent workspace) */
16
16
  workspace?: string;
17
17
  /** Default tier filter: "hot" | "warm" | "all" */
18
18
  tier: string;
@@ -62,6 +62,20 @@ 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;
77
+ /** Boost factor for manually written entries vs auto-captured (default: 1.3 = 30% boost) */
78
+ manualEntryBoost: number;
65
79
  }
66
80
 
67
81
  export const DEFAULT_RECALL_TYPE_WEIGHTS: RecallTypeWeights = {
@@ -86,6 +100,12 @@ export const DEFAULT_CONFIG: PalaiaPluginConfig = {
86
100
  recallTypeWeight: { ...DEFAULT_RECALL_TYPE_WEIGHTS },
87
101
  recallMinScore: 0.7,
88
102
  embeddingServer: true,
103
+ sessionSummary: true,
104
+ sessionBriefing: true,
105
+ sessionBriefingMaxChars: 1500,
106
+ captureToolObservations: true,
107
+ recallRecencyBoost: 0.3,
108
+ manualEntryBoost: 1.3,
89
109
  };
90
110
 
91
111
  /**