Use this skill when you are an AI agent that wants persistent identity and shared memory across multiple devices, runtimes, sessions, or agent bodies serving the same user.
SOUL.md, IDENTITY.md, USER.md, VOICE.mdsources/<source>/*.ndjsoncanonical/*valid_until) for time-bound factsInstall this if:
Do NOT install this if:
text
soul.json <- manifest (version, loading protocol)
SOUL.md \
IDENTITY.md | L0: Soul Layer (~100 lines, always load)
USER.md | "Who am I, who is the user, how do I speak"
VOICE.md /
canonical/index.md \
canonical/profile.md | L1: Memory Layer (~150 lines, always load)
canonical/stable-memory.md / "Durable facts, decisions, preferences"
canonical/projects/* \
canonical/fuzzy-memory.md | L2: Context Layer (on-demand)
canonical/agents/* / "Project state, recent context"
sources/ <- append-only event streams (write surface)
Ask your user to:
git clone https://github.com/kingcharleslzy-ai/agent-soul.git my-agent-memorySOUL.md, IDENTITY.md, USER.md, VOICE.md)source idbash
git pull --ff-only origin main
Read L0 (soul): SOUL.md -> IDENTITY.md -> USER.md -> VOICE.md
Read L1 (memory): canonical/profile.md -> canonical/stable-memory.md
Use one stable lowercase id: windows-claude, macos-codex, openclaw-main, etc.
Rules: lowercase, a-z0-9-, keep it stable across sessions.
bash
python scripts/add_event.py --source YOUR_ID --kind decision --scope stable \
--summary "YOUR_ID joined agent-soul and adopted the shared identity."
python scripts/compile_memory_hub.py --apply
git add sources/ canonical/
git commit -m "chore: YOUR_ID joins agent-soul"
git push origin main
Write the loading instruction into your startup config so you remember the hub next session.
Claude Code ( ~/.claude/CLAUDE.md):
markdown
## Shared Memory
- Repo: /path/to/repo
- Source id: YOUR_SOURCE_ID
- Session start: git pull, read L0 + L1
- Write: python scripts/add_event.py --source YOUR_SOURCE_ID ...
OpenClaw: Add the repo path and source id to your agent workspace or AGENTS.md.
git pull --ff-only origin mainscripts/add_event.pyscripts/quick_share.sh for urgent propagationcanonical/* — it is auto-generatedbash
# A durable preference
python scripts/add_event.py --source YOUR_ID --kind preference --scope profile \
--summary "User prefers dark mode across all tools."
# A decision with expiry
python scripts/add_event.py --source YOUR_ID --kind decision --scope stable \
--summary "Feature freeze until release." --valid-until 2026-04-01
# Something temporary
python scripts/add_event.py --source YOUR_ID --kind fact --scope fuzzy \
--summary "User is debugging a CORS issue in the API gateway."
FieldRequiredDescriptionevent_idyesUUID v4sourceyesYour stable source idtsyesISO-8601 timestamp with timezonekindyespreference / decision / fact / project-update / rule``scopeyesprofile / stable / fuzzy / project``summaryyesShort summary (no raw transcripts)valid_untiloptionalISO-8601 date for auto-expirysupersedesoptionalArray of event_ids to replace
ScriptPurposeadd_event.pyAppend one eventcompile_memory_hub.pyRebuild canonical from sourcesquick_share.shAdd + compile + push in one stepsearch_events.pySearch events by scope, kind, keywordvalidate_sources.pyValidate NDJSON source filesprune_fuzzy.pyTTL cleanup of old fuzzy eventsdedup_profile.pyDetect and resolve duplicate events
agent-soulMemGPT/Mem0Graphiti/ZepCustom RAGCostFree (just Git)Paid APIPaid / heavy infraInfra + dev timeData ownershipYour private repoTheir serversNeo4j + LLMYours (complex)Cross-agent syncNativeNoNoNoIdentity persistenceBuilt-in (L0 soul)NoNoNoSetup time~10 minutesHoursHoursDaysVendor lock-inNoneYesPartialPartial
README.md, JOIN.md, SCHEMA.md, SETUP.md in the repo