# retenta-memory (Claude Code plugin)

Give a Claude Code loop a durable, semantic **memory spine** — the sixth loop primitive.
Bundles two things:

1. **The connector** — your Retenta capsule as a remote MCP server (`recall`, `log_progress`,
   `remember`, `search`, `ask`, `list_sources`, `forget`).
2. **The skill** — teaches the loop pattern (recall at start → log_progress at each milestone →
   remember findings → cite sources) so a scheduled or multi-run agent resumes exactly where it
   left off.

> The agent forgets. The Capsule doesn't.

## Install

You need two values from your capsule's **Connect** box on retenta.ai:

- **MCP URL** — the capsule's MCP endpoint (e.g. `https://mcp.retenta.ai/c/<slug>/mcp`).
- **Access key** — a named owner key (create one under "Keys for loops & automations").

Set them in your shell (add to `~/.zshrc` / `~/.bashrc` to persist), then install:

```bash
export RETENTA_MCP_URL="https://mcp.retenta.ai/c/<slug>/mcp"   # from the Connect box
export RETENTA_API_KEY="rk_live_…"                               # a named owner key

# From a marketplace (this repo's plugins/ dir):
/plugin marketplace add thecrownjoel/retenta
/plugin install retenta-memory@retenta

# …or run a local checkout directly (dev):
claude --plugin-dir ./plugins/retenta-memory
```

Verify the connector: `/mcp` should show **retenta — connected**. The skill auto-invokes on
loop/scheduled tasks, or call it explicitly with `/retenta-memory:retenta-memory`.

## Just the connector (no skill)

```bash
claude mcp add --transport http retenta "$RETENTA_MCP_URL" \
  --header "Authorization: Bearer $RETENTA_API_KEY"
```

## Verify the loop

The capsule is a working spine — proven by `scripts/loop-demo.mjs` in the Retenta repo, which
runs a 3-cycle loop across process kills and shows cycle 3 recalling cycles 1–2.
