Customer Memory
Connect Memory
External AI memory (Hindsight, Cognee).
External AI memory for Odoo, provider-neutral by construction. Odoo never talks to the memory engine: it writes engine-neutral domain events into an outbox table and questions into an inbox table, and a separate per-engine gateway pulls, projects and answers. Capture is a cheap insert, so remembering something can never slow down or break the business operation that caused it — and if no gateway is running, events queue up until one starts.
This base module owns the contract and the partner layer: the connect.memory.outbox and connect.memory.inbox models, the capture mixin, the pull/ack/answer HTTP endpoints, the sensitivity policy and settings, plus customer correspondence capture and the Customer summary operation. A reference gateway for the Hindsight engine ships alongside it in deploy/, as a separate process outside the Odoo loader.
Domain modules build on the same pipeline rather than inventing their own: connect_memory_sale adds sale, invoice and payment capture and an hourly payment-behavior digest, all through the mixin and the same outbox.
What it offers
-
Odoo emits events, never calls out
Capture writes an engine-neutral JSONB row into
connect.memory.outboxand stops there. An external gateway pulls pending events over HTTP, acknowledges them, and writes answers back intoconnect.memory.inbox— so a slow or dead memory engine can never stall the operation that produced the event. -
One contract, any engine
Four token-protected JSON-RPC routes are the whole integration surface:
/connect_memory/outbox/fetch,/outbox/ack,/inbox/fetchand/inbox/answer. The event envelope is engine-neutral, so swapping Hindsight for Cognee changes the gateway, not the Odoo data. -
Reference Hindsight gateway included
connect_memory/deploy/ships the gateway itself —hindsight_gateway.py, a Dockerfile, a Compose file and an.envtemplate. It projects outbox events into one memory bank per commercial partner and resolves inbox questions through reflect. -
Customer correspondence captured automatically
Emails and chatter messages exchanged with a customer are captured from
mail.messageonres.partneras they happen. Internal notes between colleagues and system messages are deliberately skipped — only real correspondence with an external contact is remembered. -
Customer summary on demand
The Customer summary button on a partner queues a question for the memory engine; the readable answer arrives asynchronously as an entry under Connect → Memory → Inbox. A Memory smart button on the same form counts everything remembered about that customer and opens the event list.
-
Resumable backfill of past history
Load correspondence to memory queues one customer's older emails and chatter, and is idempotent — a second click reports zero new. For the whole database, a wizard takes a date range, previews the candidate count and starts a resumable background job that a cron drains in batches, tracked under Connect → Memory → Backfill.
-
De-duplication and payload retention
Every event carries a
dedup_keyand acontent_hashso replays collapse instead of duplicating facts. A daily cron strips the bulky payload from sent rows older than the configured retention window, leaving a thin tombstone that keeps de-duplication working; set the retention to0to keep payloads forever.
Scope of the current version
- You must run the external memory engine and its gateway yourself. With nothing pulling the outbox, events simply accumulate as
pending— nothing is lost, but nothing is answered either. - Nothing is captured until the Enable memory capture master switch is on; every capture path checks it first.
- The gateway's
ODOO_TOKENmust match the Memory service token in Odoo. On a mismatch/connect_memory/outbox/fetchreturns an empty list silently rather than an authentication error. - Answers are asynchronous by design. A Customer summary appears in the Inbox when the engine responds, not on the partner form as you click.
- Events need a
commercial_partner_idin their scope — without one the gateway has no bank to file the fact in and rejects it. - Engine credentials are never stored in Odoo. The Hindsight key lives only in the gateway's environment, so key rotation is a gateway operation.
- The Memory configuration and Settings menus require Administration / Settings rights (
base.group_system); Connect Users can read outbox events and create inbox questions only.
Installs with full features free for 30 days; buy the license inside the module.