repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources15d ago| #1 | #!/bin/bash |
| #2 | # |
| #3 | # Mnemosyne Install Script for Hermes Agent |
| #4 | # Handles the directory mismatch between docs and reality |
| #5 | # |
| #6 | |
| #7 | set -e |
| #8 | |
| #9 | # Colors for output |
| #10 | RED='\033[0;31m' |
| #11 | GREEN='\033[0;32m' |
| #12 | YELLOW='\033[1;33m' |
| #13 | NC='\033[0m' # No Color |
| #14 | |
| #15 | echo "═══════════════════════════════════════════════════════════" |
| #16 | echo " Mnemosyne Installer for Hermes Agent" |
| #17 | echo "═══════════════════════════════════════════════════════════" |
| #18 | echo "" |
| #19 | |
| #20 | # Find Hermes home directory |
| #21 | HERMES_HOME="${HERMES_HOME:-$HOME/.hermes}" |
| #22 | HERMES_VENV="${HERMES_HOME}/hermes-agent" |
| #23 | |
| #24 | # The location Hermes actually looks for memory plugins |
| #25 | HERMES_PLUGIN_DIR="${HERMES_VENV}/plugins/memory" |
| #26 | MNEMOSYNE_LINK="${HERMES_PLUGIN_DIR}/mnemosyne" |
| #27 | |
| #28 | # Current location (where this script is) |
| #29 | MNEMOSYNE_SRC="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" |
| #30 | |
| #31 | echo "📁 Hermes home: ${HERMES_HOME}" |
| #32 | echo "📁 Hermes venv: ${HERMES_VENV}" |
| #33 | echo "📁 Mnemosyne source: ${MNEMOSYNE_SRC}" |
| #34 | echo "📁 Plugin target: ${MNEMOSYNE_LINK}" |
| #35 | echo "" |
| #36 | |
| #37 | # Check if Hermes is installed |
| #38 | if [ ! -d "${HERMES_VENV}" ]; then |
| #39 | echo -e "${RED}❌ Hermes not found at ${HERMES_VENV}${NC}" |
| #40 | echo "" |
| #41 | echo "Please install Hermes first:" |
| #42 | echo " https://github.com/NousResearch/hermes-agent#installation" |
| #43 | exit 1 |
| #44 | fi |
| #45 | |
| #46 | echo -e "${GREEN}✓ Hermes found${NC}" |
| #47 | |
| #48 | # Create the plugins/memory directory if it doesn't exist |
| #49 | mkdir -p "${HERMES_PLUGIN_DIR}" |
| #50 | |
| #51 | # Remove existing symlink or directory if present |
| #52 | if [ -L "${MNEMOSYNE_LINK}" ]; then |
| #53 | echo "🔄 Removing existing symlink..." |
| #54 | rm "${MNEMOSYNE_LINK}" |
| #55 | elif [ -d "${MNEMOSYNE_LINK}" ]; then |
| #56 | echo -e "${YELLOW}⚠️ Existing mnemosyne directory found, backing up...${NC}" |
| #57 | mv "${MNEMOSYNE_LINK}" "${MNEMOSYNE_LINK}.backup.$(date +%s)" |
| #58 | fi |
| #59 | |
| #60 | # Create symlink |
| #61 | echo "🔗 Creating symlink..." |
| #62 | ln -s "${MNEMOSYNE_SRC}" "${MNEMOSYNE_LINK}" |
| #63 | |
| #64 | # Also create the legacy location for backwards compatibility |
| #65 | LEGACY_PLUGIN_DIR="${HERMES_HOME}/plugins" |
| #66 | if [ ! -d "${LEGACY_PLUGIN_DIR}" ]; then |
| #67 | mkdir -p "${LEGACY_PLUGIN_DIR}" |
| #68 | fi |
| #69 | |
| #70 | LEGACY_LINK="${LEGACY_PLUGIN_DIR}/mnemosyne" |
| #71 | if [ -L "${LEGACY_LINK}" ] || [ -d "${LEGACY_LINK}" ]; then |
| #72 | rm -rf "${LEGACY_LINK}" 2>/dev/null || true |
| #73 | fi |
| #74 | ln -s "${MNEMOSYNE_SRC}" "${LEGACY_LINK}" 2>/dev/null || true |
| #75 | |
| #76 | # Install dependencies into Hermes's venv |
| #77 | echo "" |
| #78 | echo "📦 Installing dependencies into Hermes venv..." |
| #79 | |
| #80 | if [ -f "${HERMES_VENV}/bin/activate" ]; then |
| #81 | # Use Hermes's Python |
| #82 | HERMES_PYTHON="${HERMES_VENV}/bin/python" |
| #83 | |
| #84 | # Install mnemosyne package itself |
| #85 | "${HERMES_PYTHON}" -m pip install -e "${MNEMOSYNE_SRC}" --quiet |
| #86 | |
| #87 | # Install fastembed for dense retrieval (optional but recommended) |
| #88 | echo "" |
| #89 | read -p "Install fastembed for dense retrieval? [Y/n] " -n 1 -r |
| #90 | echo |
| #91 | if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then |
| #92 | "${HERMES_PYTHON}" -m pip install fastembed --quiet |
| #93 | echo -e "${GREEN}✓ fastembed installed${NC}" |
| #94 | fi |
| #95 | |
| #96 | # Install sqlite-vec if available |
| #97 | "${HERMES_PYTHON}" -m pip install sqlite-vec --quiet 2>/dev/null || echo -e "${YELLOW}⚠️ sqlite-vec not available, will use bundled version${NC}" |
| #98 | |
| #99 | else |
| #100 | echo -e "${YELLOW}⚠️ Hermes venv not found, installing to system Python...${NC}" |
| #101 | pip install -e "${MNEMOSYNE_SRC}" --quiet |
| #102 | fi |
| #103 | |
| #104 | echo "" |
| #105 | echo "═══════════════════════════════════════════════════════════" |
| #106 | echo -e "${GREEN} ✓ Mnemosyne installed successfully!${NC}" |
| #107 | echo "═══════════════════════════════════════════════════════════" |
| #108 | echo "" |
| #109 | echo "Next steps:" |
| #110 | echo " 1. Set your environment variables (optional):" |
| #111 | echo " export MNEMOSYNE_VEC_TYPE=int8 # 4x compression" |
| #112 | echo " export MNEMOSYNE_LOG_TOOLS=1 # Auto-log tool calls" |
| #113 | echo "" |
| #114 | echo " 2. Restart Hermes gateway:" |
| #115 | echo " hermes gateway restart" |
| #116 | echo "" |
| #117 | echo " 3. Verify installation:" |
| #118 | echo " hermes tools list | grep mnemosyne" |
| #119 | echo "" |
| #120 | echo "For help: https://github.com/AxDSan/mnemosyne/issues" |
| #121 | echo "" |
| #122 |