45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
# Multi-Profile Web Tool Configuration
|
|
|
|
When the main profile has API keys (Firecrawl, ScrapingAnt, SearXNG) and a secondary profile (Anita, Tony) needs access to web tools, the keys and config must be duplicated into the secondary profile.
|
|
|
|
## Files to create/update in secondary profile
|
|
|
|
**`.env`** (at `~/.hermes/profiles/<name>/.env`):
|
|
```
|
|
FIRECRAWL_API_KEY=fc-...
|
|
SCRAPINGANT_API_KEY=...
|
|
SEARXNG_BASE_URL=http://127.0.0.1:8888
|
|
```
|
|
|
|
**`config.yaml`** — add under the main config:
|
|
```yaml
|
|
# ── Web Tools ────────────────────────────────────────────────────────
|
|
web:
|
|
backend: firecrawl
|
|
use_gateway: true
|
|
```
|
|
|
|
**Enable the toolset:**
|
|
```bash
|
|
hermes tools enable web --profile <name>
|
|
```
|
|
|
|
## Restart required
|
|
|
|
The gateway must be restarted to pick up new config and env vars. Since you can't restart from within the gateway itself:
|
|
|
|
1. **Create a one-shot cron** that kills the old PID and starts a new one
|
|
2. Or SSH directly from outside (manual for now)
|
|
|
|
Helper script pattern (`restart-<profile>-gateway.sh`):
|
|
```bash
|
|
PID_FILE="$HOME/.hermes/profiles/<name>/gateway.pid"
|
|
OLD_PID=$(python3 -c "import json; print(json.load(open('$PID_FILE'))['pid'])" 2>/dev/null)
|
|
kill $OLD_PID; sleep 3
|
|
nohup /usr/local/lib/hermes-agent/venv/bin/python -m hermes_cli.main --profile <name> gateway run > /dev/null 2>&1 &
|
|
```
|
|
|
|
## Testing
|
|
|
|
After restart, the profile's user should send a `/reset` in their Telegram session to see the new tools.
|