AI OCA Bridge Hermes
This module integrates Odoo Discuss with the Hermes AI Agent, allowing users to chat with AI assistants directly within Odoo's messaging interface.
Key Features
- Queue-based message processing with state tracking (pending/processing/done/error)
- Secure webhook authentication via auto-generated tokens
- Auto-detection of DM chats with AI users — no manual channel configuration needed
- Typing indicators while the AI processes responses
- Rate limiting on the poll endpoint to prevent abuse
- Extensible architecture with hooks for escalation, custom handlers, and tool integration
Architecture
The module uses a polling-based design for maximum compatibility: Hermes polls Odoo for pending messages via /hermes/poll, processes them with the AI, and posts responses back via /hermes/webhook/<token>. A standalone gateway script (scripts/hermes_odoo_gateway.py) runs outside Odoo and connects to any number of Odoo instances.
Security & Multi-Tenancy
- Each gateway is scoped to a company (
company_id) with multi-company rules - AI users are regular Odoo users — their permissions apply to all AI actions
- Session keys include a database hash for isolation across instances
Compatibility
- Soft dependency on
ai_tool([18.0] [MIG] ai_tool #69): if installed, Hermes tools are exposed via MCP; if not, a native/hermes/tools/*API is available - Escalation hook (
_action_escalate) for child modules to implement ticket creation, team notification, or inter-Hermes routing
Testing it:
Create the Hermes Gateway
Go to AI Bridge → Hermes → Gateways → Create:
| Field | Value |
|--------------------|------------------------------------------------------|
| Name | Main Hermes |
| AI User | Select or create a user with an AI Bridge configured |
| Mode | Polling (pull) |
| Monitored Channels | Leave empty to monitor all channels |
Save. The Webhook Token is auto-generated — copy it for step 4.
Create the AI User
Go to Settings → Users → Create:
- Name: Hermes
- Login: hermes
- In the AI Bridge tab: select or create an AI Bridge configuration
This user will post AI responses in Discuss.
Run the gateway
python ~/DEV/odoo18/odoo/external-src/ai/ai_oca_bridge_hermes/scripts/hermes_odoo_gateway.py \
--odoo-url http://localhost:8069 \
--webhook-token YOUR_TOKEN_HERE \
--use-agent \
--model <YOUR_MODEL> \
--provider <YOUR_PROVIDER>
ai/ai_oca_bridge_document_page at 18.0 · OCA/ai
ai. Contribute to OCA/ai development by creating an account on GitHub.

Member discussion