Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# --- PostgreSQL Credentials ---
# Password for the postgres user (used by docker-compose)
HEXUS_DB_PASS=postgres_secret

# --- Hexus MCP Server Config ---
# If you run the MCP server manually (outside of docker-compose),
# you'll need this so it knows how to connect.
# NOTE: If running via `docker compose --profile mcp up`, the compose file
# already sets this to host=pg internally, but you can override here.
HEXUS_DSN="dbname=hermes_test user=postgres password=postgres_secret host=localhost"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Database name inconsistency — hermes_test vs README's hermes_memory

The README.md (lines 76, 86, 92) uses database name hermes_memory, while this file and docker/compose.yml use hermes_test. Same issue on line 35 (commented yaml section). This inconsistency within the same PR will confuse users. Choose one name and use it consistently.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.


# (Optional) Pre-load the embedding model at startup
# HEXUS_EMBED_EAGER_LOAD="1"

# (Optional) Transport for MCP server: "stdio" or "http"
# HEXUS_TRANSPORT="stdio"

# (Optional) Webhook integration
# HEXUS_WEBHOOK_URL="https://your-webhook.url/..."
# HEXUS_WEBHOOK_SECRET="your_hmac_secret"


# ==============================================================================
# Hexus Plugin Configuration (for hermes.yaml)
# ==============================================================================
# If you are using Hexus directly as a Hermes Agent plugin (rather than MCP),
# you don't use this .env file to configure the database connection. Instead,
# you configure it in your `hermes.yaml` under the memory plugin settings:
#
# plugins:
# memory:
# provider: hexus
# config:
# # Point this to your docker postgres instance:
# dsn: "dbname=hermes_test user=postgres password=postgres_secret host=localhost"
# # Optional: configure embedding method
# embed_provider: "local" # or "openai", "ollama"
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,32 @@ pip install hexus
```
*Note: Once installed, just point Hermes to it! You can also just drop the `hexus` module files straight into your `~/.hermes/plugins/hexus/` directory. Hermes's discovery system will automatically pick it up and initialize it on startup!*

**Configuration (`hermes.yaml`):**
When running as a Hermes plugin, configure it directly in your `hermes.yaml` file (not via environment variables):

```yaml
plugins:
memory:
provider: hexus
config:
# The Postgres connection string (required)
dsn: "dbname=hermes_memory user=postgres password=postgres_secret host=localhost"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Database name inconsistency — hermes_memory vs hermes_test

The .env.example file (line 10) and docker/compose.yml use database name hermes_test (POSTGRES_DB: hermes_test). However, this README uses hermes_memory here and on lines 86, 92. Pick one name and use it consistently across all files — users will be confused about which database to create.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

```

### Option 2: Docker & MCP Server (Claude, Cursor, etc.)
The easiest way to run the standalone MCP server is via Docker (GHCR).

> **Note:** The Docker MCP server requires a running PostgreSQL database with `pgvector` enabled. You can reference or use our provided `docker/compose.yml` file as a quick example to spin one up!

**Environment Variables:**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Incomplete environment variable documentation

The README lists only 3 environment variables, but the application reads at least 7 (per mcp_server/tools.py, cli.py, and compose.yml). Missing from this list: HEXUS_TRANSPORT, HEXUS_WEBHOOK_URL, HEXUS_WEBHOOK_SECRET, and HEXUS_AGENT_IDENTITY. All except HEXUS_AGENT_IDENTITY are shown in .env.example — consider listing them here too for completeness.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

When running via Docker or as a standalone MCP server, you can pass the following environment variables:
* `HEXUS_DSN` - The Postgres connection string (e.g., `dbname=hermes_memory user=postgres password=secret host=pg`).
* `HEXUS_DB_PASS` - Used by our `compose.yml` to automatically set up the Postgres password.
* `HEXUS_EMBED_EAGER_LOAD` - Set to `"1"` to pre-load the local embedding model at startup (saves ~1-2s on first use).

```bash
# Run the MCP server via HTTP streamable transport on port 8000
docker run -d --name hexus -p 8000:8000 ghcr.io/codenamekt/hexus:latest
docker run -d --name hexus -p 8000:8000 -e HEXUS_DSN="dbname=hermes_memory user=postgres host=host.docker.internal" ghcr.io/codenamekt/hexus:latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Docker run command will fail — missing HEXUS_DB_PASS and DSN password

  1. docker/entrypoint.sh line 24 uses ${HEXUS_DB_PASS:?hexus database password required} syntax, which causes the script to exit with an error if this variable is unset. The container will fail to start without -e HEXUS_DB_PASS=....
  2. The DSN string omits password=.... Compare with .env.example and docker/compose.yml which both include the password parameter in their DSN strings.

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

```

**Using it with Claude Code / Claude Desktop:**
Expand Down
Loading