How to connect ClawSide🦞 to LLM/Agent🤖️
OpenClaw
OpenClaw’s Gateway can serve a small OpenAI-compatible Chat Completions endpoint.This endpoint is disabled by default.
- Stop openclaw gateway
openclaw gateway stop- To enable it, you maybe edit
~/.openclaw/openclaw.jsonto enablegateway.http.endpoints.chatCompletions.enabledastrue.
{
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"auth": {
"mode": "token",
"token": "${YOUR_GATEWAY_AUTH_TOKEN}"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
}
}- Rerun openclaw gateway
openclaw gateway startReference:
Ollama
No authentication is required when accessing Ollama’s API locally via http://localhost:11434. Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default. Additional origins can be configured with OLLAMA_ORIGINS.
For browser extensions, you’ll need to explicitly allow the extension’s origin pattern. Set OLLAMA_ORIGINS to include chrome-extension://, moz-extension://, and safari-web-extension://* if you wish to allow all browser extensions access, or specific extensions as needed:
# Allow all Chrome, Firefox, and Safari extensions
OLLAMA_ORIGINS=chrome-extension://*,moz-extension://*,safari-web-extension://* ollama serveor solve this problem more thoroughly
# Allow all origins
OLLAMA_ORIGINS=* ollama serveReference:
- https://docs.ollama.com/api/authentication
- https://docs.ollama.com/faq#how-can-i-allow-additional-web-origins-to-access-ollama
Hermes-Agent
Enable hermes api server and allow chrome extension visiting are as follows:
- Stop hermes gateway
hermes gateway stop- Edit
~/.hermes/.envfile and append these following lines behind.
# Enable Hermes HTTP Gateway
API_SERVER_ENABLED=true
# Set Gateway auth token
API_SERVER_KEY=123456
# Allow chrome extension visiting
GATEWAY_ALLOW_ALL_USERS=true- Rerun hermes gateway
hermes gateway startReference: