feat(integrations): Hermes Agent memory provider for BrainDB - #17
Merged
Conversation
Native Hermes MemoryProvider (integrations/hermes/braindb): agent-only gateway --
braindb_ask -> /agent/query (the whole of BrainDB) and braindb_ingest -> file
upload. Loads its usage skill live from BrainDB, so there is no duplicated prompt.
Relies on two small ADDITIVE BrainDB endpoints, isolated in a new
braindb/routers/integrations.py (+1 include_router line in main.py): GET
/api/v1/skill/{name} and POST /api/v1/entities/datasources/upload. No existing
route, schema, or behaviour is modified.
Adds a hardened, tool-stripped docker sandbox (integrations/hermes/sandbox) to run
Hermes against a throwaway BrainDB on an isolated host. Tests for both endpoints;
full suite green.
… path - Remove all Llama-3.3-70B references. The sandbox template no longer hardcodes any model: model.default + model.api_key are blank placeholders, filled only in the gitignored Pi copy (hermes-data/config.yaml). - Disable the correct toolset name 'code_execution' (was 'execute_code', which left code execution enabled). - User memory-plugin path is FLAT (~/.hermes/plugins/<name>/): fix the compose mount target, the plugin + sandbox READMEs, and the plugin docstring. - Sync the sandbox compose to the working form: default caps + non-root UID (the image's s6 init needs CHOWN/SETUID/SETGID, so cap_drop ALL broke startup). - Drop the vestigial .env.example (the key now lives in config.yaml model.api_key).
Brief "Integrations" section in README.md linking to integrations/hermes/ (the provider plugin + the test sandbox), and note the folder in CLAUDE.md's project structure (+ list the new integrations.py router). Signpost only — the detailed docs live in integrations/hermes/.
Hermes discovers memory providers by scanning plugin folders, not via pip/entry points, so the listed pip package could never register the provider (and naming an unowned PyPI package invites a squat). Keep only the verified folder-copy install.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a native memory-provider plugin so Hermes Agent can use a self-hosted BrainDB as its long-term memory, plus the two small endpoints it relies on and a hardened test sandbox.
Plugin (
integrations/hermes/braindb/)braindb_ask(query)reaches all of BrainDB through one tool (recall / save / relate / reason via BrainDB's own internal agent);braindb_ingest(file_path)uploads a local file for ingestion./skillendpoint, so there is no copied prompt to keep in sync.MemoryProvider(register / plugin.yaml / JSON tool returns), verified against the real Hermes source.BrainDB endpoints (only core change - additive, isolated)
New
braindb/routers/integrations.py(plus oneinclude_routerline inmain.py), commented as external-integration:GET /api/v1/skill/{name}- serves a shipped skill's markdown (sanitized name, 404 if missing).POST /api/v1/entities/datasources/upload- lands an uploaded file indata/sources/for the existing watcher to ingest (filename sanitize, extension allow-list, size cap, no-overwrite). No new ingestion logic.No existing route, schema, or behaviour is modified.
Sandbox (
integrations/hermes/sandbox/)A tool-stripped, containerized way to run Hermes against a throwaway BrainDB on an isolated host (compose + config template + README). The committed config hardcodes no model.
Install
Copy the plugin folder into
~/.hermes/plugins/braindb, then runhermes memory setup.Tests
tests/test_integrations.pycovers both endpoints.py_compileclean.braindb_ask(fact saved + recalled) andbraindb_ingest(file uploaded, watcher extracted facts, recalled).Notes
hermes plugins installgit self-install once runtime-confirmed.