Spectron ⇄ Hermes Agent
A Hermes Agent memory provider backed by SurrealDB Spectron — provenance-first, tri-temporal agent memory with semantic, lexical, graph and temporal recall.
Once installed and selected, the agent automatically:
- recalls relevant memories before every turn,
- writes each completed turn back to Spectron (asynchronously),
- consolidates memory when a session ends,
and gains six explicit memory tools it can call directly.
Requirements
- Python 3.10+
- A running Hermes Agent install (verified against Hermes Agent 0.18.2)
- Spectron access (endpoint, context, API key). Spectron is in invite-only preview.
Install
pip install spectron-hermes
This pulls in the SurrealDB SDK (surrealdb v3, which bundles Spectron) and
registers the plugin with Hermes via the hermes_agent.plugins entry point.
Alternative: drop-in directory
If your Hermes setup discovers memory providers by directory, copy the package
into $HERMES_HOME/plugins/spectron/ (it ships a plugin.yaml manifest for
this) and pip install "surrealdb>=3.0.0a4".
Configure & activate
Provide credentials via the environment (the API key is a secret and belongs in
.env):
export SPECTRON_API_KEY="..."
export SPECTRON_ENDPOINT="https://your-instance.spectron.dev"
export SPECTRON_CONTEXT="my-context"
Then select the provider — Hermes will prompt for any missing settings:
hermes memory setup # choose "spectron"
hermes memory status # confirm it is active
hermes # run a session with Spectron-backed memory
Non-secret settings are written to $HERMES_HOME/spectron.json.
Configuration
| Setting | Env var | Default | Notes |
|---|---|---|---|
api_key |
SPECTRON_API_KEY |
— | secret, required (stored in .env) |
endpoint |
SPECTRON_ENDPOINT |
— | required, origin with no trailing slash |
context |
SPECTRON_CONTEXT |
— | required; Spectron pins a client to one context |
recall_mode |
SPECTRON_RECALL_MODE |
hybrid |
hybrid | context | tools |
write_frequency |
SPECTRON_WRITE_FREQUENCY |
turn |
turn | session |
top_k |
SPECTRON_TOP_K |
5 |
memories recalled per turn |
default_scope |
SPECTRON_DEFAULT_SCOPE |
— | e.g. user/tobie; scope for writes / 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 via spectron_recall / spectron_context.
Tools exposed to the agent
| Tool | Spectron call | Purpose |
|---|---|---|
spectron_recall(query, k?) |
recall |
Search memory (semantic/lexical/graph/temporal). |
spectron_remember(text, scope?) |
remember |
Store a durable fact. |
spectron_context(query, k?) |
query_context |
Synthesised answer from memory. |
spectron_forget(query, purge?) |
forget |
Supersede (default) or hard-delete. |
spectron_reflect(query, persist?) |
reflect |
Derive insights; optionally persist. |
spectron_upload(path, title?) |
documents.upload |
Ingest a document into knowledge memory. |
Reliability
The provider is built to never destabilise the agent:
- Writes run on a background daemon thread — turns never block on I/O.
- Every Spectron 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 auth error) a circuit breaker disables memory for the rest of the session.
Development
pip install -e ".[dev]"
pytest
Tests use a mock Spectron client and need neither a live server nor the
surrealdb SDK installed.
License
Apache-2.0
Metadata
Release files for spectron-hermes 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spectron_hermes-0.3.0.tar.gz | 22.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spectron_hermes-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.1 kB
Release files / spectron_hermes-0.3.0.tar.gz
| Download URL | spectron_hermes-0.3.0.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b57c07af80b19524f731331366fa74219dbbc25b6b91fb1c46aeb8e28478b46
|
|
BLAKE2b-256 checksum How to use checksums |
7463e9fc096acad7d39147a14583dff14e9d87c41a82abfee8cfa535de06130c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logRelease files / spectron_hermes-0.3.0-py3-none-any.whl
| Download URL | spectron_hermes-0.3.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eae388152d796d807b577a67e4d4a089c78ac64678c1fbb6a4c8c2529bdf091f
|
|
BLAKE2b-256 checksum How to use checksums |
0c3f08a97b856737f420a971a25a920df22b5c8ac4a705dff24130bb95c6f5c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency log