docs: expand external API configuration section for OpenClaw (#294)

- Add plugin configuration example with hindsightApiUrl and hindsightApiToken
- Document behavior differences when using external API mode
- Add verification steps and log messages to expect
- Explain use cases (shared memory, production, team environments)
This commit is contained in:
Anton Evseev 2026-02-04 20:23:30 +10:00 committed by GitHub
parent 6b346925e2
commit d02affd8f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -125,16 +125,70 @@ export HINDSIGHT_API_LLM_BASE_URL=https://openrouter.ai/api/v1
### External API (Advanced)
To use an existing Hindsight API server instead of the local daemon:
Connect to a remote Hindsight API server instead of running a local daemon. This is useful for:
- **Shared memory** across multiple OpenClaw instances
- **Production deployments** with centralized memory storage
- **Team environments** where agents share knowledge
#### Plugin Configuration
Configure in `~/.openclaw/openclaw.json`:
```json
{
"plugins": {
"entries": {
"hindsight-openclaw": {
"enabled": true,
"config": {
"hindsightApiUrl": "https://your-hindsight-server.com",
"hindsightApiToken": "your-api-token"
}
}
}
}
}
```
**Options:**
- `hindsightApiUrl` - Full URL to external Hindsight API (e.g., `https://mcp.hindsight.example.com`)
- `hindsightApiToken` - API token for authentication (optional, only if API requires auth)
#### Environment Variables (Alternative)
You can also configure via environment variables:
```bash
export HINDSIGHT_EMBED_API_URL=http://your-server:8000
export HINDSIGHT_EMBED_API_TOKEN=your-api-token # Optional, if API requires auth
export HINDSIGHT_EMBED_API_URL=https://your-hindsight-server.com
export HINDSIGHT_EMBED_API_TOKEN=your-api-token # Optional
openclaw gateway
```
Useful for shared memory across multiple OpenClaw instances or production deployments.
**Note:** Plugin config takes precedence over environment variables.
#### Behavior
When external API mode is enabled:
- **No local daemon** is started (no hindsight-embed process)
- **Health check** runs on startup to verify API connectivity
- **All memory operations** (retain, recall, reflect) go to the external API
- **Faster startup** since no local PostgreSQL or embedding models are needed
#### Verification
Check OpenClaw logs for external API mode:
```bash
tail -f /tmp/openclaw/openclaw-*.log | grep Hindsight
# Should see on startup:
# [Hindsight] External API mode enabled: https://your-hindsight-server.com
# [Hindsight] External API health check passed
```
If you see daemon startup messages instead, verify your configuration is correct.
## Inspecting Memories