Lody
Connect the AI tool Lody launches, and add a Mem AI Identity only when an Agent Config represents a stable role.
Lody runs local sessions through an Agent Config. That config chooses an AI tool, such as Claude Code or Codex, and can carry environment variables into it.
This is not the same as an always-on teammate identity. Treat Lody as a session and runtime launcher first. Add a Mem AI Identity only when you intentionally use one Lody Agent Config as a stable role, such as "reviewer" or "onboarding assistant".
Use this rule:
- First connect the AI tool Lody launches, such as Claude Code or Codex.
- Add
NMEM_AGENT_IDonly when this Lody Agent Config represents a stable role, such as Cindy. - Leave
NMEM_AGENT_IDunset for generic runtime presets.
Setup
First connect the AI tool Lody launches. For example, install the Claude Code or Codex connector.
If this Agent Config is meant to represent a durable role, create the Mem AI Identity:
nmem agents upsert cindy \
--name "Cindy" \
--default-space onboarding \
--instructions "Help with onboarding. Explain one step at a time."This creates the Mem AI Identity named Cindy. Its command and environment ID is cindy. It does not make every Codex session use Cindy; the identity is used only where NMEM_AGENT_ID=cindy or agent_id="cindy" is passed.
Add this environment variable to that Lody Agent Config:
NMEM_AGENT_ID=cindyIf the Lody config is only a generic Codex or Claude runtime preset, leave NMEM_AGENT_ID unset. That avoids pretending every Lody session is the same long-term person.
If you create another Lody config for the same durable role, keep the same NMEM_AGENT_ID. If the config switches from Codex to Claude Code, update the runtime connector and --source-app, not the identity.
Space
Do not set NMEM_SPACE by default. Use the identity's default space unless this entire Lody config should always read and write one specific Mem space:
NMEM_SPACE=onboardingAdvanced Host Ids
Most users should not set NMEM_HOST_AGENT_ID.
Use it only when you need to map a Lody-internal stable id, such as lody:<agent-config-id>, onto a Mem AI Identity. In normal setup, either leave identity unset or use NMEM_AGENT_ID=cindy for a role-specific config.
Forking
If the same person should behave differently, create a new Mem AI Identity instead of overloading one identity:
nmem agents upsert cindy-reviewer \
--name "Cindy Reviewer" \
--instructions "Review code. Leave concise comments. Do not edit files unless asked."Then point that Lody config at:
NMEM_AGENT_ID=cindy-reviewer