Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,48 @@ mcp_servers:
args: ["alice-memory", "mcp", "--data-dir", "~/.alice"]
```

#### OpenClaw

OpenClaw reads `~/.openclaw/openclaw.json`, under `mcp.servers`:

```json
{
"mcp": {
"servers": {
"alice": {
"command": "uvx",
"args": ["alice-memory", "mcp", "--data-dir", "~/.alice"]
}
}
}
}
```

Or add it from the CLI, which probes the server before saving:

```bash
openclaw mcp add alice --command uvx --arg alice-memory --arg mcp --arg --data-dir --arg ~/.alice
```

Confirm with `openclaw mcp probe`, which should report `alice: 11 tools`. OpenClaw
prefixes MCP tool names with the server name, so `alice_recall` reaches the model as
`alice__alice_recall`.

#### Skill packs

Optional, and useful once Alice is connected. [`agent-skills/`](https://github.com/samrusani/AliceMemory/tree/main/agent-skills)
holds a ready-made instruction pack for each host, telling the agent when to reach for
memory rather than leaving it to guess. Copy the directory, not the file:

```bash
cp -R agent-skills/openclaw/alice-project-memory ~/.openclaw/skills/
cp -R agent-skills/hermes/alice-memory ~/.hermes/skills/
```

Both hosts load `<skill-name>/SKILL.md` and read the frontmatter `description` to decide
when the skill applies. A skill grants no tools on its own; it tells an agent how to use
the ones the MCP server already provides.

SQLite mode is the single-agent path and the one most agents should use: it serves the eleven core tools for one user, and memory review happens through `alice_memory_review` / `alice_memory_correct` instead of the web console. Boundaries are listed in [known limitations](https://github.com/samrusani/AliceMemory/blob/main/docs/alpha/known-limitations.md).

> **Install note:** the PyPI package is [`alice-memory`](https://pypi.org/project/alice-memory/). The name `alice-core` on PyPI belongs to an unrelated project.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
---
name: alice-memory
description: Use Alice as the user's durable local memory. Load before answering from context, and whenever you learn something worth keeping across sessions.
version: 1.0.0
author: Alice Memory
license: MIT
platforms: [linux, macos, windows]
metadata:
hermes:
tags: [Memory, Continuity, MCP, Recall]
related_skills: []
---

# Hermes Alice Memory Skill

Use Alice as the user's durable local memory and continuity layer.
Expand All @@ -7,7 +20,9 @@ Default loop — one first call, then act, then write back:
1. Call `alice_context_pack` ONCE with a scoped query before planning, answering, or acting on important user context. The pack already carries memories, open loops, sources, contradictions, and honest gaps — do not stitch together raw searches first.
2. Act, treating `staleness` notes and `contradicting_evidence` as caution signals.
3. Call `alice_memory_commit` whenever you learn a durable fact worth keeping, including when the user has not asked you to remember it. It is the write verb for ordinary memory and what it records is immediately recallable. Use `alice_capture` for source documents and raw notes you want on record: it is review-gated, so `alice_recall` will not return it until a human reviews it.
4. Finish lifecycle work with `alice_memory_manage` (`confirm`/`undo`/`forget`) and track unresolved work with `alice_open_loops`.
4. Finish lifecycle work with `alice_memory_manage` (`confirm`/`undo`/`forget`). Record unresolved work with `alice_memory_commit` using `memory_type: "open_loop"`; `alice_open_loops` reads and closes loops, it does not create them.

Your host may prefix these tool names with the server name. Read the names from the host's own tool list rather than assuming the bare form.

Context depth (request field `context_depth`; deterministic retrieval, never model synthesis): `minimal` for single-fact checks (full-text only, max 4 memories, no sources/contradictions), `low` (default) for normal task context, `medium` for briefings and reviews (contradiction check on for every query type), `high` for audits and revision history (adds supersession chain notes). Explicit `include_sources`/`include_contradictions` override the tier default. The matching MCP tool arguments arrive in the same release — follow the server's `tools/list` schema.

Expand All @@ -16,7 +31,7 @@ Rules:
- never directly mutate trusted memory or the database
- never bypass Alice policy
- never request sensitive domains unless needed and allowed
- use `/vnext` review queues for human approval, audit, undo, correction, and forget flows
- use `alice_memory_review` and `alice_memory_correct` for human approval, audit, correction and forget flows

Default identity:

Expand All @@ -26,24 +41,26 @@ Default identity:

Default scope is broad but policy-filtered. Avoid `health`, `family`, `spiritual`, `legal`, `financial`, and `regulated` unless the user explicitly enables that scope.

Good memory proposal:
Good ambient commit, nobody asked for this one:

```json
{"canonical_text":"The user prefers daily planning summaries with decisions, blockers, and next actions.","domain":"personal","sensitivity":"private","confidence":0.84}
{"title":"Preferred daily planning format","canonical_text":"The user prefers daily planning summaries with decisions, blockers, and next actions.","domain":"personal","sensitivity":"private","confidence":0.84}
```

Good explicit commit:
Good explicit commit, the user said to remember it:

```json
{"agent_id":"hermes","permission_profile":"trusted_local_agent","intent":"explicit_remember","title":"Preferred daily planning format","canonical_text":"The user prefers daily planning summaries with decisions, blockers, and next actions.","domain":"personal","sensitivity":"private","confidence":0.93,"source_type":"direct_user_instruction"}
{"agent_id":"hermes","agent_type":"personal_assistant","permission_profile":"trusted_local_agent","title":"Preferred daily planning format","canonical_text":"The user prefers daily planning summaries with decisions, blockers, and next actions.","domain":"personal","sensitivity":"private","confidence":0.93,"source_type":"direct_user_instruction"}
```

If Alice returns `confirmation_required`, show the proposed text and call `alice_vnext_confirm_memory` only after the user confirms. If Alice returns `review_required`, do not retry broadly; leave it for `/vnext` review. The `alice_vnext_*` MCP tools are on the legacy surface and require `ALICE_MCP_LEGACY_TOOLS=1` on the Alice MCP server.
`title` and `canonical_text` are the only required fields. Everything else is optional, and any field not in the server's `tools/list` schema is rejected outright rather than ignored.

If Alice returns `confirmation_required`, show the proposed text and, only after the user confirms, call `alice_memory_manage` with `action: "confirm"` and the `confirmation_id` Alice returned. If Alice returns `review_required`, do not retry broadly; leave it for `alice_memory_review`.

Bad memory proposal:
Bad commit, too low confidence to be worth storing:

```json
{"canonical_text":"The user might dislike long reports.","confidence":0.31}
{"title":"Possible reporting preference","canonical_text":"The user might dislike long reports.","confidence":0.31}
```

See `docs/alpha/hermes-skill.md` for full recipes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
name: alice-project-memory
description: Use Alice as the project-scoped memory and continuity layer. Load before build or review work, and whenever a decision or constraint is worth keeping.
version: 1.0.0
author: Alice Memory
license: MIT
platforms: [linux, macos, windows]
---

# OpenClaw Alice Project Memory Skill

Use Alice as the project-scoped memory and continuity layer.
Expand All @@ -7,10 +16,12 @@ Default loop — one first call, then act, then write back:
1. Identify as OpenClaw.
2. Call `alice_context_pack` ONCE, project-scoped, before build or review work. The pack already carries decisions, procedures, open loops, sources, and contradictions — do not run raw searches first.
3. Perform the assigned build or review task, treating `staleness` notes and `contradicting_evidence` as caution signals.
4. Commit project-scoped memory via `alice_memory_commit` whenever you learn something worth keeping and the domain is `project`, including when the user has not asked you to remember it. It is the write verb for ordinary memory and what it records is immediately recallable. Use `alice_capture` for source documents, external evidence and raw notes: it is review-gated, so `alice_recall` will not return it until a human reviews it. Submit sprint outputs as reviewable agent outputs.
5. Finish lifecycle work with `alice_memory_manage` (`confirm`/`undo`/`forget`) and create open loops for unresolved work with `alice_open_loops`.
4. Commit project-scoped memory via `alice_memory_commit` whenever you learn something worth keeping and the domain is `project`, including when the user has not asked you to remember it. It is the write verb for ordinary memory and what it records is immediately recallable. Use `alice_capture` for source documents, external evidence, raw notes and generated sprint summaries: it is review-gated, so `alice_recall` will not return it until a human reviews it.
5. Finish lifecycle work with `alice_memory_manage` (`confirm`/`undo`/`forget`). Record unresolved work with `alice_memory_commit` using `memory_type: "open_loop"`; `alice_open_loops` reads and closes loops, it does not create them.
6. Do not access or write non-project personal domains.

Your host may prefix these tool names with the server name. In OpenClaw a server configured as `alice` exposes `alice_context_pack` as `alice__alice_context_pack`. Read the names from the host's own tool list rather than assuming the bare form.

Context depth (request field `context_depth`; deterministic retrieval, never model synthesis): `minimal` for quick fact checks (full-text only, max 4 memories, no sources/contradictions), `low` (default) for normal pre-task context, `medium` for reviews and status reports (contradiction check on for every query type), `high` for audits and revision history (adds supersession chain notes). Explicit `include_sources`/`include_contradictions` override the tier default. The matching MCP tool arguments arrive in the same release — follow the server's `tools/list` schema.

Default identity:
Expand All @@ -25,18 +36,20 @@ Context/read domains may include `project`, `professional`, and `system` when po

Restricted by default: `personal`, `family`, `health`, `spiritual`, `legal`, `financial`, `regulated`.

Submit sprint output:
Submit a sprint output with `alice_capture`. It is review-gated, which is what you want for a generated summary; the field carrying the text is `raw_text`:

```json
{"agent_id":"openclaw","agent_type":"coding_agent","agent_run_id":"openclaw-sprint-001","task_id":"public-alpha-packaging","project_scope":["Alice"],"title":"OpenClaw sprint summary","content":"Decision: Agents use scoped context packs and review-only memory proposals.","output_type":"sprint_summary","domain":"project","sensitivity":"private","propose_memory":true}
{"agent_id":"openclaw","agent_type":"coding_agent","agent_run_id":"openclaw-sprint-001","task_id":"public-alpha-packaging","project_scope":["Alice"],"title":"OpenClaw sprint summary","raw_text":"Decision: Agents use scoped context packs and review-only memory proposals.","domain":"project","sensitivity":"private"}
```

Explicit project memory commit:
Project memory commit:

```json
{"agent_id":"openclaw","agent_type":"coding_agent","permission_profile":"project_scoped_agent","project_scope":["Alice"],"intent":"explicit_remember","title":"Release gate decision","canonical_text":"Alice public alpha release gates require doctor, smokes, evals, and git diff checks before merge.","domain":"project","sensitivity":"private","confidence":0.94,"source_type":"direct_user_instruction"}
{"agent_id":"openclaw","agent_type":"coding_agent","permission_profile":"project_scoped_agent","project_scope":["Alice"],"title":"Release gate decision","canonical_text":"Alice public alpha release gates require doctor, smokes, evals, and git diff checks before merge.","domain":"project","sensitivity":"private","confidence":0.94,"source_type":"direct_user_instruction"}
```

Use `alice_vnext_undo_memory`, `alice_vnext_correct_memory`, or `alice_vnext_forget_memory` through Alice if a committed project memory needs reversal or repair. Never edit Postgres directly. The `alice_vnext_*` MCP tools are on the legacy surface and require `ALICE_MCP_LEGACY_TOOLS=1` on the Alice MCP server.
`title` and `canonical_text` are the only required fields on a commit. Everything else is optional, and any field not in the server's `tools/list` schema is rejected outright rather than ignored. A `project_scoped_agent` must send `domain: "project"`, or the commit is rejected.

Use `alice_memory_manage` for reversal or repair of a committed project memory: `action` of `undo`, `forget`, or `expire`, with the `memory_id` Alice returned. Never edit the database directly.

See `docs/alpha/openclaw-skill.md` for full recipes.
4 changes: 2 additions & 2 deletions docs/alpha/agent-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Agents should use Alice as a durable, private, provenance-aware, reviewable memo
{
"mcpServers": {
"alice": {
"command": "/ABSOLUTE/PATH/TO/AliceBot/.venv/bin/python",
"command": "/ABSOLUTE/PATH/TO/AliceMemory/.venv/bin/python",
"args": ["-m", "alicebot_api.mcp_server"],
"cwd": "/ABSOLUTE/PATH/TO/AliceBot",
"cwd": "/ABSOLUTE/PATH/TO/AliceMemory",
"env": {
"DATABASE_URL": "postgresql://alicebot_app:alicebot_app@localhost:5432/alicebot",
"ALICEBOT_AUTH_USER_ID": "00000000-0000-0000-0000-000000000001"
Expand Down
26 changes: 15 additions & 11 deletions docs/alpha/context-pack-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,98 @@

Every recipe uses scoped context and avoids raw unrestricted memory access.

These are `alice_context_pack` arguments. The scope fields are flat properties on the request,
not nested under `scope` and `options`; an unrecognised property is rejected outright rather
than ignored.

## 1. Project Sprint Context

- Purpose: prepare a coding agent for sprint work.
- Agent type: `coding_agent`
- Permission: `project_scoped_agent`

```json
{"query":"current sprint decisions blockers architecture constraints","scope":{"domains":["project"],"projects":["Alice"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}}
{"query":"current sprint decisions blockers architecture constraints","domains":["project"],"projects":["Alice"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}
```

Next: build or review only within project scope. Do not request personal domains.

## 2. Code Review Context

```json
{"query":"recent changes review findings unresolved risks","scope":{"domains":["project"],"projects":["Alice"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":8}}
{"query":"recent changes review findings unresolved risks","domains":["project"],"projects":["Alice"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":8}
```

Next: cite findings and create open loops for unresolved issues. Do not promote review claims as trusted memory.

## 3. Research Context

```json
{"query":"research notes decisions sources open questions","scope":{"domains":["project","professional"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":8}}
{"query":"research notes decisions sources open questions","domains":["project","professional"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":8}
```

Next: ingest report output. Do not include speculative claims as memory.

## 4. Daily Assistant Context

```json
{"query":"today priorities open loops recent decisions","scope":{"domains":["personal","professional","project"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":12}}
{"query":"today priorities open loops recent decisions","domains":["personal","professional","project"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":12}
```

Next: propose only stable preferences or durable decisions.

## 5. Meeting Preparation Context

```json
{"query":"meeting preparation stakeholders decisions open loops","scope":{"domains":["professional","project"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}}
{"query":"meeting preparation stakeholders decisions open loops","domains":["professional","project"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}
```

Next: generate a reviewable prep artifact. Do not request restricted domains unless needed.

## 6. Investor Or Stakeholder Briefing Context

```json
{"query":"stakeholder briefing milestones risks decisions","scope":{"domains":["professional","project"]},"options":{"sensitivity_allowed":["public","internal","private"],"max_items":10}}
{"query":"stakeholder briefing milestones risks decisions","domains":["professional","project"],"sensitivity_allowed":["public","internal","private"],"max_items":10}
```

Next: produce a brief with source references. Do not include private personal data.

## 7. Recent Decisions Context

```json
{"query":"recent decisions","scope":{"domains":["project"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}}
{"query":"recent decisions","domains":["project"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}
```

Next: use decisions as constraints. Do not infer new decisions.

## 8. Recent Changes Context

```json
{"query":"recent changes since last sprint","scope":{"domains":["project"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}}
{"query":"recent changes since last sprint","domains":["project"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}
```

Next: summarize changes and submit output back to Alice.

## 9. Open Loops Context

```json
{"query":"open loops blockers waiting for follow ups","scope":{"domains":["project","professional"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}}
{"query":"open loops blockers waiting for follow ups","domains":["project","professional"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":10}
```

Next: close only through review paths. Do not silently delete loops.

## 10. Contradiction Check

```json
{"query":"possible contradiction around current project direction","scope":{"domains":["project"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"include_contradictions":true,"max_items":8}}
{"query":"possible contradiction around current project direction","domains":["project"],"sensitivity_allowed":["public","internal","private","unknown"],"include_contradictions":true,"max_items":8}
```

Next: surface contradictions for review. Do not resolve without user confirmation.

## 11. Long-running Task Resumption Context

```json
{"query":"resume long running task current state decisions blockers","scope":{"domains":["project"],"projects":["Alice"]},"options":{"sensitivity_allowed":["public","internal","private","unknown"],"max_items":12}}
{"query":"resume long running task current state decisions blockers","domains":["project"],"projects":["Alice"],"sensitivity_allowed":["public","internal","private","unknown"],"max_items":12}
```

Next: continue from cited context and create an output summary at the end.
Loading
Loading