PAM Memory
Public integrations for PAM Memory v1 — read-only company knowledge retrieval for Claude Code and Python.
| Package | Path | Purpose |
|---|
| Claude plugin | plugin/ | Auto-inject memory on every prompt |
| Python SDK | sdk/ | PAMClient.memory.retrieve() |
Claude Code plugin
Requirements
- Claude Code (Claude Pro or higher)
- Network access to
https://api.pam.harmix.ai (or your custom base URL)
- On Windows: Git Bash or WSL (hooks run via
bash)
- Full
pam_mkey_<key> from PAM (see below)
Get your API key
- Sign in to PAM
- Open For Developers
- Generate a Memory MCP / developer key
- Copy the full key as shown:
pam_mkey_<your-key> (one token, no dot)
Your company sources (email, Drive, Slack, etc.) must be connected and synced in PAM before retrieval returns useful context.
Install
From GitHub (recommended):
In Claude Code or Settings → Plugins → Add marketplace, use:
Harmix/pam-memory
Then install:
/plugin install pam-memory@pam-memory
Configure
Run in Claude Code:
/plugin configure pam-memory@pam-memory
| Setting | Value |
|---|
| PAM Memory API Key | Your full pam_mkey_<key> from PAM → For Developers |
| PAM Agent API URL | Optional. Default: https://api.pam.harmix.ai |
Verify
- Start a new Claude Code session (hooks load on session start).
- Ask a question of at least 10 characters about your company knowledge, e.g. “What is our deployment process for production?”
- On success, Claude’s reply should reflect company-specific details (names, processes, docs) that were not in your prompt alone.
- Memory is injected as context before the model responds — you may not see a separate “memory” UI panel.
If nothing company-specific appears, see Troubleshooting. Claude still works normally either way: the plugin fails open (no hard errors on missing key, quota, timeout, or empty results).
See plugin/README.md for hook details and local testing.
Sync Claude chat history
Run /sync-claude-memory to summarize your local Claude Code and Claude
Desktop Cowork session transcripts into memory items and send them to PAM
(plain Chat has no local transcript and isn't covered). It discloses which
local files it reads and asks for confirmation first; if sending to PAM
fails for any reason, items are queued locally instead
(~/.pam/sync_queue/claude_code.jsonl) rather than lost. See
docs/sync-claude-memory-implementation-plan.md
for the full cross-repo (pam-memory / pam-agent-api / pam-jobs / pam-backend-api)
implementation and testing plan.
Python SDK
pip install git+https://github.com/Harmix/pam-memory.git#subdirectory=sdk
export PAM_API_KEY="pam_mkey_<your-key>"
export PAM_BASE_URL="https://api.pam.harmix.ai" # optional
from pam import PAMClient
client = PAMClient()
result = client.memory.retrieve(
prompt="What is our deployment process?",
session_id="my-session",
)
if result.ok:
print(result.content_text)
else:
print(result.error_code, result.error_message)
See sdk/README.md and sdk/examples/smoke_retrieve.py.
API
Both packages call:
POST /v1/memory/retrieve
Authorization: Bearer pam_mkey_<your-key>
Default base URL: https://api.pam.harmix.ai
Troubleshooting
| Symptom | Likely cause | What to do |
|---|
| No company context in replies | Missing/invalid key, prompt under 10 chars, or memory not synced | Re-run /plugin configure pam-memory@pam-memory; ask a longer question; confirm sources are synced in PAM |
| Claude works with no errors and no memory | Key not configured | Run /plugin configure pam-memory@pam-memory and enter your key |
| Marketplace sync fails | Repo private, wrong URL, or missing marketplace file | Use Harmix/pam-memory; repo must be public with .claude-plugin/marketplace.json |
| Hook / bash errors on Windows | No bash on PATH | Install Git Bash or use WSL |
quota_exceeded / empty retrieve | Plan limit or memory not ready | Check For Developers usage; wait for initial sync to finish |
| Works in SDK, not in Claude | Key not configured for plugin | Run /plugin configure pam-memory@pam-memory and enter your pam_mkey_* key |
Maintainers
After changing the SDK, sync the vendored copy used by the plugin:
./scripts/sync_vendor.sh
# Windows: .\scripts\sync_vendor.ps1
Run tests (use python -m so pip/pytest match the same interpreter):
cd sdk && python -m pip install -e ".[dev]" && python -m pytest -q
cd ../plugin && uv sync && uv run pytest -q