Hermes Atlas
Memory & knowledge

Contexto

ekailabs/contexto

Context engine plugin for OpenClaw and Hermes agents that retrieves old constraints after compaction

In short

Contexto is a context engine plugin for OpenClaw and hermes-agent that stores full conversation episodes and retrieves the relevant ones later. It targets long-running agents that lose early instructions to compaction.

What Contexto does

Contexto addresses a specific failure in long sessions: an instruction given early, such as 'flag suspicious emails, do not delete anything', gets lost when older turns are compacted into summaries. Instead of a summary, it ingests whole episodes, including tool output, once the prompt budget crosses the compaction threshold.

Episodes are grouped with hierarchical clustering (AGNES) so unrelated topics stay in separate branches, and retrieval uses multi-branch beam search to pull the most relevant episodes for the current prompt. Retrieval paths are explainable, for example travel to Japan to visa docs. For Hermes it is a pip package that links a plugin into hermes-agent and is switched on with context: engine: contexto in ~/.hermes/config.yaml. A hosted backend is the default, and a fully local setup is documented separately.

Key features

  • Stores full episodes instead of lossy summaries
  • Semantic clustering with AGNES keeps topics separate
  • Multi-branch beam search retrieval with explainable paths
  • Hermes install through the contexto-hermes pip package and one config key
  • Managed hosting option, or a local setup using your own OpenAI or OpenRouter key
  • Custom storage backends through a ContextoBackend interface

When to use it

  • Keep rules and preferences intact in agent sessions that run long enough to compact
  • Stop an email or file-handling agent from forgetting a 'never delete' instruction
  • Debug why a particular piece of earlier context was or was not retrieved

Who it is for: Users of Hermes Agent or OpenClaw whose long-running agents drift after the context window fills.

How it fits with Hermes Agent

Contexto ships a dedicated Hermes package, contexto-hermes, that installs as a context engine plugin. It supports OpenClaw as well.

How to install Contexto

These commands are copied from the project's README. Check the repository for the latest steps before you run them.

pip install contexto-hermes
contexto-hermes-install
export CONTEXTO_API_KEY=YOUR_KEY
hermes gateway run

Requirements: A Contexto API key from getcontexto.com for the hosted backend, or your own OpenAI or OpenRouter key for the local setup; context: engine: contexto set in ~/.hermes/config.yaml

Note: The default setup calls a hosted backend at api.getcontexto.com and needs an API key.

FAQ

What is Contexto?

Contexto is a context engine plugin for OpenClaw and hermes-agent. It keeps full conversation episodes and retrieves the relevant ones so early instructions survive compaction.

How do I install Contexto for Hermes Agent?

Run pip install contexto-hermes, then contexto-hermes-install to link the plugin into hermes-agent. Set context: engine: contexto in ~/.hermes/config.yaml, export CONTEXTO_API_KEY and run hermes gateway run.

What do I need to run Contexto?

You need a Contexto API key from getcontexto.com for the managed backend. A fully local setup that uses your own OpenAI or OpenRouter key is described in the repository docs.

Similar memory for Hermes Agent

All memory

Related guides: SOUL.md for Hermes Agent: what it is and how to write one · Run multiple Hermes agents with profiles