hermes-memory-provider-development

Implement and test Hermes Agent memory provider plugins in Python.

2|Updated Aug 2, 2026
One-click install
npx skills add https://github.com/Arasz/ai-raccoon --skill hermes-memory-provider-development-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hermes-memory-provider-development
Source: https://github.com/Arasz/ai-raccoon/tree/main/.ai-badger/skills/learned/hermes/hermes-memory-provider-development
Command: npx skills add https://github.com/Arasz/ai-raccoon --skill hermes-memory-provider-development-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mcp, and includes references (resource) components.

What problem does it solve? Building a plugin that plugs into Hermes Agent's memory system requires knowing the exact MemoryProvider ABC contract, discovery heuristics, threading rules, and testing patterns, which are easy to get wrong without verified guidance. ## Core Features & Use Cases - Interface Contract: Documents the abstract methods (name, is_available, initialize, get_tool_schemas, handle_tool_call) and optional hooks (prefetch, sync_turn, on_memory_write, and more) of the MemoryProvider ABC. - Registration & Discovery: Explains entry-point registration, the 8192-byte loader heuristic, directory naming rules, and single-provider selection via the memory.provider config key. - MCP-Bridge Pattern: Shows how to wrap a remote memory server as a thin in-process shim using the official mcp SDK with lazy imports and sync-over-asyncio. - Testing Patterns: Covers duck-typed fake clients, spec-loading hyphenated plugin directories in pytest, and integration tests that spawn the real server with isolated data roots. - Use Case: You are writing an AiRaccoon-backed memory provider for Hermes and need to avoid pitfalls like leaking spawned child processes or integration tests writing into the real memory bank. ## Quick Start Ask the agent to scaffold a Hermes memory provider plugin implementing the MemoryProvider ABC with registration, tool schemas, and unit tests using a fake client.

Frequently Asked Questions about hermes-memory-provider-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Hermes memory provider plugin in Python?

Subclass the MemoryProvider ABC from agent.memory_provider and implement name, is_available, initialize, get_tool_schemas, and handle_tool_call. Register it with a register(ctx) function that calls ctx.register_memory_provider, and place the plugin in plugins/memory/<name>/ or $HERMES_HOME/plugins/<name>/.

How do I connect a remote MCP memory server to Hermes Agent?

Wrap the server in a thin in-process shim implementing MemoryProvider using the official mcp SDK from the hermes venv. Import mcp lazily inside connect(), run a persistent asyncio loop thread with run_coroutine_threadsafe, and never re-spawn the stdio child per call.

Why is my Hermes memory plugin not being discovered?

The loader heuristic scans only the first 8192 bytes of __init__.py for the markers register_memory_provider or MemoryProvider, so keep one marker early in the module docstring. Also verify the provider name matches the directory name and that no second external provider is already selected.

How do I test a Hermes memory provider with pytest?

Inject a duck-typed fake client via a client_factory constructor parameter and spec-load the plugin module with importlib.util.spec_from_file_location since hyphenated directories are not importable. For integration tests, spawn the real server with a temp data root passed through spawn args.

Why do Hermes memory provider integration tests write to the real memory bank?

If the server CLI resolves its data root only from a flag like --data-root, environment variables are ignored by the spawned binary, so tests silently write into the real store. Pass the flag through spawn args and verify isolation by counting test rows before and after the run.

What threading rules must a Hermes memory provider follow?

sync_turn must be non-blocking: run it on a daemon thread and join the previous sync thread within 5 seconds before starting the next. prefetch must return quickly, and re-initialization must close the previous client to avoid leaking the child process.