-
Notifications
You must be signed in to change notification settings - Fork 0
Persona and governance
The agent's identity and capture rules live in memory and are injected each session, not in dotfiles.
dmem template export ~/dmem-templates # persona skeleton + two generic governance protocols
# edit persona.md (fill the <PLACEHOLDERS>)
dmem import ~/dmem-templates/ # load them as recordsdmem setup also asks your AI's name and your name and sets a default persona plus the generic governance for you. Nothing personal ships in the binary; the templates are blank skeletons.
Same single source, projected to fit each harness:
- Hooked agents (Claude Code, Devin, Codex): the persona and protocols are injected at session start, with relevant memory recalled each turn.
-
Hermes: carried in
~/.hermes/SOUL.md, its always-on identity (see below). -
Hook-less MCP clients (Claude Desktop, or any MCP host): no per-turn hook, so the persona and protocols ride the MCP server's
initializeinstructions, and you can pull the current persona plus open reminders on demand with thebootstrapprompt.
One tenant can serve several agents, each with its own identity, without splitting the memory. The split is by namespace:
-
agents/<agent>/...holds that agent's own records: its persona, its role. Only a caller whose token carries that agent label receives them. - Everything outside the
agents/tree (house rules, boundaries, protocols) is shared governance and goes to every caller.
So keep an agent record to identity and role only, and write the rules all agents share once, outside the tree. Mint one token per agent on the server (dmem admin add <tenant> --agent <name>, or the DM_TOKEN_<TENANT>__<AGENT> env form; see "Run as a server"). Each agent then receives shared governance plus its own persona, never another agent's, and its writes carry an author:<agent> tag so recall and the graph viewer show who saved what. An agent-less token still receives the legacy full set.
dm-lite is the single place your agents' persona and protocols live, projected into each agent when you wire it. Static agent-instruction files like AGENTS.md (or a stray global CLAUDE.md / SOUL.md copy) compete with this and become noise: an agent that also reads an AGENTS.md picks up a second, drifting identity, and any topology or facts baked into it go stale the moment memory moves on. Some tools auto-create one (e.g. Codex desktop writes ~/AGENTS.md on import from Claude Code). If you wire dm-lite, remove or empty any global AGENTS.md you did not deliberately author; keep only the repo-scoped ones you actually maintain.
For Hermes specifically, the persona and protocols are projected into ~/.hermes/SOUL.md (its always-on system-prompt identity). That file is a snapshot of your dmem persona and protocols, so re-run dmem bootstrap --hermes after you change them.