# External Memory Plugins

Builds, tests and troubleshoots memory provider plugins for the Nexent agent platform.

- Repository: https://github.com/ModelEngine-Group/nexent (6109 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ModelEngine-Group/nexent --skill external-memory-plugin -g -a claude-code -y`
Codex: `npx skills add ModelEngine-Group/nexent --skill external-memory-plugin -g -a codex -y`
Cursor: `npx skills add ModelEngine-Group/nexent --skill external-memory-plugin -g -a cursor -y`
Gemini CLI: `npx skills add ModelEngine-Group/nexent --skill external-memory-plugin -g -a gemini-cli -y`

## Description

Develop, adapt, review, test, and troubleshoot Nexent external memory provider plugins, including plugin.yaml manifests, searchable and ingestible provider protocols, error mapping, network-isolated unit tests, deployment configuration, and Mem0-based examples. Use when adding a new external memory vendor, changing an existing memory plugin, validating partner adapters, or diagnosing plugin discovery, authentication, retrieval, ingestion, or CI failures.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# External Memory Plugin

Develop external memory adapters against the current Nexent contract and prove them without live-service CI dependencies.

## Establish scope

1. Read the repository `AGENTS.md` and invoke its SPEC workflow for production behavior changes.
2. Inspect, rather than assume, these current contracts:
   - `sdk/nexent/memory/providers/base.py`
   - `sdk/nexent/memory/models.py`
   - `backend/services/memory_provider_plugin_loader.py`
   - `backend/services/memory_external_provider_service.py`
3. Read [references/plugin-contract.md](references/plugin-contract.md) before creating or reviewing a manifest or provider.
4. Read [references/mem0-example.md](references/mem0-example.md) when implementing HTTP transport, error mapping, or tests.
5. Preserve tenant, user, Agent, and conversation scope. Never print or persist credentials.

## Implement the adapter

1. Create `<plugin-dir>/<name>/plugin.yaml` and `provider.py`.
2. Declare only implemented capabilities in `implements`.
3. Make protocol methods asynchronous and return the exact Nexent models.
4. Honor provider-level `timeout_seconds` and result limits.
5. Map remote failures to `ProviderError` and the retry exception matching recovery semantics.
6. Keep OTel attributes low-cardinality and free of queries, memory content, user identifiers, tenant identifiers, and secrets. Rely on the orchestration service's standard instrumentation unless provider-specific spans add actionable detail.
7. Treat the deployment search/ingest switches as kill switches and the provider `enabled` field as the instance switch; do not bypass them in normal runtime paths.

## Test without external dependencies

The rest: https://github.com/ModelEngine-Group/nexent/blob/HEAD/.claude/skills/external-memory-plugin/SKILL.md
