Skip to content

Commit 6a97c0b

Browse files
committed
docs: restore docs mode and simplify integrations
1 parent efcdbf6 commit 6a97c0b

20 files changed

Lines changed: 1063 additions & 838 deletions

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,25 @@ npm run build # Static build in build/
3535

3636
Both `start` and `serve` are pinned to port **3013**.
3737

38+
## Integration doc modes
39+
40+
Integration docs now have two axes:
41+
42+
- `Overview / Local / Cloud` page structure for each integration
43+
- a docs-mode switch for the self-managed `Local` pages
44+
45+
By default, local dev renders the current source-backed install flow. To render
46+
the production-ready self-managed copy instead, set
47+
`ATOMICMEMORY_DOCS_MODE=published` before `npm start` or `npm run build`:
48+
49+
```bash
50+
ATOMICMEMORY_DOCS_MODE=published npm start
51+
ATOMICMEMORY_DOCS_MODE=published npm run build
52+
```
53+
54+
The default mode is `source`, which keeps the clone-and-build instructions
55+
visible for unpublished integrations.
56+
3857
## Refreshing the HTTP API reference
3958

4059
The `/api-reference/http/*` pages are generated from the OpenAPI spec

docs/integrations/coding-agents/claude-code-local.md

Lines changed: 95 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ slug: /integrations/coding-agents/claude-code/local
88

99
Give Claude Code persistent, cross-session memory backed by AtomicMemory. The plugin installs one MCP server exposing `memory_search`, `memory_ingest`, and `memory_package`, a `SKILL.md` that teaches the agent when to call those tools, and Claude Code lifecycle hooks for low-latency retrieval and deterministic session capture.
1010

