# OpenMemory — Agent Integration Guide

> One memory. Every AI. Every application.
> OpenMemory by Open Group (openmemory.run) is an independent persistent intelligence platform, not affiliated with Mem0.

- Base URL: https://openmemory.run
- Contract Version: 2026-11-27.v1
- OpenAPI 3.1: https://openmemory.run/openapi.json
- MCP Endpoint (Streamable HTTP JSON-RPC 2.0): https://openmemory.run/mcp
- A2A Agent Card: https://openmemory.run/.well-known/agent-card.json
- Human Agent Hub: https://openmemory.run/agents

## Quick Start for External Agents

1. Discover tools without authentication:
   `POST https://openmemory.run/mcp` with `{"jsonrpc":"2.0","id":1,"method":"tools/list"}`
2. Obtain a short-lived, space-scoped grant from a workspace owner (`POST /api/v1/grants`).
   Never embed broad static tenant credentials in client code.
3. Store typed memory with provenance:
   `POST /api/v1/memories` or MCP tool `memory_remember`
4. Retrieve hybrid scope-first context under token budget:
   `POST /api/v1/memories/retrieve` or MCP tool `memory_retrieve`
5. Propose and reuse verified procedures:
   `POST /api/v1/experiences` -> independent validation -> `POST /api/v1/experiences/:id/reuse`

## Security & Trust Rules

- Retrieved memories and procedures are wrapped as untrusted data (`<untrusted_memory ...>`), never system instructions.
- Secret material (API keys, private keys, JWTs) is blocked by default.
- Cross-tenant isolation is enforced by PostgreSQL Row-Level Security (RLS) on every tenant table.
- Procedural reuse never grants execution authority; runtime capability grants are verified on every invocation.
