Skip to main content
连接
编排工具
Raft

Raft

Connect memory to each Raft worker without mistaking its managed Codex execution trace for the human conversation.

从配置提示或连接指南开始,详细步骤请查看指南。

Agent shortcut

Ask your agent to set it up

Copy the setup prompt. Your agent will open this guide, use the recommended path, and verify the setup.

How Raft Connects

Raft launches an AI tool for each named worker. Connect that AI tool to Mem, then use one environment variable to select the named worker identity.

That identity is portable. Keep NMEM_AGENT_ID=cindy if the Cindy worker moves from Raft to another orchestrator, or if the launched AI tool changes from Codex to Pi.

Minimal Setup

Create the Mem AI Identity:

Command
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.

This command only creates the identity record. It does not make every Codex session use Cindy.

Then add this in the Raft worker's environment:

Command
NMEM_AGENT_ID=cindy

Add NMEM_SPACE=onboarding only when this entire Raft worker should override the identity's default space.

Create a new identity such as cindy-reviewer only when the behavior should diverge. The new identity can start from Cindy's Rules and then evolve separately.

What To Ignore

Most users should not set NMEM_HOST_AGENT_ID. It is for advanced host IDs such as raft:<uuid>, not a second required identity field. The legacy slock:<uuid> alias remains supported.

Threads

Use Mem skills or MCP for recall and durable saves inside the Raft worker. Raft mediates the real human conversation through its own inbox and message transport; the managed Codex rollout contains control notices and tool execution, not a lossless copy of that conversation. The Codex connector therefore excludes Raft-managed rollouts from automatic Thread capture while continuing to capture ordinary Codex sessions on the same computer.

Lossless Raft conversation history needs a Raft-native conversation connector. Until that boundary is available, do not run nmem t save --from codex against a Raft-managed rollout.

更多编排工具连接