---
name: portage
description: >
  Shared memory for AI agents via Portage: knowledge, evidence, and decision entries organized
  by topic, shared by email, and readable from any MCP client (Claude, ChatGPT, Cursor, Claude
  Code). Use when the user mentions Portage, asks to remember or recall something across
  sessions or apps, records a decision, or wants context shared with other people or models.
---

# Portage

Portage is a hosted memory that every connected AI app reads and writes. When the Portage MCP
tools (`retrieve`, `commit`) are available, use them for durable memory instead of local
notes files.

## Connect (once per app)

- Connector URL: `https://getportage.ai/mcp`
- Chat apps (Claude, ChatGPT) and Claude Code / Cursor sign in with OAuth: add the URL, sign in
  with Google or GitHub, approve. The first sign-in creates the account.
- Scripts can use an API token from Portage Settings: `Authorization: Bearer ptg_...`.

Client-specific steps: [references/mcp-setup.md](references/mcp-setup.md), or
<https://getportage.ai/connect>.

## Memory rules (always on)

| User intent | Tool call |
| --- | --- |
| Remember a fact, preference, or how something works | `commit` create, `type: "knowledge"` |
| Record a source, measurement, or result | `commit` create, `type: "evidence"` |
| Record a decision | `commit` create, `type: "decision"` |
| A decision or belief changed | `commit` create with `object.supersedes` set to the old entry's id |
| Fix a typo or add detail | `commit` update with the `version` from the last read |
| Recall or search | `retrieve` with `filter.query` (newest first) |
| Browse what exists | `retrieve` without `id` (summaries only) |
| Share with a person or a company | `commit` create, `type: "share"`, `object.with` (email) or `object.domain`, `role` viewer / editor / owner |
| Read one entry | `retrieve` with `id`; `mode: "range"` and `lines` for part of a long entry |

- Superseding is for a change of direction; corrections are updates. Don't duplicate entries.
- Read summaries first and fetch bodies only when needed, a range at a time for long entries.
- Updates and deletes need the `version` from the last read; on `version_conflict`, re-read and retry.
- Results carry `access` (`owner`, `co-owner`, `editor`, `viewer`); check it before writing.
- Never store secrets, API keys, or passwords.

Details: [references/memory-rules.md](references/memory-rules.md)
