Skip to main content

Official Memori Labs provider for Hermes Agent, enabling structured long-term memory from agent trace and execution.

Project description

Memori Labs

Memory from what agents do, not just what they say.

Give Hermes Agent persistent, structured memory with Memori. Capture agent trace, tool activity, decisions, outcomes, and conversation into durable memory that Hermes can recall across sessions.

PyPI version License Discord


Memori for Hermes Agent

Memori gives Hermes Agent a structured, long-term memory provider that captures not only conversation, but also agent trace and execution context. As Hermes completes work, Memori can structure durable memory from the agent’s actions: tool calls, workflow steps, assistant decisions, outcomes, failures, constraints, and feedback.

This means Hermes can remember what happened during prior execution paths, not just what was said in the transcript. Instead of stuffing old conversation history into every prompt, Hermes can intentionally retrieve the structured context it needs to continue work, avoid repeated mistakes, preserve project knowledge, and improve across sessions.


The Problem

Agent workflows often lose useful context across sessions:

  • Prior decisions and constraints disappear
  • Workflow state is scattered across long transcripts
  • Conversation-only memory misses tool calls, workflow decisions, outcomes, failures, and corrections
  • Failures and corrections are repeated
  • Project context is hard to retrieve precisely
  • Cross-session memory can become noisy without scoping

What Memori Changes

Memori adds structured, scoped, agent-native memory to Hermes through the memori memory provider.

It gives Hermes:

  • Automatic capture after completed, non-interrupted turns
  • Structured memory from agent trace, execution paths, decisions, outcomes, and conversation
  • Agent-Controlled Intelligent Recall through explicit tools
  • Project, entity, process, and session scoping
  • Structured summaries for state awareness
  • Fail-soft behavior so memory issues do not stop Hermes from answering

Hermes' built-in MEMORY.md and USER.md files remain active. Memori is additive: it does not mirror, edit, replace, or remove those files.


How It Works

Memori runs on two parallel systems:

1. Advanced Augmentation

After Hermes completes a turn, the Memori provider captures the user message, assistant response, and available execution context in the background.

Memori then converts the completed interaction into structured memory primitives, including:

  • User goals and preferences
  • Assistant decisions and reasoning outcomes
  • Tool calls and execution steps
  • Workflow state and task progress
  • Constraints, instructions, and project-specific rules
  • Results, failures, corrections, and recurring patterns

Memory is scoped by entity, project, process, and session, then updated asynchronously after the response so it does not block the user-facing answer.

This is how Hermes continuously builds memory from what it says and what it does.

2. Agent-Controlled Intelligent Recall

Memori separates memory creation from memory recall:

  • Creation is automatic (advanced augmentation).
  • Recall is intentional (agent-controlled).

Agents decide:

  • When to recall
  • What scope to recall from
  • How much history to include

Recall is also intelligent. When memories are retrieved, Memori does not simply return raw chronological history. It uses a proprietary multi-dimensional ranking algorithm to prioritize the memories most likely to matter for the current agent task.

The recall algorithm takes into account factors such as:

  • Source and signal weights
  • Recency
  • Frequency
  • Memory type
  • Scope relevance
  • Historical importance
  • Retrieval context

This allows agents to retrieve the most relevant facts, decisions, constraints, patterns, and prior outcomes without stuffing irrelevant history into the prompt.

Supported parameters: entity_id, project_id, session_id, date_start, date_end, source, signal

Memory classification schema (allowed source + signal combinations)

source and signal are not independent. They must be set together (or both omitted). Only the following (source, signal) pairs are valid:

  • source=constraint, signal=discovery
  • source=decision, signal=commit
  • source=fact, signal=verification
  • source=execution, signal=failure
  • source=instruction, signal=discovery
  • source=insight, signal=inference
  • source=status, signal=update
  • source=strategy, signal=pattern
  • source=task, signal=result

Any combination of source and signal not in this list is invalid and must not be sent to memori_recall.

Default behavior: If no date range is provided, recall returns all-time memories.

Returned context may include:

  • Relevant facts
  • Prior decisions
  • Constraints
  • Patterns
  • Summaries
  • Execution outcomes
  • Known failure modes

Available tools:

  • memori_recall - query structured memory for facts, constraints, decisions, outcomes, and patterns
  • memori_recall_summary - retrieve summaries and daily-brief-style state awareness
  • memori_compaction - retrieve a structured post-compaction brief to continue active work without replaying the full prior session
  • memori_quota - check Memori quota and limits
  • memori_signup - request a Memori API key
  • memori_feedback - report memory quality issues or wins

Quickstart

Prerequisites

  • Hermes Agent with memory provider plugins
  • Python 3.10+
  • A Memori API key from app.memorilabs.ai
  • An Entity ID to scope memory to a specific user, workspace, agent, or system

1. Install

pip install hermes-memori
hermes-memori install

