From c79da2cfa626d63a3ab0eeee8e8cea72e23b7fb4 Mon Sep 17 00:00:00 2001 From: Bharat Joshi <200157101+sbharatjoshi@users.noreply.github.com> Date: Sun, 22 Nov 2026 13:10:26 -0600 Subject: [PATCH] docs(p0-17): add integrations docs skeleton, coverage matrix, and llms.txt Signed-off-by: Bharat Joshi <200157101+sbharatjoshi@users.noreply.github.com> --- README.md | 8 +++ docs/integrations/README.md | 68 +++++++++++++++++++++++ docs/integrations/_quickstart-template.md | 62 +++++++++++++++++++++ llms.txt | 44 +++++++++++++++ 4 files changed, 182 insertions(+) create mode 100644 docs/integrations/README.md create mode 100644 docs/integrations/_quickstart-template.md create mode 100644 llms.txt diff --git a/README.md b/README.md index f4861bb..756e1d9 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,22 @@ For background on cognitive memory architecture and evaluation concepts, see: - [Spector](https://github.com/spectrayan/spector) - [Memory Fundamentals](https://github.com/spectrayan/memory-fundamentals) +## Documentation + +- [Integrations Overview & Coverage Matrix](docs/integrations/README.md) — MCP surface overview, repository foundations, and target support status +- [Integration Quickstart Template](docs/integrations/_quickstart-template.md) — standard four-section template for new host and framework guides +- [llms.txt](llms.txt) — concise machine-readable index of public integration docs, packages, and conformance specs + ## Repository Layout | Path | Purpose | | --- | --- | | `conformance/` | Language-neutral IC-1 conformance YAML scenarios, reference mock server, client helpers, CLI, and test suite | +| `docs/integrations/` | Integrations overview, coverage matrix ([`README.md`](docs/integrations/README.md)), and quickstart template ([`_quickstart-template.md`](docs/integrations/_quickstart-template.md)) | | `instructions/` | Canonical agent memory discipline (`CORE.md`) and wrappers for Agent Skills, `AGENTS.md`, Cursor, OpenClaw, and Claude Code | | `packages/python/` | Python `ebbmem-integration-core` package (scoping, redaction/framing, fail-open/retry, reinforcement tracking, SDK adapter) | | `packages/typescript/` | TypeScript `ebbmem-integration-core` package (scoping, redaction/framing, fail-open/retry, reinforcement tracking, SDK adapter) | +| `llms.txt` | Machine-readable repository index for LLMs and coding agents | ## Quickstart: Run Conformance Tests diff --git a/docs/integrations/README.md b/docs/integrations/README.md new file mode 100644 index 0000000..94920d9 --- /dev/null +++ b/docs/integrations/README.md @@ -0,0 +1,68 @@ +# EbbMem Integrations + +Welcome to the [EbbMem](https://ebbmem.ai) integrations hub. This repository provides an MCP-first universal tool surface specification, thin native framework core packages, an IC-1 conformance suite, and an agent instruction pack designed to preserve cognitive memory decay and reinforcement across every host and framework. + +## Core Memory Invariants + +Every EbbMem integration—whether over MCP or a native framework adapter—must preserve the same memory semantics: + +1. **Read-only recall, decay unless reinforced:** Calling `recall` (`memory_recall` / `memory_search`) never increases storage strength or resets spacing state. Unused memories decay over time. +2. **Explicit usage feedback:** Call `reinforce` (`memory_reinforce`) with `memory_id`, `used_ids`, and optional `recall_id` (when exposure logging is enabled) **only** for memories actually used to answer or act. `injected` (reinforce-all-shown) mode stays **OFF** by default. +3. **Untrusted recall framing and redaction:** Wrap recalled content in `` delimiters as reference data (never executable instructions) and redact secrets before `remember` or logging. +4. **Header-only credentials:** Send tokens exclusively via `Authorization: Bearer ` or `X-API-Key` headers—never in URL query parameters or userinfo. +5. **Fail-open resilience and safe retries:** Degrade gracefully (`fail_open = true`) if EbbMem is unreachable, retry only idempotent operations (and keyed `remember` with `idempotency_key`), and keep telemetry **OFF** by default. + +## MCP Surface Overview + +EbbMem exposes a Streamable HTTP `/mcp` endpoint (with profile routes `/mcp/core`, `/mcp/full`, and `/mcp/admin`, or the `X-Ebb-MCP-Profile` header) as well as local stdio tooling. Details are defined in the public descriptor [`conformance/golden/mcp_surface_v2.json`](../../conformance/golden/mcp_surface_v2.json). + +- **Supported MCP protocol revisions:** `2026-07-28` (preferred stateless revision using `MCP-Protocol-Version`, `Mcp-Method`, and `Mcp-Name` headers), plus `2025-11-25`, `2025-06-18`, `2025-03-26`, and `2024-11-05`. +- **Tool profiles:** + - `core` (6 tools, recommended default): `memory_remember`, `memory_recall`, `memory_reinforce`, `memory_forget`, `memory_context_pack`, `memory_status`. + - `full` (15 tools): adds `memory_associate`, `memory_why_not`, `memory_introspect`, `memory_episodic_remember`, `memory_episodic_tail`, `memory_federated_recall`, `memory_rehearse`, plus universal aliases `memory_search` and `memory_get`. + - `admin` (18 tools): adds role-gated `memory_dream`, `memory_reflect`, and `memory_purge`. +- **Tool metadata:** Tools include `title`, behavioral `annotations` (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`), and `outputSchema` / `structuredContent` for `memory_remember`, `memory_recall`, `memory_reinforce`, `memory_search`, and `memory_get`. + +## Repository Foundations (`available` on `main`) + +| Component | Path | Status | Summary | +| --- | --- | --- | --- | +| Conformance Kit (`ebbmem-conformance`) | [`conformance/README.md`](../../conformance/README.md) | `available` | 21 IC-1 YAML scenarios, stateful reference mock server, and MCP v2 surface validation | +| Agent Instruction Pack | [`instructions/README.md`](../../instructions/README.md) | `available` | Canonical [`CORE.md`](../../instructions/CORE.md) and wrappers for [`SKILL.md`](../../instructions/SKILL.md), [`AGENTS.md`](../../instructions/AGENTS.md), Cursor, OpenClaw, and Claude Code | +| Python Integration Core (`ebbmem-integration-core`) | [`packages/python/README.md`](../../packages/python/README.md) | `available` | Scoping, secret redaction, untrusted framing, fail-open/retry, reinforcement tracking, and optional `ebbmem-client` adapter (source on `main`) | +| TypeScript Integration Core (`ebbmem-integration-core`) | [`packages/typescript/README.md`](../../packages/typescript/README.md) | `available` | Scoping, secret redaction, untrusted framing, fail-open/retry, reinforcement tracking, and structural `@ebbmem/client` adapter (source on `main`) | +| Quickstart Template | [`_quickstart-template.md`](./_quickstart-template.md) | `available` | Standard template for host and framework integration quickstarts | + +## Target Coverage Matrix + +Status values reflect **only** what exists on the `main` branch of `ebbmem/integrations`: + +- `available` — dedicated guide, plugin, or adapter package is present on `main`. +- `in progress` — partial support (such as a platform-specific wrapper in `instructions/`) exists on `main`, while the full guide, bundle, or adapter package is not yet on `main`. +- `planned` — target integration guide, recipe, or native adapter package is not yet on `main`. + +| Target | MCP Remote (`/mcp`) | MCP Local (`stdio`) | Native Adapter / Integration Shape | Distribution / Artifact | Status | On `main` & Notes | +| --- | :---: | :---: | --- | --- | :---: | --- | +| GitHub Copilot (VS Code) | Yes | Yes | — | `.vscode/mcp.json`, registry entry | `planned` | Generic MCP via `/mcp/core` | +| GitHub Copilot cloud agent / code review | Yes (API key, no OAuth) | No | — | Repo settings snippet | `planned` | Requires header API-key auth | +| Claude Code / Claude Desktop | Yes | Yes | — | Plugin + marketplace | `in progress` | Instruction wrapper [`instructions/claude-code/SKILL.md`](../../instructions/claude-code/SKILL.md) on `main`; host guide and plugin pending | +| Cursor | Yes | Yes | — | Install deeplink, plugin | `in progress` | Rule [`instructions/cursor/ebbmem.mdc`](../../instructions/cursor/ebbmem.mdc) on `main`; host guide and bundle pending | +| Grok Bot / xAI API | Yes (public HTTPS) | No | — | Connector guide, API snippet | `planned` | Requires public HTTPS `/mcp` endpoint | +| LangGraph / LangChain / LangMem | Optional | No | `BaseStore`, middleware, tools | PyPI package | `planned` | Builds on [`packages/python/README.md`](../../packages/python/README.md) | +| OpenClaw | Fallback | Fallback | Memory-slot plugin (`memory_search` / `memory_get`) | ClawHub package | `in progress` | Skill [`instructions/openclaw/SKILL.md`](../../instructions/openclaw/SKILL.md) on `main`; plugin package pending | +| Open WebUI | Yes | Via `mcpo` | Filter Function | Community function | `planned` | Supports stateless `2026-07-28` `/mcp` and `Filter` hook | +| Vercel AI SDK | Optional | No | Tools + model middleware | npm package | `planned` | Builds on [`packages/typescript/README.md`](../../packages/typescript/README.md) | +| OpenAI Agents SDK / ChatGPT | Yes (ChatGPT connector) | No | `Session` + memory tools | PyPI package, connector recipe | `planned` | ChatGPT connector uses HTTPS `/mcp` | +| LlamaIndex | Optional | No | Memory block | PyPI package | `planned` | Builds on [`packages/python/README.md`](../../packages/python/README.md) | +| CrewAI | Optional | No | Storage backend | PyPI package | `planned` | Builds on [`packages/python/README.md`](../../packages/python/README.md) | +| Google ADK | Optional | No | Memory service | PyPI package | `planned` | Builds on [`packages/python/README.md`](../../packages/python/README.md) | +| Microsoft Agent Framework / Semantic Kernel / AutoGen | Optional | No | Context provider | NuGet / PyPI | `planned` | Native provider + MCP support | +| Pydantic AI, Mastra | Yes | Yes | Setup recipes | Docs recipes | `planned` | MCP-first integration guides | +| n8n, Dify, Flowise, LibreChat | Yes | LibreChat only | Setup recipes | Docs recipes | `planned` | MCP-first workflow & UI guides | + +## Contributing an Integration Guide or Adapter + +- Start from the [`_quickstart-template.md`](./_quickstart-template.md) template when adding a new host or recipe guide. +- Read [`CONTRIBUTING.md`](../../CONTRIBUTING.md) for DCO sign-off (`git commit -s`), public-repository hygiene rules, and local test commands. +- Validate all adapters against [`conformance/README.md`](../../conformance/README.md) (`ebbmem-conformance --mode mock`). +- For machine-readable documentation discovery, see [`llms.txt`](../../llms.txt) and [`README.md`](../../README.md). diff --git a/docs/integrations/_quickstart-template.md b/docs/integrations/_quickstart-template.md new file mode 100644 index 0000000..725d77c --- /dev/null +++ b/docs/integrations/_quickstart-template.md @@ -0,0 +1,62 @@ +# `` Integration Quickstart + +> **Template usage:** Copy this file when creating a new host guide or recipe. Keep placeholders generic (for example `https://your-ebbmem-host.example.invalid`, `127.0.0.1`, `ebb_your_api_key`), never place tokens in URL query parameters, preserve read-only `recall` + explicit `reinforce` semantics (`injected` OFF by default), and clearly label any snippet that has not been verified live. + +One-sentence summary of how `` connects to [EbbMem](https://ebbmem.ai) (for example via Streamable HTTP `/mcp/core`, local stdio `ebb-mcp`, or a native adapter package) and what memory capabilities it enables. + +## What You Need + +- **EbbMem endpoint:** A reachable EbbMem server URL (such as `https://your-ebbmem-host.example.invalid/mcp/core` for Streamable HTTP, or `http://127.0.0.1:8320/mcp/core` for local self-hosting) or a local `ebb-mcp` stdio setup. +- **Header credential:** An API key (`X-API-Key` or `Authorization: Bearer `) or OAuth 2.1 bearer token. Never pass credentials in URL query strings. +- **Namespace:** A target namespace (such as `:u:` via `X-Ebb-Namespace` or adapter `ScopeResolver` / `ScopingResolver`), avoiding per-thread or per-turn namespaces. +- **Target environment:** `` ``. +- **Optional agent instructions:** Copy the matching wrapper from [`instructions/README.md`](../../instructions/README.md) (starting from [`instructions/CORE.md`](../../instructions/CORE.md)) so the agent knows when to recall, remember, and reinforce. + +## Config Snippet + +Replace the placeholder host, namespace, and header credential with your own values. + +### MCP Configuration (if applicable) + +```json +{ + "mcpServers": { + "ebbmem": { + "type": "http", + "url": "https://your-ebbmem-host.example.invalid/mcp/core", + "headers": { + "Authorization": "Bearer ${EBBMEM_API_KEY}", + "X-Ebb-Namespace": "acme:u:alice" + } + } + } +} +``` + +### Native Adapter Configuration (if applicable) + +```text +# Replace with the target package install command and minimal initialization snippet. +# Ensure fail_open stays true, telemetry stays off by default, and recall does not reinforce. +``` + +## First Memory in Under Five Steps + +1. **Connect `` to EbbMem:** Apply the config snippet above (using `/mcp/core` for the six core tools, or `/mcp/full` if you also need `memory_search` / `memory_get` aliases and episodic/association tools). +2. **Store a durable memory:** Ask the agent (or call `memory_remember`) to save a preference or project fact with `tier: "semantic"` (and a deterministic `idempotency_key` on retries). Never store raw secrets, API keys, or passwords. +3. **Recall before answering:** Start a new turn or prompt and verify `memory_recall` (or `memory_search`) retrieves the stored memory inside `` framing without modifying its storage strength. +4. **Reinforce only what was used:** After the agent uses the recalled memory in its response or action, verify `memory_reinforce` is called with the `memory_id`, `used_ids`, and `recall_id` (when returned), keeping `injected` (reinforce-all-shown) OFF. + +## Troubleshooting + +- **`400 Bad Request` mentioning URL credentials:** Move any `token` or `api_key` out of the URL query string or userinfo into the `Authorization: Bearer` or `X-API-Key` header. +- **`400 Bad Request` on profile or namespace conflict:** Do not send a `X-Ebb-MCP-Profile` header that disagrees with `/mcp/`, and ensure `X-Ebb-Namespace` matches any `namespace` parameter in the request body. +- **`403 Forbidden` / JSON-RPC `-32003` on admin tools:** `memory_dream`, `memory_reflect`, and `memory_purge` require an admin-scoped credential on `/mcp/admin`. Use `/mcp/core` for normal agent workflows. +- **`404 Not Found` on namespace access:** EbbMem returns `404` for unauthorized or non-existent namespaces. Confirm the credential has access to the configured `X-Ebb-Namespace`. +- **Memories fade even after retrieval:** `recall` is strictly read-only. Confirm your workflow or agent instruction pack invokes `memory_reinforce` on memories that were actually used. + +## References + +- [Integrations Overview & Coverage Matrix](./README.md) +- [Agent Instruction Pack](../../instructions/README.md) +- [Conformance Kit](../../conformance/README.md) diff --git a/llms.txt b/llms.txt new file mode 100644 index 0000000..1183acf --- /dev/null +++ b/llms.txt @@ -0,0 +1,44 @@ +# EbbMem Integrations + +> Official Apache-2.0 conformance suite, agent instruction pack, shared integration core packages, and integration docs for [EbbMem](https://ebbmem.ai) — cognitive memory for AI agents. + +Key invariants across all EbbMem integrations: +- `recall` (`memory_recall` / `memory_search`) is strictly read-only; memories decay over time unless reinforced. +- Call `reinforce` (`memory_reinforce` with `memory_id`, `used_ids`, and optional `recall_id`) only for memories actually used; `injected` (reinforce-all-shown) stays OFF by default. +- Frame recalled text as untrusted reference data (``) and redact secrets before `remember` or logging. +- Send credentials only in `Authorization: Bearer ` or `X-API-Key` headers (never in URL query strings). +- Default to `fail_open = true`, retry only idempotent operations and keyed `remember`, and keep telemetry OFF by default. +- MCP `/mcp` supports profiles `core` (6 tools), `full` (15 tools including `memory_search` and `memory_get` aliases), and `admin` (18 role-gated tools), preferring MCP revision `2026-07-28`. + +## Documentation + +- [Integrations Overview & Coverage Matrix](docs/integrations/README.md): Integration architecture, MCP surface summary, and target status matrix. +- [Integration Quickstart Template](docs/integrations/_quickstart-template.md): Standard four-section template for host guides and framework recipes. +- [Repository README](README.md): Repository overview, layout, and local conformance quickstart. +- [Contributing Guide](CONTRIBUTING.md): DCO sign-off, local checks, and public-repository hygiene rules. + +## Agent Instruction Pack + +- [Instruction Pack Overview](instructions/README.md): Index of canonical memory discipline and host wrappers. +- [Canonical Agent Memory Discipline](instructions/CORE.md): Concise six-rule specification for agents. +- [Generic Agent Skill](instructions/SKILL.md): Portable Agent Skills wrapper. +- [AGENTS.md Snippet](instructions/AGENTS.md): Drop-in section for `AGENTS.md`-aware coding agents. +- [Cursor Rule](instructions/cursor/ebbmem.mdc): `.cursor/rules/ebbmem.mdc` rule file. +- [OpenClaw Skill](instructions/openclaw/SKILL.md): OpenClaw skill using `memory_search` and `memory_get` aliases. +- [Claude Code Skill](instructions/claude-code/SKILL.md): Claude Code `/mcp` skill file. + +## Integration Core Packages + +- [Python Integration Core](packages/python/README.md): `ebbmem-integration-core` (Python >=3.11; scoping, redaction/framing, fail-open/retry, reinforcement tracking, optional `ebbmem-client` adapter). +- [TypeScript Integration Core](packages/typescript/README.md): `ebbmem-integration-core` (Node >=20; scoping, redaction/framing, fail-open/retry, reinforcement tracking, structural `@ebbmem/client` adapter). + +## Conformance Kit + +- [Conformance Kit Overview](conformance/README.md): `ebbmem-conformance` CLI (`--mode mock`), 21 IC-1 YAML scenarios, and reference mock server. +- [MCP v2 Surface Descriptor](conformance/golden/mcp_surface_v2.json): Public MCP revisions, `core`/`full`/`admin` profiles, tool annotations, and `outputSchema` definitions. + +## External Links + +- [EbbMem](https://ebbmem.ai): Product site. +- [Spector](https://github.com/spectrayan/spector): Companion JVM cognitive memory project. +- [Memory Fundamentals](https://github.com/spectrayan/memory-fundamentals): Public cognitive memory specification.