Claude Code integration

Give Claude Code long-term project memory. Today, via the am CLI. After the MCP server ships, via direct MCP.

CLI approach (works today)

Install am and point it at your project agent:

pip install oramemory
am init --api-key om_live_... --agent-id claude-code-myproject

Then ask Claude Code to call am in its shell. Example prompt:

After every significant decision, run: am add "<1-line summary>" --tags decision --importance 0.8

Before starting a new task, run: am read "<task topic>" --top-k 5 and use the results as context.

Because am reads ~/.oramemory/config.json, Claude Code doesn't need to know your API key — it just runs the command.

Best practices

  • One agent per project. Use --agent-id <repo-slug> (e.g. acme-billing). Don't share across repos unless you explicitly want cross-project context.
  • Tag decisions. --tags decision, --tags bug-fix, --tags convention. You can search by tag later.
  • Keep memories atomic. One fact per add. "We picked Postgres because X" beats a 200-word design doc.
  • Use importance. --importance 0.9 for load-bearing decisions; 0.3 for fleeting state.

A typical session

am read "authentication strategy"
# → prior decisions surface before Claude starts work

# … Claude works …

am add "Chose bcrypt over argon2 for login — libargon2 build issues on RHEL7" \
  --tags decision auth --importance 0.8

MCP (soon)

Once the MCP server ships, add one entry to your mcp.json and Claude Code calls memory_add / memory_read directly — no shelling out. Config shape is on the MCP page.