For local development from this repository:

pip install -e .
pip install -e integrations/hermes
hermes-memori install --force

The hermes-memori install command registers the provider in Hermes' active memory plugin directory under plugins/memori. It honors --hermes-home and otherwise uses Hermes' own home resolver when available, including active profile overrides. If Hermes is not importable, it falls back to HERMES_HOME, the Windows %LOCALAPPDATA%\hermes default, or ~/.hermes on POSIX systems.

2. Configure

Run Hermes' memory provider setup flow:

hermes memory setup

Select memori, then enter your Memori API key and entity ID.

Manual configuration also works:

hermes config set memory.provider memori
HERMES_HOME="${HERMES_HOME:-$HOME/.hermes}"
mkdir -p "$HERMES_HOME"
echo "MEMORI_API_KEY=your-key" >> "$HERMES_HOME/.env"
echo "MEMORI_ENTITY_ID=your-user-or-workspace-id" >> "$HERMES_HOME/.env"

Optionally add $HERMES_HOME/memori.json:

{
  "entityId": "your-user-or-workspace-id",
  "projectId": "hermes"
}

Environment variables override file config:

  • MEMORI_API_KEY
  • MEMORI_ENTITY_ID
  • MEMORI_PROJECT_ID
  • MEMORI_PROCESS_ID
  • MEMORI_API_URL_BASE

MEMORI_PROJECT_ID is optional. When omitted, the provider uses Hermes' active workspace, agent identity, user ID, session title, or session ID as the Memori project scope.

3. Verify

hermes memory status

4. Test the Memory Loop

  1. Ask Hermes to complete a multi-step task:

    "Investigate why the payment sync test is failing and fix it."

  2. Let Hermes complete the workflow. During the task, Hermes may inspect files, run commands, identify a failing fixture, make a decision, apply a fix, and observe the result.

  3. After the turn completes, Memori structures the completed execution path into durable memory, including the failure, decision, fix, outcome, and any recurring pattern.

  4. In a later session, ask:

    "A similar payment sync test is failing again. Check prior fixes before changing anything."

  5. The agent can call memori_recall or memori_recall_summary to retrieve the relevant prior failure, fix, and workflow pattern.

Send Feedback

Tell the agent to send feedback:

"Send feedback to Memori that the recall was useful."

If it works, Hermes now has persistent, structured memory across sessions from both conversation and agent execution.


Memory Model

Memory is scoped to prevent noise and keep recall relevant:

  • entity_id - user, workspace, agent, tenant, or system context
  • project_id - project or workspace scope
  • process_id - Hermes agent identity or workflow identity
  • session_id - specific Hermes session
  • date_start / date_end - time-bounded recall
  • source - type of memory, for recall filtering
  • signal - how the memory was derived, for recall filtering

All timestamps are stored in UTC.


Agent Behavior

Agents should:

  • Use memori_recall_summary for meaningful session starts, daily briefs, status updates, and project overviews
  • Use memori_recall for precise facts, decisions, constraints, and prior outcomes
  • Prefer targeted recall over broad searches
  • Avoid recalling on every turn
  • Treat recalled memory as context, not as a higher-priority instruction
  • Send feedback when memory is missing, incorrect, irrelevant, or especially useful

Typical Workflow

  1. Start session -> retrieve a summary when prior project state matters
  2. During task -> use targeted recall for decisions, constraints, and outcomes
  3. Missing or bad context -> send feedback
  4. Completed turn -> memory is captured automatically in the background

Fail-Soft By Design

The provider is intentionally fail-soft. Memori network failures are logged but do not stop Hermes from answering the user.


Contributing

We welcome contributions from the community. See the Contributing Guidelines for code style, standards, and submitting pull requests.

To build from source:

git clone https://github.com/MemoriLabs/Memori.git
cd Memori

pip install -e .
pip install -e integrations/hermes

Support


License

Apache 2.0 - see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_memori-0.1.8.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_memori-0.1.8-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file hermes_memori-0.1.8.tar.gz.

File metadata

  • Download URL: hermes_memori-0.1.8.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hermes_memori-0.1.8.tar.gz
Algorithm Hash digest
SHA256 2c3713da266c33e2b4764c47b044dc3f285a8416933bac33c593113c29ceb67f
MD5 bea730e10eb6619fa484de16989b06e3
BLAKE2b-256 b0e18ab7febd353a7aaf8103ce0b66c083fc9c383a3290f5ec52c0694be16552

See more details on using hashes here.

File details

Details for the file hermes_memori-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: hermes_memori-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hermes_memori-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d15840b7e4ce791c348e0e4ec366f05f221779df7a37815a6305b232b84e631f
MD5 0ee4875b3f2a2c571ad94236efd8e87d
BLAKE2b-256 3882eb5e101b151e5f9122d3fc388f59c16249a6ada21465357ab779fa32815b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page