Skip to content

Agent frameworks

Hermes Agent

SurrealDB Agent Memory is a memory provider for the Hermes Agent. Once installed and selected, the agent recalls relevant memories before each turn, writes each completed turn back to SurrealDB Agent Memory asynchronously, and consolidates memory when a session ends. It also gains explicit memory tools it can call directly.

Package: agent-memory-hermes (PyPI). It pulls in the SurrealDB SDK (surrealdb v3, which bundles SurrealDB Agent Memory) and registers the plugin with Hermes through the hermes_agent.plugins entry point.

Note

This is the hosted provider. For a persistent filesystem on a SurrealDB instance you run, with a toolset the agent calls directly, see the SurrealDB filesystem integration for Hermes. Only one memory provider can be active at a time, so pick one.

  • Python 3.10+

  • A running Hermes Agent install

  • SurrealDB Agent Memory access: endpoint, context, and API key

pip install agent-memory-hermes
export AGENT_MEMORY_API_KEY="..."
export AGENT_MEMORY_ENDPOINT="https://your-instance.agent-memory.dev"
export AGENT_MEMORY_CONTEXT="my-context"

Select the provider. Hermes prompts for any missing settings and writes the non-secret ones to $HERMES_HOME/agent-memory.json:

hermes memory setup      # choose "agent_memory"
hermes memory status     # confirm it is active
hermes                   # run a session with Agent Memory-backed memory
SettingEnv varDefaultNotes
api_keyAGENT_MEMORY_API_KEYn/aSecret, required (kept in .env)
endpointAGENT_MEMORY_ENDPOINTn/aRequired, origin with no trailing slash
contextAGENT_MEMORY_CONTEXTn/aRequired; a client is pinned to one context
recall_modeAGENT_MEMORY_RECALL_MODEhybridhybrid, context, or tools
write_frequencyAGENT_MEMORY_WRITE_FREQUENCYturnturn or session
top_kAGENT_MEMORY_TOP_K5Memories recalled per turn
default_scopeAGENT_MEMORY_DEFAULT_SCOPEn/aFor example user/tobie; scope for writes and lens for reads

Recall modes. hybrid injects raw recalled memories before each turn; context injects a synthesised answer instead; tools injects nothing and lets the model recall explicitly with agent_memory_recall / agent_memory_context.

ToolPurpose
agent_memory_recallSearch memory across semantic, lexical, graph, and temporal signals.
agent_memory_rememberStore a durable fact.
agent_memory_contextReturn a synthesised answer from memory.
agent_memory_forgetSupersede (default) or hard-delete.
agent_memory_reflectDerive insights, optionally persisting them.
agent_memory_uploadIngest a document into knowledge memory.

The provider is built not to destabilise the agent. Writes run on a background daemon thread, so turns never block on I/O. Every SurrealDB Agent Memory call is wrapped; failures are logged and degrade to empty results rather than raising into the agent loop (fail open). After repeated failures or an authentication error, a circuit breaker disables memory for the rest of the session.

  • For an MCP-native host, use the MCP server.

  • To call SurrealDB Agent Memory directly, use the Python SDK.

Was this page helpful?