HERMES AGENT

Hermes Agent is an open-source, provider-agnostic AI agent framework. ChainMemory integrates with Hermes via two paths: the MCP server (native tools inside chat) or the cm.py CLI wrapper (full control from terminal).

Prerequisites

  • Hermes Agent installed (Windows, macOS, Linux, WSL)
  • ChainMemory account with API key (format: aic_...)
  • Python 3.10+ (for cm.py wrapper)

Get Your API Key

ChainMemory accounts are created exclusively through the Chrome Extension:

  1. Install ChainMemory Extension
  2. Click the icon in your browser toolbar
  3. Choose "Generate API Key automatically" (free wallet + 1 AIC) or "I already have a key"
  4. Go to Settings → Connection and click "View" to copy your API key

Important: The Faucet (faucet.chainmemory.ai) distributes AIC tokens for on-chain operations, but does not issue API keys. The API key comes only from the Extension.

Option A: MCP Server (Chat Workflow)

The MCP server exposes ChainMemory as native tools inside Hermes chat. After configuration, you can say things like "Remember: we decided to use PostgreSQL" and Hermes will call the tool automatically.

Configuration

Edit ~/.hermes/config.yaml and add:

YAML — ~/.hermes/config.yaml
mcp_servers:
  chainmemory:
    command: "python"
    args: ["C:\\Users\\<user>\\.hermes\\skills\\chainmemory-mcp\\chainmemory_mcp_server.py"]
    env:
      CHAINMEMORY_API_KEY: "aic_..."
      CHAINMEMORY_BASE_URL: "https://api.chainmemory.ai/v1"
      CHAINMEMORY_DEFAULT_PROJECT: "default"

Restart Hermes after editing. The tools appear as mcp_chainmemory_* in chat.

Available MCP Tools

ToolWhat it does
mcp_chainmemory_save_memorySave a memory
mcp_chainmemory_list_memoriesList / search memories
mcp_chainmemory_get_profileAccount info
mcp_chainmemory_list_projectsList projects
mcp_chainmemory_get_balanceAIC balance + faucet URL
mcp_chainmemory_get_blockchain_statsChain stats
mcp_chainmemory_update_memory_tagsRetag a memory
mcp_chainmemory_archive_memoryArchive / unarchive

Option B: cm.py Wrapper (CLI / Scripts)

cm.py is a Python CLI that wraps the REST API. It handles auth headers, pacing, and retries. Install it via the ChainMemory skill:

bash
hermes skills install chainmemory

Then configure your key:

bash
chmod 600 ~/.hermes/chainmemory.env

Commands

CommandWhat it does
cm whoamiShow account, tier, quota
cm projectsList all projects
cm save "text" --project my-appSave a memory
cm recall --project my-appRecall recent memories
cm search "query" --project my-appSemantic search
cm state my-appProject State
cm seal my-appAnchor state on-chain (irreversible)
cm verify my-appPublic verification (no auth)

Option C: REST API Direct

Any HTTP client works. Base URL: https://api.chainmemory.ai/v1. Auth header: x-api-key: aic_... (not Authorization: Bearer).

Important Notes

  • Auth header: Use x-api-key, not Authorization: Bearer.
  • Rate limits: 30–600 req/min depending on plan.
  • The state does not build itself: there is no backend consolidation and no automatic trigger. The Project State changes only when a client proposes operations through update_project_state (MCP) or POST /v1/project/:name/state/ops (API). Waiting will not produce a state — asking for one will.
  • What "seal" means here: in ChainMemory own API and MCP server, seal makes a single memory permanently immutable (POST /v1/seal/:id, which takes your memory number). The Project State is anchored as part of consolidation, not by sealing. cm.py is a third-party wrapper and may map its commands differently.
  • Windows paths: In config.yaml, use double backslashes: C:\\Users\\<user>\\...

Verify Setup

bash
# Via MCP (in chat)
"Save this: We decided to use PostgreSQL for the primary database"

# Via CLI
cm whoami
cm save "We decided to use PostgreSQL for primary DB" --project my-app --tags decision,stack
cm state my-app
cm verify my-app