@byte5ai/palaia 2.0.13 → 2.2.0
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/index.ts +40 -21
- package/package.json +2 -2
- package/skill/SKILL.md +284 -706
- package/src/context-engine.ts +439 -0
- package/src/hooks/capture.ts +740 -0
- package/src/hooks/index.ts +823 -0
- package/src/hooks/reactions.ts +168 -0
- package/src/hooks/recall.ts +369 -0
- package/src/hooks/state.ts +317 -0
- package/src/priorities.ts +221 -0
- package/src/runner.ts +51 -10
- package/src/tools.ts +3 -2
- package/src/types.ts +119 -0
- package/src/hooks.ts +0 -2012
package/skill/SKILL.md
CHANGED
|
@@ -1,873 +1,451 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: palaia
|
|
3
|
+
version: "2.2.0"
|
|
3
4
|
description: >
|
|
4
5
|
Local, crash-safe persistent memory for OpenClaw agents.
|
|
5
|
-
Semantic search, projects,
|
|
6
|
-
This SKILL.md is bundled with the npm plugin — no ClawHub needed.
|
|
6
|
+
SQLite-backed by default. Semantic search, projects, scopes, auto-capture.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
> For the full documentation including installation instructions, see: https://github.com/iret77/palaia
|
|
9
|
+
# Palaia v2.2 — Agent Memory (Plugin)
|
|
11
10
|
|
|
12
|
-
|
|
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.
|
|
13
12
|
|
|
14
13
|
## Auto-Check (run every time this skill is loaded)
|
|
15
14
|
|
|
16
|
-
|
|
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.
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
**Palaia works out of the box after installation. No config edits needed.**
|
|
21
|
-
|
|
22
|
-
After installing the plugin, Palaia immediately:
|
|
23
|
-
- **Injects relevant memories** into every agent prompt (`memoryInject: true`)
|
|
24
|
-
- **Auto-captures significant exchanges** as searchable memories (`autoCapture: true`)
|
|
25
|
-
- **Uses semantic recall** to find context-relevant memories (`recallMode: query`)
|
|
26
|
-
|
|
27
|
-
No settings to tweak. No README to study. Install it and it works.
|
|
28
|
-
|
|
29
|
-
**For power users:** All defaults can be customized via `openclaw.json` plugin config or `palaia init --capture-level`. See the Configuration section below.
|
|
30
|
-
|
|
31
|
-
**Upgrading from v1.x?** Run `palaia doctor --fix` — it detects old defaults and upgrades them. Custom values you've set are preserved.
|
|
32
|
-
|
|
33
|
-
## Setup Flow (follow this exactly)
|
|
34
|
-
|
|
35
|
-
### Step 3: Check for existing memory systems (REQUIRED — do not skip)
|
|
36
|
-
```bash
|
|
37
|
-
palaia doctor
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Review **every** warning before continuing. For each warning found by `palaia doctor`, immediately offer to fix it — do not wait for the user to ask:
|
|
41
|
-
|
|
42
|
-
**HEARTBEAT.md legacy patterns:**
|
|
43
|
-
→ Tell the user: "Your heartbeat still uses old memory patterns. Should I update it to use Palaia? (Takes a moment, no data loss)"
|
|
44
|
-
- If yes: update HEARTBEAT.md, replace `memory_search`/`memory_get`/direct file reads with `palaia query`/`palaia write` equivalents
|
|
45
|
-
- If no: skip, move to next warning
|
|
46
|
-
|
|
47
|
-
**Smart-Memory skill detected:**
|
|
48
|
-
→ Tell the user: "The old smart-memory skill is still installed. Should I remove it? (Only after confirming Palaia has your memories)"
|
|
49
|
-
- If yes: run `palaia migrate <workspace-path>`, then remove the smart-memory skill folder
|
|
50
|
-
- If no: continue, but both systems will run in parallel (not recommended)
|
|
51
|
-
|
|
52
|
-
**OpenClaw plugin still memory-core:**
|
|
53
|
-
→ Tell the user: "Palaia isn't connected to OpenClaw's memory system yet. Should I switch it? (Requires a quick OpenClaw restart)"
|
|
54
|
-
- If yes: update OpenClaw config (`plugins.slots.memory = "palaia"`), restart OpenClaw
|
|
55
|
-
- If no: Palaia runs standalone (no `memory_search`/`memory_get` tool integration)
|
|
56
|
-
|
|
57
|
-
**openai-only chain (no local fallback):**
|
|
58
|
-
→ Tell the user: "Your search has no local backup. Should I install fastembed as a fallback? (Small download, no GPU needed)"
|
|
59
|
-
- If yes: `pip install fastembed`, then `palaia warmup`, update chain to include fastembed before bm25
|
|
60
|
-
- If no: skip (warn: "Search may degrade when OpenAI is unavailable")
|
|
61
|
-
|
|
62
|
-
Rules:
|
|
63
|
-
- For each warning: ask immediately, one question at a time
|
|
64
|
-
- Do not batch all questions — address them in order
|
|
65
|
-
- Do not wait for the user to notice and ask
|
|
66
|
-
- After user answers yes/no, move to next warning
|
|
67
|
-
- Report when all warnings are resolved
|
|
68
|
-
|
|
69
|
-
**Do not proceed until all warnings are addressed or explicitly dismissed by the user.**
|
|
70
|
-
|
|
71
|
-
### Onboarding Conversation
|
|
72
|
-
|
|
73
|
-
After running `palaia doctor` and reviewing warnings, have a brief conversation with your user.
|
|
74
|
-
Keep it short — 3 questions max. No technical details unless the user asks.
|
|
75
|
-
|
|
76
|
-
**Script:**
|
|
77
|
-
|
|
78
|
-
Tell the user:
|
|
79
|
-
"I've set up Palaia for you — your memory is now crash-safe and searchable.
|
|
80
|
-
Quick setup: 3 short questions."
|
|
81
|
-
|
|
82
|
-
**Question 1 — Search quality:**
|
|
83
|
-
|
|
84
|
-
If an OpenAI API key is present AND a local model (sentence-transformers/fastembed/ollama) is also detected:
|
|
85
|
-
→ Just confirm: "I'll use your OpenAI key with a local backup model. Good setup."
|
|
86
|
-
→ No question needed.
|
|
87
|
-
|
|
88
|
-
If an OpenAI API key is present BUT no local model is installed:
|
|
89
|
-
→ Tell the user: "You have an OpenAI API key — great for search quality. But without a local backup, search quality drops significantly when OpenAI is unavailable. I recommend installing a small local model (300MB, free, runs offline). Should I do that?"
|
|
90
|
-
→ yes: pip install sentence-transformers (if CUDA issues: pip install fastembed instead — lighter, no GPU needed), then palaia warmup, chain = openai → sentence-transformers → bm25
|
|
91
|
-
→ no: chain = openai → bm25 (warn: "Note: search may fail or degrade without a local fallback.")
|
|
17
|
+
---
|
|
92
18
|
|
|
93
|
-
|
|
94
|
-
→ Tell the user: "No search provider found yet. I recommend installing a free local model (300MB). Should I do that?"
|
|
95
|
-
→ yes: pip install sentence-transformers (if CUDA issues: pip install fastembed instead — lighter, no GPU needed), then palaia warmup, chain = sentence-transformers → bm25
|
|
96
|
-
→ no: BM25 only (warn: "Search will be keyword-based — you can improve this later with palaia detect.")
|
|
19
|
+
## Core Concepts
|
|
97
20
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
→ No question needed.
|
|
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.
|
|
101
23
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
24
|
+
### Three Tiers
|
|
25
|
+
- **HOT** — Active memories (< 7 days or frequently accessed). Always searched.
|
|
26
|
+
- **WARM** — Aging memories (7-30 days). Searched by default.
|
|
27
|
+
- **COLD** — Archived memories (> 30 days). Only searched with `--all`.
|
|
106
28
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
29
|
+
### Scopes
|
|
30
|
+
- **private** — Only the writing agent can read it
|
|
31
|
+
- **team** — All agents in the workspace can read it (default)
|
|
32
|
+
- **public** — Exportable and shareable across workspaces
|
|
111
33
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
34
|
+
### Entry Types
|
|
35
|
+
- **memory** — Facts, decisions, learnings (default)
|
|
36
|
+
- **process** — Workflows, checklists, SOPs
|
|
37
|
+
- **task** — Action items with status, priority, assignee, due date
|
|
116
38
|
|
|
117
|
-
|
|
118
|
-
Tell the user what was configured — one sentence:
|
|
119
|
-
"Done. [Search quality: OpenAI / local model / keyword-only]. [Migration: X entries imported / fresh start]. [Projects: configured / not used]."
|
|
39
|
+
---
|
|
120
40
|
|
|
121
|
-
|
|
41
|
+
## Commands Reference
|
|
122
42
|
|
|
123
|
-
###
|
|
124
|
-
If there are existing entries from an earlier Palaia version (or from initial setup), run:
|
|
125
|
-
```bash
|
|
126
|
-
palaia migrate --suggest
|
|
127
|
-
```
|
|
128
|
-
This checks for entries without type classification and suggests improvements. Better to do this early while the store is small — it gets harder as the store grows. Apply the suggestions that make sense.
|
|
43
|
+
### `palaia write` — Save structured knowledge
|
|
129
44
|
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
palaia detect
|
|
133
|
-
```
|
|
134
|
-
Review the detected providers and configured chain. `palaia init` automatically detects available providers
|
|
135
|
-
and configures the best embedding chain — you usually don't need to change anything.
|
|
45
|
+
Only use for explicit process/task entries, or knowledge from external sources. Conversation knowledge is auto-captured.
|
|
136
46
|
|
|
137
|
-
If the chain looks wrong or you want to change it:
|
|
138
47
|
```bash
|
|
139
|
-
|
|
140
|
-
|
|
48
|
+
# Save a fact from outside the conversation
|
|
49
|
+
palaia write "API rate limit is 100 req/min" --type memory --tags api,limits
|
|
141
50
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
# fastembed — lightweight, no GPU needed, recommended for most systems
|
|
145
|
-
python3 -m pip install fastembed # or: uv pip install fastembed
|
|
146
|
-
palaia warmup # pre-load model + build index
|
|
147
|
-
```
|
|
148
|
-
If fastembed is unavailable, sentence-transformers works too (`python3 -m pip install sentence-transformers`) but is heavier and slower on CPU-only systems.
|
|
51
|
+
# Record a step-by-step process
|
|
52
|
+
palaia write "1. Build 2. Test 3. Deploy" --type process --project myapp
|
|
149
53
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
palaia warmup
|
|
153
|
-
```
|
|
154
|
-
This pre-downloads embedding models so the first search is instant. Always run after chain setup.
|
|
54
|
+
# Create a task with structured fields
|
|
55
|
+
palaia write "fix login bug" --type task --priority high --assignee Elliot --due-date 2026-04-01
|
|
155
56
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
palaia query "important context and decisions"
|
|
57
|
+
# Save to a specific project with scope
|
|
58
|
+
palaia write "Use JWT for auth" --project backend --scope team --tags decision
|
|
160
59
|
```
|
|
161
|
-
**Check:**
|
|
162
|
-
- Results must appear (not empty)
|
|
163
|
-
- Response time should be under 5 seconds
|
|
164
|
-
- If it times out or returns no results: check `palaia status` and `palaia detect`, fix any issues before proceeding
|
|
165
60
|
|
|
166
|
-
|
|
167
|
-
If index is 0/N after warmup, run a few queries — indexing happens lazily on first query.
|
|
61
|
+
### `palaia query` — Semantic search
|
|
168
62
|
|
|
169
|
-
|
|
63
|
+
Find memories by meaning, not just keywords.
|
|
170
64
|
|
|
171
|
-
### Step 7: Optional — migrate additional memory files (skip if done in Step 4)
|
|
172
65
|
```bash
|
|
173
|
-
|
|
174
|
-
palaia
|
|
175
|
-
```
|
|
176
|
-
Note: If smart-memory migration was already handled in Step 3, skip this unless there are other sources to import.
|
|
177
|
-
|
|
178
|
-
### Step 8: Add Palaia maintenance to your heartbeat (mandatory)
|
|
179
|
-
|
|
180
|
-
This is required. Palaia's tiering (HOT → WARM → COLD) only runs when triggered.
|
|
181
|
-
Without periodic maintenance, all entries stay HOT forever and search quality degrades over time.
|
|
182
|
-
|
|
183
|
-
Check if `HEARTBEAT.md` exists in the workspace (`~/.openclaw/workspace/HEARTBEAT.md`).
|
|
184
|
-
|
|
185
|
-
**If it exists:** Append the following block at the end (before any final comments):
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
# TASK: Palaia Maintenance (daily + weekly)
|
|
189
|
-
# [INSTRUCTION for LLM]:
|
|
190
|
-
# Daily: run `palaia gc` — moves entries between HOT/WARM/COLD based on age and access.
|
|
191
|
-
# Weekly (Sunday): run `palaia gc --aggressive` — also clears COLD tier.
|
|
192
|
-
# Fast operation, never blocks user queries. Only run if palaia is installed (check: which palaia).
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**If it does not exist:** Create `HEARTBEAT.md` with the block above as its first task.
|
|
196
|
-
|
|
197
|
-
Tell the user: "I've added a Palaia maintenance task to your heartbeat schedule. This keeps your memory organized automatically — nothing you need to do."
|
|
198
|
-
|
|
199
|
-
## Auto-Capture and Capture Hints
|
|
200
|
-
|
|
201
|
-
### How Auto-Capture Works
|
|
202
|
-
|
|
203
|
-
Auto-capture runs automatically after every agent turn (when `autoCapture: true`, which is the default). It:
|
|
204
|
-
|
|
205
|
-
1. Collects all messages from the completed exchange
|
|
206
|
-
2. Filters out trivial exchanges (short, system content, acknowledgments)
|
|
207
|
-
3. Uses LLM-based extraction to identify significant knowledge: decisions, lessons, processes, commitments, preferences
|
|
208
|
-
4. Writes extracted items to Palaia with appropriate type, tags, scope, and project attribution
|
|
209
|
-
5. Falls back to rule-based extraction if LLM is unavailable
|
|
210
|
-
|
|
211
|
-
**Agent attribution:** If `PALAIA_AGENT` is set in the environment, all auto-captured entries are attributed to that agent via `--agent`. Otherwise, the CLI uses the configured default.
|
|
212
|
-
|
|
213
|
-
**Project detection:** Auto-capture passes the list of known projects to the LLM, which assigns entries to the most relevant project (or none if unclear).
|
|
214
|
-
|
|
215
|
-
**Scope detection:** The LLM also determines scope per item: `private` (personal preference), `team` (shared knowledge), or `public` (documentation).
|
|
216
|
-
|
|
217
|
-
### When to Use Manual Write vs Auto-Capture
|
|
218
|
-
|
|
219
|
-
**Auto-Capture** handles conversation knowledge automatically: decisions mentioned in chat, facts discussed, lessons learned during work. You don't need to save these — Palaia does it for you.
|
|
66
|
+
# Basic search
|
|
67
|
+
palaia query "what's the rate limit"
|
|
220
68
|
|
|
221
|
-
|
|
69
|
+
# Filter by type and status
|
|
70
|
+
palaia query "tasks" --type task --status open
|
|
222
71
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
| Step-by-step procedure | `palaia write "1. Build 2. Test 3. Deploy" --type process` | Structure matters |
|
|
226
|
-
| Task with owner/deadline | `palaia write "fix auth" --type task --priority high --assignee Elliot` | Structured fields |
|
|
227
|
-
| Project setup | `palaia project create myproject` | Explicit organization |
|
|
228
|
-
| Knowledge from external source | `palaia write "API limit: 100/min" --type memory --project api` | Not from conversation |
|
|
72
|
+
# Search within a project
|
|
73
|
+
palaia query "deploy steps" --project myapp
|
|
229
74
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
- "We decided to use X" after discussing X (auto-captured)
|
|
233
|
-
- Status updates or progress notes (auto-captured if significant)
|
|
75
|
+
# Include archived (COLD) entries
|
|
76
|
+
palaia query "old decisions" --all
|
|
234
77
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
### Capture Hints
|
|
78
|
+
# Search across all projects
|
|
79
|
+
palaia query "authentication" --cross-project
|
|
238
80
|
|
|
239
|
-
|
|
81
|
+
# Time-filtered search
|
|
82
|
+
palaia query "deploy" --after 2026-03-01 --before 2026-03-15
|
|
240
83
|
|
|
241
|
-
|
|
242
|
-
|
|
84
|
+
# RAG-formatted output for LLM injection
|
|
85
|
+
palaia query "how does auth work" --project api --rag
|
|
243
86
|
```
|
|
244
87
|
|
|
245
|
-
|
|
246
|
-
- **Priority:** Hint > LLM detection > Config override > Default
|
|
247
|
-
- **Attributes:** `project`, `scope`, `type`, `tags` (comma-separated)
|
|
248
|
-
- **Stripping:** Hints are automatically removed from outgoing messages — the user never sees them
|
|
88
|
+
### `palaia get` — Read a specific entry
|
|
249
89
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<
|
|
253
|
-
<palaia-hint project="backend" type="process" />
|
|
90
|
+
```bash
|
|
91
|
+
palaia get <entry-id>
|
|
92
|
+
palaia get <entry-id> --from 5 --lines 20 # Read a portion
|
|
254
93
|
```
|
|
255
94
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
For setups where every entry should go to the same project/scope, set in plugin config:
|
|
259
|
-
- `captureScope`: Static scope override (e.g., `"team"`)
|
|
260
|
-
- `captureProject`: Static project override (e.g., `"myapp"`)
|
|
261
|
-
|
|
262
|
-
These override LLM detection but are overridden by capture hints.
|
|
263
|
-
|
|
264
|
-
## Knowledge Packages
|
|
95
|
+
Use when you have an entry ID from a query result or nudge message.
|
|
265
96
|
|
|
266
|
-
|
|
97
|
+
### `palaia list` — Browse entries
|
|
267
98
|
|
|
268
99
|
```bash
|
|
269
|
-
#
|
|
270
|
-
palaia
|
|
100
|
+
# List active entries
|
|
101
|
+
palaia list
|
|
271
102
|
|
|
272
|
-
#
|
|
273
|
-
palaia
|
|
103
|
+
# Filter by tier, type, status
|
|
104
|
+
palaia list --tier warm --type task --status open --priority high
|
|
274
105
|
|
|
275
|
-
#
|
|
276
|
-
palaia
|
|
106
|
+
# Filter by project or assignee
|
|
107
|
+
palaia list --project myapp --assignee Elliot
|
|
277
108
|
```
|
|
278
109
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
## Process Runner
|
|
282
|
-
|
|
283
|
-
Run stored process entries as interactive checklists:
|
|
110
|
+
### `palaia status` — System health check
|
|
284
111
|
|
|
285
112
|
```bash
|
|
286
|
-
|
|
287
|
-
palaia process list [--project NAME]
|
|
288
|
-
|
|
289
|
-
# Run a process interactively
|
|
290
|
-
palaia process run <id>
|
|
113
|
+
palaia status
|
|
291
114
|
```
|
|
292
115
|
|
|
293
|
-
|
|
116
|
+
Shows: entry counts per tier, entry class breakdown (memory/process/task), active providers, index health, version info. Run this when something seems off or to verify setup.
|
|
294
117
|
|
|
295
|
-
|
|
118
|
+
### `palaia project` — Project context management
|
|
296
119
|
|
|
297
120
|
```bash
|
|
298
|
-
palaia
|
|
299
|
-
palaia list
|
|
121
|
+
palaia project create myapp --description "Main application" --default-scope team
|
|
122
|
+
palaia project list
|
|
123
|
+
palaia project show myapp
|
|
124
|
+
palaia project query myapp "deploy steps"
|
|
125
|
+
palaia project write myapp "New convention: use snake_case" --tags convention
|
|
126
|
+
palaia project set-scope myapp private
|
|
127
|
+
palaia project delete myapp # Entries preserved, just untagged
|
|
300
128
|
```
|
|
301
129
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
## Cross-Project Search
|
|
305
|
-
|
|
306
|
-
Search across all projects at once:
|
|
130
|
+
### `palaia memo` — Inter-agent messaging
|
|
307
131
|
|
|
308
132
|
```bash
|
|
309
|
-
palaia
|
|
133
|
+
palaia memo send AgentName "Important update about project X"
|
|
134
|
+
palaia memo broadcast "New process available"
|
|
135
|
+
palaia memo inbox # Check for messages
|
|
136
|
+
palaia memo ack <memo-id> # Mark as read
|
|
310
137
|
```
|
|
311
138
|
|
|
312
|
-
|
|
139
|
+
### `palaia priorities` — Injection priority management
|
|
313
140
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
Palaia supports budgeted garbage collection to keep the store lean:
|
|
141
|
+
Control which memories are injected into each agent's context.
|
|
317
142
|
|
|
318
143
|
```bash
|
|
319
|
-
#
|
|
320
|
-
palaia
|
|
321
|
-
|
|
322
|
-
# Collect with a target budget (max entries to keep)
|
|
323
|
-
palaia gc --budget 200
|
|
324
|
-
|
|
325
|
-
# Aggressive collection — also clears COLD tier
|
|
326
|
-
palaia gc --aggressive
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
GC rotates entries through tiers: HOT (active, <7 days) -> WARM (recent, <30 days) -> COLD (archived).
|
|
330
|
-
|
|
331
|
-
## Significance Tagging
|
|
332
|
-
|
|
333
|
-
Auto-capture automatically detects and tags entries with significance markers:
|
|
144
|
+
# Show what would be injected (with score breakdown)
|
|
145
|
+
palaia priorities
|
|
334
146
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
| `decision` | A choice was made | "We decided to use PostgreSQL" |
|
|
338
|
-
| `lesson` | Something was learned | "I learned that caching needs invalidation on deploy" |
|
|
339
|
-
| `surprise` | Unexpected discovery | "The API returns 200 even on errors" |
|
|
340
|
-
| `commitment` | Promise or action item | "I will refactor auth by Friday" |
|
|
341
|
-
| `correction` | Error was corrected | "Actually, the limit is 100, not 50" |
|
|
342
|
-
| `preference` | User/agent preference | "I prefer tabs over spaces" |
|
|
343
|
-
| `fact` | Important factual information | "The prod DB is on port 5433" |
|
|
147
|
+
# Block an entry from injection for a specific agent
|
|
148
|
+
palaia priorities block <entry-id> --agent orchestrator
|
|
344
149
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
## Adaptive Nudging
|
|
348
|
-
|
|
349
|
-
Palaia includes a graduation system that adapts to agent behavior:
|
|
350
|
-
|
|
351
|
-
**What it does:** When the agent writes an entry that relates to an existing process, Palaia nudges: "Related process found: [title]. Consider following it."
|
|
352
|
-
|
|
353
|
-
**How it learns:** The nudging system tracks whether agents follow stored processes. Over time:
|
|
354
|
-
- Agents that consistently follow processes see fewer nudges (graduated)
|
|
355
|
-
- Agents that frequently skip processes continue to receive nudges
|
|
356
|
-
- New processes always trigger nudges until a pattern is established
|
|
357
|
-
|
|
358
|
-
**Important:** SKILL.md documentation is the primary source for agent behavior. Nudging is the safety net for when agents don't read the docs — not a replacement for good documentation.
|
|
359
|
-
|
|
360
|
-
## Transparency Features
|
|
361
|
-
|
|
362
|
-
Palaia makes its memory operations visible to the user by default. Both features are enabled out of the box and can be toggled independently.
|
|
363
|
-
|
|
364
|
-
### Memory Source Footnotes
|
|
365
|
-
|
|
366
|
-
When Palaia injects memories into the agent context and the agent uses them in a response, a footnote is appended:
|
|
150
|
+
# Set per-agent injection thresholds
|
|
151
|
+
palaia priorities set recallMinScore 0.8 --agent orchestrator
|
|
367
152
|
|
|
153
|
+
# Adjust type weights per agent
|
|
154
|
+
palaia priorities set typeWeight.process 0.5 --agent orchestrator
|
|
368
155
|
```
|
|
369
|
-
Palaia: "PostgreSQL migration plan" (Mar 16), "Deploy process" (Mar 10)
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
This shows the user which memories influenced the response. Max 3 sources are shown, selected by keyword relevance between the memory title and the response text.
|
|
373
156
|
|
|
374
|
-
|
|
375
|
-
**Re-enable:** `palaia config set showMemorySources true`
|
|
157
|
+
Config stored in `.palaia/priorities.json` with layered overrides: global -> per-agent -> per-project.
|
|
376
158
|
|
|
377
|
-
###
|
|
159
|
+
### `palaia curate analyze/apply` — Knowledge curation
|
|
378
160
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
```
|
|
382
|
-
Saved: "Team decided to use PostgreSQL for the project due to JSON support"
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
This confirms that knowledge was stored and gives the user a preview of what was captured.
|
|
386
|
-
|
|
387
|
-
**Disable:** `palaia config set showCaptureConfirm false`
|
|
388
|
-
**Re-enable:** `palaia config set showCaptureConfirm true`
|
|
389
|
-
|
|
390
|
-
### Satisfaction and Preference Nudges
|
|
391
|
-
|
|
392
|
-
After sustained usage, Palaia nudges agents to check in with the user:
|
|
393
|
-
|
|
394
|
-
1. **Satisfaction check** (after ~10 successful recalls): Ask the user if the memory system is working well. Suggest `palaia doctor` if there are issues.
|
|
395
|
-
2. **Transparency preference** (after ~50 recalls or ~7 days): Ask the user whether they want to keep seeing footnotes and capture confirmations, or hide them. Both are one-shot nudges that won't repeat.
|
|
396
|
-
|
|
397
|
-
## Commands Reference
|
|
398
|
-
|
|
399
|
-
### Basic Memory
|
|
161
|
+
For migrating knowledge to a new instance, cleaning up old entries, or reviewing accumulated knowledge.
|
|
400
162
|
|
|
401
163
|
```bash
|
|
402
|
-
#
|
|
403
|
-
palaia
|
|
404
|
-
|
|
405
|
-
# Write a task with structured fields
|
|
406
|
-
palaia write "fix login bug" --type task --status open --priority high --assignee Elliot --due-date 2026-04-01
|
|
407
|
-
|
|
408
|
-
# Edit an existing entry (content, metadata, task fields)
|
|
409
|
-
palaia edit <id> ["new content"] [--status done] [--priority high] [--tags new,tags] [--title "New Title"] [--type task]
|
|
410
|
-
|
|
411
|
-
# Search memories (semantic + keyword) with structured filters
|
|
412
|
-
palaia query "search term" [--project NAME] [--limit N] [--all] [--type task] [--status open] [--priority high] [--assignee NAME] [--instance NAME]
|
|
413
|
-
|
|
414
|
-
# Read a specific entry by ID
|
|
415
|
-
palaia get <id> [--from LINE] [--lines N]
|
|
416
|
-
|
|
417
|
-
# List entries in a tier with filters
|
|
418
|
-
palaia list [--tier hot|warm|cold] [--project NAME] [--type task] [--status open] [--priority high] [--assignee NAME] [--instance NAME]
|
|
164
|
+
# Analyze: clusters entries, detects duplicates, recommends KEEP/MERGE/DROP
|
|
165
|
+
palaia curate analyze --project myapp
|
|
419
166
|
|
|
420
|
-
#
|
|
421
|
-
palaia
|
|
422
|
-
|
|
423
|
-
# Suggest type assignments for untyped entries
|
|
424
|
-
palaia migrate --suggest
|
|
167
|
+
# Apply: parses the user-edited report, produces clean export package
|
|
168
|
+
palaia curate apply report.md
|
|
425
169
|
```
|
|
426
170
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
Projects group related entries. They're optional — everything works without them.
|
|
430
|
-
|
|
431
|
-
```bash
|
|
432
|
-
# Create a project
|
|
433
|
-
palaia project create <name> [--description "..."] [--default-scope team]
|
|
434
|
-
|
|
435
|
-
# List all projects
|
|
436
|
-
palaia project list
|
|
437
|
-
|
|
438
|
-
# Show project details + entries
|
|
439
|
-
palaia project show <name>
|
|
440
|
-
|
|
441
|
-
# Write an entry directly to a project
|
|
442
|
-
palaia project write <name> "text" [--scope X] [--tags a,b] [--title "Title"]
|
|
171
|
+
Requires optional dependency: `pip install palaia[curate]` (adds scikit-learn).
|
|
443
172
|
|
|
444
|
-
|
|
445
|
-
palaia project query <name> "search term" [--limit N]
|
|
173
|
+
Tell your user: "I can analyze your memory for cleanup. Want me to run a curation report?"
|
|
446
174
|
|
|
447
|
-
|
|
448
|
-
palaia project set-scope <name> <scope>
|
|
449
|
-
|
|
450
|
-
# Delete a project (entries are preserved, just untagged)
|
|
451
|
-
palaia project delete <name>
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
### Agent Alias System
|
|
455
|
-
|
|
456
|
-
Aliases let multiple agent names resolve to the same identity. Scope checks and queries will match both the alias and the canonical name.
|
|
175
|
+
### `palaia sync export/import` — Git-based knowledge exchange
|
|
457
176
|
|
|
458
177
|
```bash
|
|
459
|
-
#
|
|
460
|
-
palaia
|
|
178
|
+
# Export entries for sharing
|
|
179
|
+
palaia sync export --project myapp --output ./export/
|
|
461
180
|
|
|
462
|
-
#
|
|
463
|
-
palaia
|
|
181
|
+
# Export to a git remote
|
|
182
|
+
palaia sync export --project myapp --remote git@github.com:team/knowledge.git
|
|
464
183
|
|
|
465
|
-
#
|
|
466
|
-
palaia
|
|
184
|
+
# Import entries
|
|
185
|
+
palaia sync import ./export/ --dry-run # Preview first
|
|
186
|
+
palaia sync import ./export/
|
|
467
187
|
```
|
|
468
188
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
### Project Locking
|
|
472
|
-
|
|
473
|
-
Advisory locks coordinate multi-agent work on projects. Locks auto-expire after TTL (default: 30 min).
|
|
189
|
+
### `palaia package export/import` — Portable knowledge packages
|
|
474
190
|
|
|
475
191
|
```bash
|
|
476
|
-
#
|
|
477
|
-
palaia
|
|
478
|
-
|
|
479
|
-
# Check if a project is locked
|
|
480
|
-
palaia project lock-status <name>
|
|
192
|
+
# Export project knowledge as a portable file
|
|
193
|
+
palaia package export myapp --output myapp.palaia-pkg.json
|
|
481
194
|
|
|
482
|
-
#
|
|
483
|
-
palaia project
|
|
484
|
-
|
|
485
|
-
# Force-break a stuck lock (use with caution)
|
|
486
|
-
palaia project break-lock <name>
|
|
195
|
+
# Import a knowledge package
|
|
196
|
+
palaia package import myapp.palaia-pkg.json --project target --merge skip
|
|
487
197
|
|
|
488
|
-
#
|
|
489
|
-
palaia
|
|
198
|
+
# View package metadata
|
|
199
|
+
palaia package info myapp.palaia-pkg.json
|
|
490
200
|
```
|
|
491
201
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
### Configuration
|
|
202
|
+
### `palaia doctor` — Diagnostics and auto-fix
|
|
495
203
|
|
|
496
204
|
```bash
|
|
497
|
-
#
|
|
498
|
-
palaia
|
|
499
|
-
|
|
500
|
-
# Get/set a single value
|
|
501
|
-
palaia config set <key> <value>
|
|
502
|
-
|
|
503
|
-
# Set the embedding fallback chain (ordered by priority)
|
|
504
|
-
palaia config set-chain <provider1> [provider2] [...] bm25
|
|
505
|
-
|
|
506
|
-
# Detect available embedding providers on this system
|
|
507
|
-
palaia detect
|
|
508
|
-
|
|
509
|
-
# Pre-download embedding models
|
|
510
|
-
palaia warmup
|
|
205
|
+
palaia doctor # Check health
|
|
206
|
+
palaia doctor --fix # Auto-fix issues
|
|
207
|
+
palaia doctor --json # Machine-readable output
|
|
511
208
|
```
|
|
512
209
|
|
|
513
|
-
|
|
210
|
+
Run this first whenever something is wrong. It checks versions, repairs chains, rebuilds indexes, detects legacy systems, and handles migration.
|
|
514
211
|
|
|
515
|
-
|
|
516
|
-
# Check Palaia health and detect legacy systems
|
|
517
|
-
palaia doctor
|
|
518
|
-
|
|
519
|
-
# Show guided fix instructions for each warning
|
|
520
|
-
palaia doctor --fix
|
|
521
|
-
|
|
522
|
-
# Machine-readable output
|
|
523
|
-
palaia doctor --json
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
### Maintenance
|
|
212
|
+
### `palaia gc` — Garbage collection
|
|
527
213
|
|
|
528
214
|
```bash
|
|
529
|
-
# Tier rotation
|
|
530
|
-
palaia gc
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
palaia recover
|
|
215
|
+
palaia gc # Tier rotation (HOT -> WARM -> COLD)
|
|
216
|
+
palaia gc --dry-run # Preview what would change
|
|
217
|
+
palaia gc --aggressive # Also clears COLD tier
|
|
218
|
+
palaia gc --budget 200 # Keep max N entries
|
|
534
219
|
```
|
|
535
220
|
|
|
536
|
-
###
|
|
221
|
+
### `palaia config` — Configuration
|
|
537
222
|
|
|
538
223
|
```bash
|
|
539
|
-
|
|
540
|
-
palaia
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
palaia query "question" --project X --rag
|
|
224
|
+
palaia config list # Show all settings
|
|
225
|
+
palaia config set <key> <value> # Set a value
|
|
226
|
+
palaia config set-chain fastembed bm25 # Set embedding chain
|
|
227
|
+
palaia config set-alias default HAL # Agent alias
|
|
544
228
|
```
|
|
545
229
|
|
|
546
|
-
###
|
|
230
|
+
### `palaia process` — Multi-step process tracking
|
|
547
231
|
|
|
548
232
|
```bash
|
|
549
|
-
#
|
|
550
|
-
palaia
|
|
551
|
-
|
|
552
|
-
# Import entries from an export
|
|
553
|
-
palaia import <path> [--dry-run]
|
|
554
|
-
|
|
555
|
-
# Import from other memory formats (smart-memory, flat-file, json-memory, generic-md)
|
|
556
|
-
palaia migrate <path> [--dry-run] [--format FORMAT] [--scope SCOPE]
|
|
233
|
+
palaia process list --project myapp # List stored processes
|
|
234
|
+
palaia process run <id> # Run interactively
|
|
557
235
|
```
|
|
558
236
|
|
|
559
|
-
###
|
|
237
|
+
### `palaia lock/unlock` — Entry and project locking
|
|
560
238
|
|
|
561
|
-
All commands support `--json` for machine-readable output:
|
|
562
239
|
```bash
|
|
563
|
-
palaia
|
|
564
|
-
palaia
|
|
565
|
-
palaia project
|
|
240
|
+
palaia project lock myapp --agent HAL --reason "refactoring"
|
|
241
|
+
palaia project lock-status myapp
|
|
242
|
+
palaia project unlock myapp
|
|
243
|
+
palaia project break-lock myapp # Force-break stuck lock
|
|
244
|
+
palaia project locks # List all active locks
|
|
566
245
|
```
|
|
567
246
|
|
|
568
|
-
|
|
247
|
+
### `palaia edit` — Modify existing entries
|
|
569
248
|
|
|
570
|
-
Every entry has a visibility scope:
|
|
571
|
-
|
|
572
|
-
- **`private`** — Only the agent that wrote it can read it
|
|
573
|
-
- **`team`** — All agents in the same workspace can read it (default)
|
|
574
|
-
- **`public`** — Can be exported and shared across workspaces
|
|
575
|
-
|
|
576
|
-
**Setting defaults:**
|
|
577
249
|
```bash
|
|
578
|
-
|
|
579
|
-
palaia
|
|
580
|
-
|
|
581
|
-
# Per-project default
|
|
582
|
-
palaia project set-scope <name> <scope>
|
|
250
|
+
palaia edit <id> --status done
|
|
251
|
+
palaia edit <id> "updated content" --tags new,tags --priority high
|
|
583
252
|
```
|
|
584
253
|
|
|
585
|
-
|
|
586
|
-
1. Explicit `--scope` flag → always wins
|
|
587
|
-
2. Project default scope → if entry belongs to a project
|
|
588
|
-
3. Global `default_scope` from config
|
|
589
|
-
4. Falls back to `team`
|
|
590
|
-
|
|
591
|
-
## Projects
|
|
592
|
-
|
|
593
|
-
- Projects are optional and purely additive — Palaia works fine without them
|
|
594
|
-
- Each project has its own default scope
|
|
595
|
-
- Writing with `--project NAME` or `palaia project write NAME` both assign to a project
|
|
596
|
-
- Deleting a project preserves its entries (they just lose the project tag)
|
|
597
|
-
- `palaia project show NAME` lists all entries with their tier and scope
|
|
598
|
-
|
|
599
|
-
## When to Use What
|
|
254
|
+
### Other commands
|
|
600
255
|
|
|
601
|
-
| Situation | Command |
|
|
602
|
-
|-----------|---------|
|
|
603
|
-
| Remember a simple fact | `palaia write "..."` |
|
|
604
|
-
| Remember something for a specific project | `palaia project write <name> "..."` |
|
|
605
|
-
| Create a task/todo | `palaia write "fix bug" --type task --priority high` |
|
|
606
|
-
| Record a process/SOP | `palaia write "deploy steps" --type process` |
|
|
607
|
-
| Mark task as done | `palaia edit <id> --status done` |
|
|
608
|
-
| Find something you stored | `palaia query "..."` |
|
|
609
|
-
| Find open tasks | `palaia query "tasks" --type task --status open` |
|
|
610
|
-
| List high-priority tasks | `palaia list --type task --priority high` |
|
|
611
|
-
| Find something within a project | `palaia project query <name> "..."` |
|
|
612
|
-
| Check what's in active memory | `palaia list` |
|
|
613
|
-
| Check what's in archived memory | `palaia list --tier cold` |
|
|
614
|
-
| See system health + class breakdown | `palaia status` |
|
|
615
|
-
| Clean up old entries | `palaia gc` |
|
|
616
|
-
| Index a document or website | `palaia ingest <file/url> --project <name>` |
|
|
617
|
-
| Get type suggestions for old entries | `palaia migrate --suggest` |
|
|
618
|
-
| Search indexed documents for LLM context | `palaia query "..." --project <name> --rag` |
|
|
619
|
-
|
|
620
|
-
## Document Knowledge Base
|
|
621
|
-
|
|
622
|
-
Use `palaia ingest` to index external documents — PDFs, websites, text files, directories.
|
|
623
|
-
Indexed content is chunked, embedded, and stored as regular entries (searchable like memory).
|
|
624
|
-
|
|
625
|
-
**When to use:**
|
|
626
|
-
- User asks you to "remember" a document, manual, or website
|
|
627
|
-
- You need to search through a large document
|
|
628
|
-
- Building a project-specific knowledge base
|
|
629
|
-
|
|
630
|
-
**How to use:**
|
|
631
256
|
```bash
|
|
632
|
-
palaia
|
|
633
|
-
palaia
|
|
634
|
-
palaia
|
|
635
|
-
|
|
636
|
-
palaia
|
|
257
|
+
palaia detect # Show available embedding providers
|
|
258
|
+
palaia warmup # Pre-build search index
|
|
259
|
+
palaia recover # Replay interrupted writes from WAL
|
|
260
|
+
palaia migrate <path> # Import from other memory formats
|
|
261
|
+
palaia migrate --suggest # Suggest type assignments for untyped entries
|
|
262
|
+
palaia ingest <file-or-url> --project X # Index documents (RAG)
|
|
263
|
+
palaia skill # Print this SKILL.md
|
|
637
264
|
```
|
|
638
265
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
**PDF support:** requires pdfplumber — install with: `pip install pdfplumber`
|
|
642
|
-
|
|
643
|
-
**Source attribution:** each chunk tracks its origin (file, page, URL) automatically.
|
|
644
|
-
|
|
645
|
-
## Error Handling
|
|
646
|
-
|
|
647
|
-
| Problem | What to do |
|
|
648
|
-
|---------|-----------|
|
|
649
|
-
| Embedding provider not available | Chain automatically falls back to next provider. Check `palaia status` to see which is active. |
|
|
650
|
-
| Write-ahead log corrupted | Run `palaia recover` — replays any interrupted writes. |
|
|
651
|
-
| Entries seem missing | Run `palaia recover`, then `palaia list`. Check all tiers (`--tier warm`, `--tier cold`). |
|
|
652
|
-
| Search returns no results | Try `palaia query "..." --all` to include COLD tier. Check `palaia status` to confirm provider is active. |
|
|
653
|
-
| `.palaia` directory missing | Run `palaia init` to create a fresh store. |
|
|
654
|
-
|
|
655
|
-
## Tiering
|
|
656
|
-
|
|
657
|
-
Palaia organizes entries into three tiers based on access frequency:
|
|
658
|
-
|
|
659
|
-
- **HOT** (default: 7 days) — Frequently accessed, always searched
|
|
660
|
-
- **WARM** (default: 30 days) — Less active, still searched by default
|
|
661
|
-
- **COLD** — Archived, only searched with `--all` flag
|
|
662
|
-
|
|
663
|
-
Run `palaia gc` periodically (or let cron handle it) to rotate entries between tiers. `palaia gc --aggressive` forces more entries to lower tiers.
|
|
664
|
-
|
|
665
|
-
## What Goes Where (Single Source of Truth)
|
|
666
|
-
|
|
667
|
-
This is the most important section for avoiding duplicated knowledge. Get this right.
|
|
668
|
-
|
|
669
|
-
**Project files (CONTEXT.md, MEMORY.md, etc.) = static facts:**
|
|
670
|
-
- Repo URL, tech stack, architecture overview, current version
|
|
671
|
-
- Palaia usage info for this project: project name, common tags, scopes, conventions
|
|
672
|
-
- Pointers to Palaia: "Processes: `palaia query --type process --project <name>`"
|
|
673
|
-
- Changes rarely. Never store processes, checklists, or decision logs here.
|
|
674
|
-
|
|
675
|
-
**Palaia = all dynamic knowledge:**
|
|
676
|
-
- Processes and checklists (type: process) — reusable, searchable, scope-aware
|
|
677
|
-
- Decisions and ADRs (type: memory, tag: adr)
|
|
678
|
-
- Learnings and insights (type: memory, tag: learning)
|
|
679
|
-
- Tasks and planning (type: task)
|
|
680
|
-
- Anything that evolves, gets shared, or should surface at the right time
|
|
681
|
-
|
|
682
|
-
**External issue trackers (GitHub Issues, Jira, etc.) = bugs and tickets:**
|
|
683
|
-
- If a project uses one: bugs, feature requests, and technical tickets live there
|
|
684
|
-
- Never duplicate between external trackers and Palaia tasks
|
|
685
|
-
|
|
686
|
-
**The test:** "Is this a static fact about the project?" → project file. "Is this knowledge that evolves, gets shared, or should be actively surfaced?" → Palaia. "Is this a bug or feature request?" → external tracker.
|
|
687
|
-
|
|
688
|
-
**Best practice: persist concrete work state, not just project names.**
|
|
689
|
-
When saving active context, write the exact step, blocker, and next action — not just "working on Project X". Bad: `palaia write "Working on the API"`. Good: `palaia write "API auth module: implementing JWT refresh tokens, blocked on token expiry race condition, next step: add mutex around refresh logic" --project myapp --tag active-work`. This ensures continuity across sessions and context switches — the next session knows exactly where to pick up.
|
|
690
|
-
|
|
691
|
-
**Common mistakes to avoid:**
|
|
692
|
-
- Writing a release checklist into CONTEXT.md instead of `palaia write --type process`
|
|
693
|
-
- Keeping decision logs in markdown files instead of Palaia entries
|
|
694
|
-
- Duplicating task lists between files and Palaia
|
|
695
|
-
- Persisting vague status ("working on X") instead of concrete state (step, blocker, next action)
|
|
266
|
+
All commands support `--json` for machine-readable output.
|
|
696
267
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
When your user installs Palaia, they're telling you: "I want better memory management." That's the benchmark. Your job is to make Palaia deliver on that promise — without breaking what already works.
|
|
700
|
-
|
|
701
|
-
**If your workspace has existing CONTEXT.md, MEMORY.md, or AGENTS.md files with memory rules that predate Palaia:**
|
|
268
|
+
---
|
|
702
269
|
|
|
703
|
-
|
|
704
|
-
2. **Do identify overlaps.** Read through the existing memory rules and find where they conflict with effective Palaia usage. Common patterns:
|
|
705
|
-
- "Write all project knowledge to CONTEXT.md" → Processes, decisions, and learnings are better in Palaia (searchable, scope-aware, nudge-capable)
|
|
706
|
-
- "Keep checklists in MEMORY.md" → These should be Palaia process entries
|
|
707
|
-
- "Update CONTEXT.md after every task" → Static facts yes, dynamic knowledge should go to Palaia
|
|
708
|
-
3. **Propose changes to your user.** Explain what you found, why Palaia would serve them better for dynamic knowledge, and suggest specific edits to their workspace files. Don't make the changes silently.
|
|
709
|
-
4. **Migrate gradually.** Move one category at a time (e.g., processes first, then decisions). After each migration, add a pointer in the old location: "Processes now live in Palaia: `palaia query --type process`"
|
|
710
|
-
5. **Keep what works.** CONTEXT.md is great for static project steckbriefs. MEMORY.md is great for session-start headlines. These files complement Palaia — they don't compete with it. The goal is clear boundaries, not replacing everything.
|
|
270
|
+
## Smart Nudging
|
|
711
271
|
|
|
712
|
-
|
|
713
|
-
- CONTEXT.md: project URL, tech stack, current version, Palaia project name + common tags
|
|
714
|
-
- MEMORY.md: routing rules, agent identities, quick-reference pointers
|
|
715
|
-
- Palaia: processes, decisions, learnings, tasks, anything searchable or shareable
|
|
272
|
+
Palaia's CLI output contains contextual hints prefixed with `[palaia]`. These are important guidance.
|
|
716
273
|
|
|
717
|
-
**
|
|
274
|
+
**As an agent, you should:**
|
|
275
|
+
- Read and act on nudge messages in CLI output
|
|
276
|
+
- Never suppress or ignore `[palaia]` prefixed output
|
|
277
|
+
- Follow recommendations (e.g., "consider running palaia curate", "related process found")
|
|
278
|
+
- Check for unread memos when nudged
|
|
718
279
|
|
|
719
|
-
|
|
280
|
+
**How nudging works:**
|
|
281
|
+
- Nudges are contextual: they appear when relevant (e.g., after a write that matches an existing process)
|
|
282
|
+
- Nudges graduate: after 3 consecutive successes, the nudge retires
|
|
283
|
+
- Nudges regress: if habits slip, the nudge re-activates
|
|
284
|
+
- Nudges never repeat unnecessarily — frequency-limited and suppressed in `--json` mode
|
|
720
285
|
|
|
721
|
-
|
|
286
|
+
---
|
|
722
287
|
|
|
723
|
-
|
|
724
|
-
- Roadmap items, TODOs, pending tasks from CONTEXT.md or MEMORY.md → `palaia write --type task --status open --priority <level>`
|
|
725
|
-
- Checklists, SOPs, release processes → `palaia write --type process`
|
|
726
|
-
- Existing Palaia entries without type → run `palaia migrate --suggest` for recommendations
|
|
288
|
+
## Multi-Agent Coordination
|
|
727
289
|
|
|
728
|
-
|
|
729
|
-
-
|
|
730
|
-
-
|
|
731
|
-
-
|
|
290
|
+
### Scopes across agents
|
|
291
|
+
- `private` entries are only visible to the writing agent
|
|
292
|
+
- `team` entries are visible to all agents in the workspace
|
|
293
|
+
- `public` entries can be exported across workspaces
|
|
732
294
|
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
- This distinguishes entries from different sessions of the same agent
|
|
736
|
-
- Use `--instance` flag on queries to filter by session origin
|
|
737
|
-
- Alternatively, set `PALAIA_INSTANCE` env var (config file takes precedence)
|
|
295
|
+
### Agent identity
|
|
296
|
+
Set via `--agent` flag, `PALAIA_AGENT` env var, or `palaia init --agent NAME`. Stored in `.palaia/config.json`.
|
|
738
297
|
|
|
739
|
-
**
|
|
740
|
-
- After `palaia query` and `palaia write`, Palaia automatically checks for unread memos
|
|
741
|
-
- If unread memos exist: "You have N unread memos. Run: palaia memo inbox"
|
|
742
|
-
- This nudge is frequency-limited (max 1x/hour) and suppressed in --json mode
|
|
298
|
+
**CRITICAL:** Every agent MUST have a unique `PALAIA_AGENT` value. Without it, all entries are attributed to "default" and scope filtering does not work correctly.
|
|
743
299
|
|
|
744
|
-
|
|
300
|
+
### Setting up additional agents
|
|
745
301
|
|
|
746
|
-
When
|
|
302
|
+
When new agents join an existing OpenClaw instance that already has palaia, each agent needs palaia awareness:
|
|
747
303
|
|
|
748
|
-
1.
|
|
304
|
+
1. Set the agent's identity:
|
|
749
305
|
```bash
|
|
750
|
-
|
|
751
|
-
# or broadcast to all:
|
|
752
|
-
palaia memo broadcast "New process available — check palaia query --type process"
|
|
306
|
+
export PALAIA_AGENT=<agent-name>
|
|
753
307
|
```
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
308
|
+
2. Add palaia's SKILL.md to the agent's skill set (via ClawHub or manual config)
|
|
309
|
+
3. Join the shared store:
|
|
310
|
+
```bash
|
|
311
|
+
palaia instance set <instance-id>
|
|
312
|
+
```
|
|
313
|
+
4. Verify connectivity:
|
|
314
|
+
```bash
|
|
315
|
+
palaia doctor
|
|
316
|
+
palaia memo inbox
|
|
762
317
|
```
|
|
763
318
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
319
|
+
If a new agent is added later and does NOT have palaia configured, it will:
|
|
320
|
+
- Not auto-capture conversations
|
|
321
|
+
- Not benefit from shared team knowledge
|
|
322
|
+
- Potentially duplicate work that palaia already tracked
|
|
767
323
|
|
|
768
|
-
|
|
324
|
+
Use `palaia memo broadcast "New agent <name> is online"` to notify the team.
|
|
769
325
|
|
|
770
|
-
|
|
326
|
+
### Aliases
|
|
327
|
+
When an agent runs under different names (e.g., "default" during init, "HAL" during operation):
|
|
328
|
+
```bash
|
|
329
|
+
palaia alias set default HAL
|
|
330
|
+
```
|
|
331
|
+
Queries for either name return entries from both.
|
|
771
332
|
|
|
772
|
-
|
|
333
|
+
### Per-agent priorities
|
|
334
|
+
Different agents can have different injection behavior:
|
|
335
|
+
```bash
|
|
336
|
+
palaia priorities set recallMinScore 0.8 --agent orchestrator
|
|
337
|
+
palaia priorities set typeWeight.process 0.5 --agent worker
|
|
338
|
+
palaia priorities block <entry-id> --agent orchestrator
|
|
339
|
+
```
|
|
773
340
|
|
|
341
|
+
### Session instances
|
|
342
|
+
Distinguish sessions of the same agent:
|
|
774
343
|
```bash
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
# or: uv tool install "palaia[fastembed]" (always include [fastembed]!)
|
|
344
|
+
palaia instance set Claw-Main
|
|
345
|
+
```
|
|
778
346
|
|
|
779
|
-
|
|
780
|
-
npm install -g @byte5ai/palaia@latest
|
|
347
|
+
---
|
|
781
348
|
|
|
782
|
-
|
|
349
|
+
## When to Use What
|
|
783
350
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
palaia
|
|
787
|
-
|
|
351
|
+
| Situation | Command |
|
|
352
|
+
|-----------|---------|
|
|
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` |
|
|
357
|
+
| Find something | `palaia query "..."` |
|
|
358
|
+
| Find open tasks | `palaia list --type task --status open` |
|
|
359
|
+
| Check system health | `palaia status` |
|
|
360
|
+
| Something is wrong | `palaia doctor --fix` |
|
|
361
|
+
| Clean up old entries | `palaia gc` |
|
|
362
|
+
| Review accumulated knowledge | `palaia curate analyze` |
|
|
363
|
+
| Share knowledge | `palaia sync export` or `palaia package export` |
|
|
364
|
+
| Check for messages | `palaia memo inbox` |
|
|
365
|
+
| Start of session | `palaia doctor` then `palaia query "active work"` then `palaia memo inbox` |
|
|
788
366
|
|
|
789
|
-
**
|
|
367
|
+
**Do NOT manually write:** facts, decisions, or preferences that came up in the current conversation. Auto-Capture handles these.
|
|
790
368
|
|
|
791
|
-
|
|
369
|
+
**DO manually write:** processes, tasks with structured fields, knowledge from external sources, project setup.
|
|
792
370
|
|
|
793
|
-
|
|
371
|
+
---
|
|
794
372
|
|
|
795
|
-
|
|
373
|
+
## Auto-Capture and Manual Write
|
|
796
374
|
|
|
797
|
-
###
|
|
798
|
-
|
|
375
|
+
### How Auto-Capture works
|
|
376
|
+
Auto-capture runs after every agent turn (when OpenClaw plugin is active). It:
|
|
377
|
+
1. Collects messages from the completed exchange
|
|
378
|
+
2. Filters trivial content
|
|
379
|
+
3. Uses LLM extraction to identify significant knowledge
|
|
380
|
+
4. Writes entries with appropriate type, tags, scope, and project
|
|
381
|
+
5. Falls back to rule-based extraction if LLM is unavailable
|
|
799
382
|
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
383
|
+
### Capture Hints
|
|
384
|
+
Guide auto-capture without writing manually:
|
|
385
|
+
```
|
|
386
|
+
<palaia-hint project="myapp" scope="private" />
|
|
387
|
+
```
|
|
388
|
+
Hints override LLM detection. Multiple hints supported. Automatically stripped from output.
|
|
805
389
|
|
|
806
|
-
|
|
390
|
+
### Capture Levels
|
|
391
|
+
```bash
|
|
392
|
+
palaia init --capture-level <off|minimal|normal|aggressive>
|
|
393
|
+
```
|
|
807
394
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
- Switching providers invalidates the embedding cache — run `palaia warmup` after any chain change
|
|
395
|
+
| Level | Behavior |
|
|
396
|
+
|-------|----------|
|
|
397
|
+
| `off` | Manual-only memory |
|
|
398
|
+
| `minimal` | Significant exchanges, min 5 turns |
|
|
399
|
+
| `normal` | Significant exchanges, min 2 turns (default) |
|
|
400
|
+
| `aggressive` | Every exchange, min 1 turn |
|
|
815
401
|
|
|
816
|
-
|
|
817
|
-
Don't batch all your learnings into one big write at the end. Write after each meaningful step:
|
|
818
|
-
```bash
|
|
819
|
-
# After a decision
|
|
820
|
-
palaia write "Decided to use FastAPI over Flask — async support needed for webhook handlers" --project myproject --tag decision
|
|
402
|
+
---
|
|
821
403
|
|
|
822
|
-
|
|
823
|
-
palaia write "Redis connection pool exhausted under load — need to configure max_connections" --project myproject --tag blocker,active-work
|
|
404
|
+
## Plugin Configuration (OpenClaw)
|
|
824
405
|
|
|
825
|
-
|
|
826
|
-
palaia write "Fixed Redis pool: set max_connections=50, added connection timeout=5s" --project myproject --tag learning
|
|
827
|
-
```
|
|
828
|
-
If your session crashes, the knowledge survives. If you write at the end, it doesn't.
|
|
406
|
+
Set in `openclaw.json` under `plugins.entries.palaia.config`:
|
|
829
407
|
|
|
830
|
-
|
|
831
|
-
|
|
408
|
+
| Key | Default | Description |
|
|
409
|
+
|-----|---------|-------------|
|
|
410
|
+
| `memoryInject` | `true` | Inject relevant memories into agent context |
|
|
411
|
+
| `maxInjectedChars` | `4000` | Max characters for injected context |
|
|
412
|
+
| `autoCapture` | `true` | Capture significant exchanges automatically |
|
|
413
|
+
| `captureFrequency` | `"significant"` | `"every"` or `"significant"` |
|
|
414
|
+
| `captureMinTurns` | `2` | Minimum turns before capture |
|
|
415
|
+
| `captureModel` | auto | Model for extraction (e.g. `"anthropic/claude-haiku-4-5"`) |
|
|
416
|
+
| `recallMode` | `"query"` | `"list"` or `"query"` |
|
|
417
|
+
| `recallMinScore` | `0.7` | Minimum score for recall results |
|
|
418
|
+
| `embeddingServer` | `true` | Keep embedding model loaded for fast queries |
|
|
419
|
+
| `showMemorySources` | `true` | Show memory source footnotes |
|
|
420
|
+
| `showCaptureConfirm` | `true` | Show capture confirmations |
|
|
832
421
|
|
|
833
|
-
|
|
834
|
-
Palaia uses kernel-level file locking (`fcntl.flock`) with a Write-Ahead Log (WAL) to ensure data integrity. Multiple concurrent `palaia write` calls — such as those from OpenClaw's parallel tool calling — are safe:
|
|
835
|
-
- Each write acquires an exclusive lock before touching the store
|
|
836
|
-
- The WAL guarantees crash recovery even if a write is interrupted mid-operation
|
|
837
|
-
- No entry loss, no corruption, no cross-contamination between parallel writes
|
|
838
|
-
- Lock timeout is 5 seconds (configurable via `lock_timeout_seconds`); stale locks (>60s) are auto-detected and overridden
|
|
422
|
+
---
|
|
839
423
|
|
|
840
|
-
|
|
424
|
+
## Dangerous Operations
|
|
841
425
|
|
|
842
|
-
|
|
843
|
-
Pick tags that your future self (or another agent) would search for. Good tags: `decision`, `learning`, `blocker`, `adr`, `release`, `config`. Bad tags: `important`, `note`, `misc`. Use `--project` consistently — it's the primary filter for all multi-project setups.
|
|
426
|
+
**Be careful with these commands:**
|
|
844
427
|
|
|
845
|
-
|
|
846
|
-
|
|
428
|
+
- **`palaia gc --aggressive`** — Permanently deletes COLD-tier entries. Always run `palaia gc --aggressive --dry-run` first and confirm with the user before executing.
|
|
429
|
+
- **Never write secrets** — Do not store passwords, API keys, tokens, or credentials as palaia entries. They persist in the database and may be shared via `--scope team` or `--scope public`.
|
|
430
|
+
- **`--scope public` overuse** — Public entries are exportable to other instances. Only use for genuinely shareable knowledge. Default to `team` scope.
|
|
431
|
+
- **"Forget everything" / "Delete my data"** — If a user asks to delete their data, explain that palaia does not have a bulk-delete command. Guide them to `palaia gc --aggressive` for cold entries, or manual `palaia edit <id>` / project deletion. Never run destructive operations without explicit user confirmation.
|
|
847
432
|
|
|
848
|
-
|
|
849
|
-
At the start of every session:
|
|
850
|
-
1. `palaia doctor` — catch any issues
|
|
851
|
-
2. `palaia query "active work"` — pick up where you left off
|
|
852
|
-
3. `palaia memo inbox` — check for messages from other agents
|
|
433
|
+
## Error Handling
|
|
853
434
|
|
|
854
|
-
|
|
855
|
-
1. Write your current state: exact step, any blockers, next action
|
|
856
|
-
2. Close any open tasks: `palaia edit <id> --status done`
|
|
435
|
+
**NEVER silently ignore palaia errors. Always report them clearly to the user.**
|
|
857
436
|
|
|
858
|
-
|
|
437
|
+
| Problem | What to do |
|
|
438
|
+
|---------|-----------|
|
|
439
|
+
| Something is wrong | `palaia doctor --fix` first, debug second |
|
|
440
|
+
| `palaia write` fails | Run `palaia doctor --fix`, then retry. If WAL replay needed, run `palaia recover`. |
|
|
441
|
+
| `palaia query` returns nothing | Try `palaia query "..." --all` to include COLD tier. Check `palaia list` to verify entries exist. |
|
|
442
|
+
| Entries seem missing | `palaia recover` then `palaia list --tier cold` |
|
|
443
|
+
| Slow queries | `palaia warmup` then check `palaia detect` |
|
|
444
|
+
| Provider not available | Chain auto-falls back. Check `palaia status` |
|
|
445
|
+
| Embedding provider unavailable | BM25 works without embeddings. Check `palaia detect` for available providers. |
|
|
859
446
|
|
|
860
|
-
|
|
861
|
-
|-----|---------|-------------|
|
|
862
|
-
| `default_scope` | `team` | Default visibility for new entries |
|
|
863
|
-
| `embedding_chain` | *(auto)* | Ordered list of search providers |
|
|
864
|
-
| `embedding_provider` | `auto` | Legacy single-provider setting |
|
|
865
|
-
| `embedding_model` | — | Per-provider model overrides |
|
|
866
|
-
| `hot_threshold_days` | `7` | Days before HOT → WARM |
|
|
867
|
-
| `warm_threshold_days` | `30` | Days before WARM → COLD |
|
|
868
|
-
| `hot_max_entries` | `50` | Max entries in HOT tier |
|
|
869
|
-
| `decay_lambda` | `0.1` | Decay rate for memory scores |
|
|
447
|
+
If `palaia doctor --fix` cannot resolve an issue, report the full error output to the user. Do not guess at fixes.
|
|
870
448
|
|
|
871
449
|
---
|
|
872
450
|
|
|
873
|
-
(c) 2026 byte5 GmbH
|
|
451
|
+
(c) 2026 byte5 GmbH -- MIT License
|