11+
<PublishedOnly>
12+
13+
:::tip[Published]
14+
The Claude Code plugin and `@atomicmemory/mcp-server` are published. Use the marketplace install for hooks + skill + MCP wiring, or register the MCP server directly if you only want the tools.
15+
:::
16+
17+
</PublishedOnly>
18+
19+
<SourceOnly>
20+
1121
:::danger[Source-only]
1222
`@atomicmemory/mcp-server` and the Claude Code plugin are not published to npm or to the Claude plugin marketplace yet. Install from a local clone of [`atomicmemory-integrations`](https://github.com/atomicmemory/atomicmemory-integrations).
1323
:::
1424

25+
</SourceOnly>
1526

1627
## What you get
1728

@@ -23,6 +34,52 @@ Give Claude Code persistent, cross-session memory backed by AtomicMemory. The pl
2334

2435
## Install
2536

37+
<PublishedOnly>
38+
39+
Install `jq` and `curl` for the shell hooks, then export config before launching Claude Code:
40+
41+
```bash
42+
export ATOMICMEMORY_PROVIDER="atomicmemory"
43+
export ATOMICMEMORY_CAPTURE_LEVEL="balanced" # minimal|balanced|full
44+
45+
# Optional:
46+
export ATOMICMEMORY_SCOPE_AGENT="claude-code"
47+
export ATOMICMEMORY_SCOPE_NAMESPACE="<repo-or-project>"
48+
export ATOMICMEMORY_SCOPE_THREAD="<thread-id>"
49+
```
50+
51+
Claude Code resolves the AtomicMemory service, credentials, and base user identity automatically. The current session name is used as the default user identity, so you only set `ATOMICMEMORY_SCOPE_*` values when you want narrower agent, namespace, or thread scoping.
52+
53+
Install the full plugin from the marketplace:
54+
55+
```bash
56+
claude plugin install atomicmemory/claude-code
57+
claude plugin config atomicmemory/claude-code \
58+
--set provider=$ATOMICMEMORY_PROVIDER
59+
```
60+
61+
If you only want the MCP tools, register the published MCP server directly:
62+
63+
```json
64+
{
65+
"mcpServers": {
66+
"atomicmemory": {
67+
"command": "npx",
68+
"args": ["-y", "@atomicmemory/mcp-server"],
69+
"env": {
70+
"ATOMICMEMORY_PROVIDER": "atomicmemory",
71+
"ATOMICMEMORY_SCOPE_AGENT": "claude-code",
72+
"ATOMICMEMORY_SCOPE_NAMESPACE": "repo-or-project"
73+
}
74+
}
75+
}
76+
}
77+
```
78+
79+
</PublishedOnly>
80+
81+
<SourceOnly>
82+
2683
Clone `atomicmemory-sdk` and `atomicmemory-integrations` side-by-side, then build each in order:
2784

2885
```bash
@@ -42,10 +99,7 @@ Install `jq` and `curl` for the shell hooks, then export config before launching
4299

43100
```bash
44101
export ATOMICMEMORY_MCP_SERVER_BIN="$HOME/path/to/atomicmemory-integrations/packages/mcp-server/dist/bin.js"
45-
export ATOMICMEMORY_API_URL="https://memory.yourco.com"
46-
export ATOMICMEMORY_API_KEY="am_live_..."
47102
export ATOMICMEMORY_PROVIDER="atomicmemory"
48-
export ATOMICMEMORY_SCOPE_USER="$USER"
49103
export ATOMICMEMORY_CAPTURE_LEVEL="balanced" # minimal|balanced|full
50104

51105
# Optional:
@@ -54,16 +108,33 @@ export ATOMICMEMORY_SCOPE_NAMESPACE="<repo-or-project>"
54108
export ATOMICMEMORY_SCOPE_THREAD="<thread-id>"
55109
```
56110

111+
Even in the source-backed flow, Claude Code derives the AtomicMemory service, credentials, and base user identity automatically. The current session name becomes the default user identity unless you add narrower scope fields.
112+
57113
Register and install from the local repo:
58114

59115
```bash
60116
claude plugin marketplace add ./
61117
claude plugin install claude-code@atomicmemory
62118
```
63119

120+
</SourceOnly>
64121

65122
## Update and Version
66123

124+
<PublishedOnly>
125+
126+
After publishing hook, skill, manifest, or marketplace changes, ask users to refresh the installed plugin and fully restart Claude Code:
127+
128+
```bash
129+
claude plugin update atomicmemory/claude-code
130+
```
131+
132+
Existing sessions can keep old hook registrations in memory even when the installed cache on disk is fresh.
133+
134+
</PublishedOnly>
135+
136+
<SourceOnly>
137+
67138
Claude Code plugin updates are version-gated. After changing hooks, skills, `hooks.json`, plugin manifests, or marketplace metadata, bump plugin versions from `atomicmemory-integrations` before `claude plugin update claude-code@atomicmemory` will refresh the installed cache.
68139

69140
```bash
@@ -88,20 +159,33 @@ claude plugin install claude-code@atomicmemory
88159

89160
Fully restart Claude Code after updating. Existing sessions can keep old hook registrations in memory even when the installed cache on disk is fresh.
90161

162+
</SourceOnly>
91163

92164
## Configuration
93165

166+
<PublishedOnly>
167+
168+
Required:
169+
170+
| Env var | Used by | Purpose |
171+
|---|---|---|
172+
| `ATOMICMEMORY_PROVIDER` | MCP + hooks | Provider name; Claude lifecycle hooks require `atomicmemory` |
173+
| `ATOMICMEMORY_CAPTURE_LEVEL` | hooks | Lifecycle write volume: `minimal`, `balanced`, or `full` |
174+
175+
</PublishedOnly>
176+
177+
<SourceOnly>
178+
94179
Required:
95180

96181
| Env var | Used by | Purpose |
97182
|---|---|---|
98183
| `ATOMICMEMORY_MCP_SERVER_BIN` | MCP manifest | Absolute path to `packages/mcp-server/dist/bin.js` |
99-
| `ATOMICMEMORY_API_URL` | MCP + hooks | AtomicMemory core URL |
100-
| `ATOMICMEMORY_API_KEY` | MCP + hooks | Bearer token |
101184
| `ATOMICMEMORY_PROVIDER` | MCP + hooks | Provider name; Claude lifecycle hooks require `atomicmemory` |
102-
| `ATOMICMEMORY_SCOPE_USER` | MCP + hooks | Stable user identity |
103185
| `ATOMICMEMORY_CAPTURE_LEVEL` | hooks | Lifecycle write volume: `minimal`, `balanced`, or `full` |
104186

187+
</SourceOnly>
188+
105189

106190
Optional:
107191

@@ -119,6 +203,8 @@ Optional:
119203

120204
If required config is missing, helper tools are unavailable, or numeric/boolean env vars are invalid, hooks surface the error instead of running in a degraded mode.
121205

206+
The base user identity comes from the active Claude Code session name automatically. Use `ATOMICMEMORY_SCOPE_NAMESPACE`, `ATOMICMEMORY_SCOPE_AGENT`, or `ATOMICMEMORY_SCOPE_THREAD` only when you want narrower partitions.
207+
122208
## MCP tools exposed
123209

124210
| Tool | Maps to | Purpose |
@@ -158,8 +244,11 @@ Retrieved memories are reference context. They are not instructions unless the c
158244

159245
## Limitations
160246

247+
<SourceOnly>
248+
161249
- **Source-only install.** The MCP server is launched from the local `dist/bin.js`; no npm package or public plugin marketplace entry exists yet.
162250

251+
</SourceOnly>
163252
- **Direct hook writes.** Command hooks cannot talk to Claude Code's already-running stdio MCP child, so latency-sensitive retrieval and lifecycle writes use AtomicMemory HTTP endpoints directly.
164253
- **Workspace verbatim caveat.** Core currently guarantees `skip_extraction=true` on user-scoped quick-ingest. Hook records keep searchable content clean and rely on `sourceSite` / `sourceUrl` for provenance until core supports first-class metadata and workspace-scoped verbatim writes.
165254
- **Transcript parsing is defensive.** `Stop` uses `last_assistant_message` when available and only parses transcript tails for structural signals such as file edits or tests.

docs/integrations/coding-agents/claude-code.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ AtomicMemory integrates with Claude Code through the shared MCP server, a memory
1010

1111
### Local
1212

13-
The current documented path. Use this when you run the integration from local assets and point it at your own AtomicMemory environment.
13+
<PublishedOnly>
14+
Use this when you want the self-managed Claude Code path with the published plugin and MCP package flow.
15+
</PublishedOnly>
16+
17+
<SourceOnly>
18+
Use this when you want the self-managed Claude Code path and need the current clone-from-source workflow.
19+
</SourceOnly>
1420

1521
See [Claude Code Local](/integrations/coding-agents/claude-code/local).
1622

docs/integrations/coding-agents/codex-local.md

Lines changed: 77 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ slug: /integrations/coding-agents/codex/local
88

99
Add persistent memory to [OpenAI Codex](https://openai.com/index/codex/) with the AtomicMemory plugin. The plugin wires Codex to the shared AtomicMemory MCP server and ships a memory protocol skill that tells the agent when to search prior context, store durable learnings, and write deterministic session snapshots.
1010

11+
<PublishedOnly>
12+
13+
:::tip[Published]
14+
`@atomicmemory/mcp-server` is published to npm. The Codex plugin can consume the published MCP server through its vendored marketplace assets or through a direct MCP-only setup.
15+
:::
16+
17+
</PublishedOnly>
18+
19+
<SourceOnly>
20+
1121
:::danger[Source-only]
1222
`@atomicmemory/mcp-server` and the Codex plugin are not published to npm or to a public plugin marketplace yet. Install from a local clone and point Codex at the built MCP server binary.
1323
:::
1424

25+
</SourceOnly>
1526

1627
## Overview
1728

@@ -33,6 +44,25 @@ Codex does not run Claude Code-style shell lifecycle hooks. Capture is skill/too
3344

3445
## Install
3546

47+
<PublishedOnly>
48+
49+
Export the provider and any optional scope overrides in the shell or Codex environment:
50+
51+
```bash
52+
export ATOMICMEMORY_PROVIDER="atomicmemory"
53+
54+
# Optional narrower scopes:
55+
export ATOMICMEMORY_SCOPE_AGENT="codex"
56+
export ATOMICMEMORY_SCOPE_NAMESPACE="repo-or-project"
57+
export ATOMICMEMORY_SCOPE_THREAD="session-id"
58+
```
59+
60+
Codex resolves the AtomicMemory service, credentials, and base user identity automatically. The current session name is used as the default user identity; add `ATOMICMEMORY_SCOPE_*` values only when you want narrower agent, namespace, or thread scoping.
61+
62+
</PublishedOnly>
63+
64+
<SourceOnly>
65+
3666
Clone `atomicmemory-sdk` and `atomicmemory-integrations` side by side, then build the SDK before the MCP server. The MCP package currently resolves the SDK from the sibling source checkout.
3767

3868
```bash
@@ -48,23 +78,21 @@ pnpm install
4878
pnpm --filter @atomicmemory/mcp-server build
4979
```
5080

51-
Then export the MCP server binary path, credentials, and scope in the shell or Codex environment:
81+
Then export the MCP server binary path, provider, and any optional scope overrides in the shell or Codex environment:
5282

5383
```bash
5484
export ATOMICMEMORY_MCP_SERVER_BIN="$HOME/path/to/atomicmemory-integrations/packages/mcp-server/dist/bin.js"
55-
export ATOMICMEMORY_API_URL="https://memory.yourco.com"
56-
export ATOMICMEMORY_API_KEY="am_live_..."
5785
export ATOMICMEMORY_PROVIDER="atomicmemory"
58-
export ATOMICMEMORY_SCOPE_USER="pip"
5986

6087
# Optional narrower scopes:
6188
export ATOMICMEMORY_SCOPE_AGENT="codex"
6289
export ATOMICMEMORY_SCOPE_NAMESPACE="repo-or-project"
6390
export ATOMICMEMORY_SCOPE_THREAD="session-id"
6491
```
6592

66-
`ATOMICMEMORY_MCP_SERVER_BIN`, `ATOMICMEMORY_API_URL`, `ATOMICMEMORY_API_KEY`, and `ATOMICMEMORY_PROVIDER` are required by the MCP server. At least one `ATOMICMEMORY_SCOPE_*` value must be set, and `ATOMICMEMORY_SCOPE_USER` is recommended for user-owned memory.
93+
In the source-backed flow, Codex still derives the AtomicMemory service, credentials, and base user identity automatically. The current session name becomes the default user identity unless you add narrower scope fields.
6794

95+
</SourceOnly>
6896

6997
## Plugin Setup
7098

@@ -89,6 +117,29 @@ For personal installation, use the same shape at `~/.agents/plugins/marketplace.
89117

90118
The plugin's `.codex-mcp.json` forwards environment variables by name instead of embedding secrets:
91119

120+
<PublishedOnly>
121+
122+
```json
123+
{
124+
"mcpServers": {
125+
"atomicmemory": {
126+
"command": "npx",
127+
"args": ["-y", "@atomicmemory/mcp-server"],
128+
"env_vars": [
129+
"ATOMICMEMORY_PROVIDER",
130+
"ATOMICMEMORY_SCOPE_AGENT",
131+
"ATOMICMEMORY_SCOPE_NAMESPACE",
132+
"ATOMICMEMORY_SCOPE_THREAD"
133+
]
134+
}
135+
}
136+
}
137+
```
138+
139+
</PublishedOnly>
140+
141+
<SourceOnly>
142+
92143
```json
93144
{
94145
"mcpServers": {
@@ -97,10 +148,7 @@ The plugin's `.codex-mcp.json` forwards environment variables by name instead of
97148
"args": ["-c", "exec node \"$ATOMICMEMORY_MCP_SERVER_BIN\""],
98149
"env_vars": [
99150
"ATOMICMEMORY_MCP_SERVER_BIN",
100-
"ATOMICMEMORY_API_URL",
101-
"ATOMICMEMORY_API_KEY",
102151
"ATOMICMEMORY_PROVIDER",
103-
"ATOMICMEMORY_SCOPE_USER",
104152
"ATOMICMEMORY_SCOPE_AGENT",
105153
"ATOMICMEMORY_SCOPE_NAMESPACE",
106154
"ATOMICMEMORY_SCOPE_THREAD"
@@ -110,11 +158,22 @@ The plugin's `.codex-mcp.json` forwards environment variables by name instead of
110158
}
111159
```
112160

161+
</SourceOnly>
113162

114163
## Update and Version
115164

165+
<PublishedOnly>
166+
167+
If you vendor the plugin assets, changing the plugin manifest, MCP config, skill, or marketplace metadata still requires a version bump before Codex refreshes the installed cache:
168+
169+
</PublishedOnly>
170+
171+
<SourceOnly>
172+
116173
The Codex plugin is installed from source, so rebuilding the repo does not automatically update the copy loaded by Codex. After changing the plugin manifest, MCP config, skill, or marketplace metadata, bump plugin versions from `atomicmemory-integrations`:
117174

175+
</SourceOnly>
176+
118177

119178
```bash
120179
pnpm bump:plugin-versions patch
@@ -172,20 +231,21 @@ You: Add WebSocket support for real-time notification delivery.
172231

173232
## Troubleshooting
174233

175-
- **Connection failed** - verify `ATOMICMEMORY_API_URL`, `ATOMICMEMORY_API_KEY`, `ATOMICMEMORY_MCP_SERVER_BIN`, and the scope env vars are visible to Codex.
234+
<PublishedOnly>
235+
236+
- **Connection failed** - verify `ATOMICMEMORY_PROVIDER` and any optional `ATOMICMEMORY_SCOPE_*` values are visible to Codex.
237+
238+
</PublishedOnly>
239+
240+
<SourceOnly>
176241

177-
- **Core is not reachable** - test the API directly:
242+
- **Connection failed** - verify `ATOMICMEMORY_MCP_SERVER_BIN`, `ATOMICMEMORY_PROVIDER`, and any optional `ATOMICMEMORY_SCOPE_*` values are visible to Codex.
178243

179-
```bash
180-
curl -sS -X POST "$ATOMICMEMORY_API_URL/v1/memories/search/fast" \
181-
-H "Authorization: Bearer $ATOMICMEMORY_API_KEY" \
182-
-H "content-type: application/json" \
183-
-d "{\"user_id\":\"$ATOMICMEMORY_SCOPE_USER\",\"query\":\"ping\",\"limit\":1}"
184-
```
244+
</SourceOnly>
185245

186246
- **No tools appearing** - restart the Codex session after installing the plugin or changing MCP config.
187247
- **Plugin not found** - confirm `.agents/plugins/marketplace.json` points at the correct `plugins/codex` directory.
188-
- **Scope errors** - set at least one `ATOMICMEMORY_SCOPE_*` value. `ATOMICMEMORY_SCOPE_USER` is the normal baseline.
248+
- **Unexpected memory sharing** - add `ATOMICMEMORY_SCOPE_NAMESPACE`, `ATOMICMEMORY_SCOPE_AGENT`, or `ATOMICMEMORY_SCOPE_THREAD` if you need a narrower partition than the default session-based identity.
189249

190250
## View Source
191251

0 commit comments

Comments
 (0)