| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
AI (ai_app)
• Discuss (mail) |
| Lines of code | 1003 |
| Technical Name |
ai_agent_field_rag |
| License | OPL-1 |
| Website | https://codemarchant.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
AI (ai_app)
• Discuss (mail) |
| Lines of code | 1003 |
| Technical Name |
ai_agent_field_rag |
| License | OPL-1 |
| Website | https://codemarchant.com |
AI Agent - Field RAG Sources
Turn Any Odoo Model Field Into AI Agent Knowledge
Overview
Seamlessly extends Odoo 19's built-in AI Agent with a new source type for Retrieval-Augmented Generation (RAG) powered by your own business data.
This module integrates directly into Odoo 19's native AI Agent framework, adding a new "Model Field" source option alongside the existing URL and file upload sources. Select any model's text, char, or HTML fields and automatically index them as AI agent sources — no external tools or complex setup required.
Whether it's project task descriptions, helpdesk ticket content, CRM notes, or any custom model data — transform your Odoo records into a searchable knowledge base that your AI agents can query naturally.
Each record becomes its own source with a structured semantic header including record type, ID, name, and configurable context fields. This enables powerful queries like "tasks assigned to John", "high priority tickets", or "project Alpha notes".
How It Works
Add Model Field Source
From your AI Agent, click "Add a Source" and select "Model Field"
Configure Source
Select model, content field, optional context fields, and filter domain
Automatic Indexing
One source per record is created and indexed for vector search
Query with AI
Ask your AI agent questions — it retrieves relevant records automatically
Seamless Integration with AI Agent
A new "Model Field" option appears in the Add Source wizard
The "Add a Source" wizard with new Model Field option
Intuitive Configuration Dialog
Select your model, content field, filter domain, and context fields in one place
Configuration dialog: Name, Model, Content Field, Filter Domain, and Context Fields
Source Configuration
- Name: Descriptive name for this configuration
- Model: Any Odoo model (Task, Lead, Ticket, etc.)
- Content Field: Text, Char, or HTML field to index
- Filter Domain: Optional filter to select specific records
Context Fields
- Add fields like stage, assignee, priority, dates
- Context is prepended to main content in each source
- Enables queries like "tasks assigned to John"
- Record ID and name are automatically included
Smart Record Count Guidance
Real-time feedback helps you create focused, effective RAG datasets
Under 100 Records
Ideal for focused, high-quality retrieval
100-500 Records
Consider adding filters for better relevance
Over 500 Records
Large datasets may reduce retrieval accuracy
One Source Per Record
Each matching record becomes its own indexed source for semantic isolation
Sources list: 22 records from the configuration, showing indexed and failed statuses
Why One Source Per Record?
- Semantic Isolation: Each record is embedded separately for precise matching
- Granular Updates: When a record changes, only that source is re-indexed
- Source Attribution: AI responses cite specific records, not bulk content
- Failed Status: Records without content in the selected field are marked as failed
Structured Content for Optimal Search
Each source includes a semantic header with record metadata and context fields
Source attachment: Record Type, ID, Name, Context Fields, then Main Content
Automatic Header
- Record Type: Model display name (e.g., "Task")
- Record ID: Database ID for precise lookups
- Name: Record's display_name
Context Fields
- Your selected fields (stage, assignee, priority, etc.)
- Many2one fields show display_name
- Dates, numbers, and booleans are formatted as text
Natural Language Queries with RAG
Ask questions and get answers grounded in your Odoo data
AI Agent responding to a question with information from indexed sources
Clicking a source citation opens the indexed attachment content
"What are the layout plans for the office design project?"
"Show me tasks assigned to John in the new website project"
"What are the high priority tickets about billing?"
"Summarize the CRM notes for customer ACME Corp"
"What was discussed in ticket #1234?"
"Find tasks related to database migration"
Full Configuration Management
View and manage your Field RAG configurations from a dedicated form view
Configuration form: Sync button, statistics, context fields, domain filter, and sources list
Manual Sync
- Sync Now: Immediately detect and sync changes
- Creates sources for new matching records
- Removes sources for records no longer in domain
- Re-indexes sources with changed content
Statistics
- Matching Records: Current domain match count
- Created Sources: Total sources from this config
- Indexed Sources: Successfully embedded sources
- Last Sync: When sync last ran
Automatic Synchronization
Keep your AI knowledge base up-to-date with scheduled sync
Scheduled Action: "AI Field RAG: Auto Sync Sources" runs hourly by default
Auto Sync Features
- Runs hourly by default (configurable)
- Detects new records matching domain
- Removes sources for deleted/excluded records
- Re-indexes sources when content changes
- Toggle per-configuration via "Auto Sync" setting
- Triggered by AI Field RAG: Auto Sync Sources
Key Features
Any Model, Any Field
Select from any Odoo model with text, char, or HTML fields. Project tasks, helpdesk tickets, CRM leads, custom models — all supported.
Domain Filtering
Use Odoo domain syntax to select exactly which records to index. Filter by project, stage, date, assignee, or any field.
Context Fields
Enrich sources with metadata like stage, assignee, priority, or dates. Enables queries like "tasks assigned to John" or "urgent tickets".
Automatic Sync
Hourly scheduled action detects new, changed, and removed records. Keep your AI knowledge base current without manual intervention.
Per-Record Sources
Each record becomes its own indexed source for semantic isolation. AI responses cite specific records, not bulk content.
HTML Extraction
HTML fields are automatically processed to extract clean text content. Works with rich text editors, email content, and formatted descriptions.
Use Cases
Project Task Descriptions
Index task descriptions from specific projects. Ask your AI agent about task details, progress, or blockers mentioned in descriptions.
Helpdesk Knowledge Base
Turn resolved ticket content into searchable knowledge. AI agents can find solutions from past tickets matching new issues.
CRM Lead Notes
Index internal notes and communications on CRM leads. Query customer history, preferences, and past interactions.
Sale Order Notes
Make sale order notes and terms searchable. Find specific customer requirements or special instructions.
Documentation & Wiki
Index knowledge base articles, wiki pages, or documentation records. Create an AI-powered documentation assistant.
Custom Models
Works with any custom model that has text fields. Turn proprietary business data into AI-searchable knowledge.
Optimized for Semantic Search
Structured headers enable powerful, natural language queries
Query by Record Type
"Find project tasks about..." matches Record Type: Task
Query by Record ID
"What is task 123?" matches Record ID: 123
Query by Name
"Details on 'Website Redesign'" matches the record name
Query by Assignee
"Tasks assigned to John" (if user_id is context field)
Query by Priority
"High priority tickets" (if priority is context field)
Query by Stage
"Tasks in Done stage" (if stage_id is context field)
Technical Details
Extends ai.agent.source
New source type 'field_rag' with dedicated processing logic
Hourly Scheduled Action
Cron job syncs all configurations with auto_sync enabled
HTMLExtractor
Uses Odoo's built-in HTMLExtractor for clean text extraction
Efficient Updates
Write date tracking skips unchanged records during sync
Requirements
Dependencies
- base — Odoo core
- ai — Odoo AI module
- ai_app — Odoo AI App module
Compatibility
- Odoo 19 Community & Enterprise
- Requires Odoo AI modules (ai, ai_app)
Support
We're here to help you get the most from your AI-powered Odoo.
Email Support
support@codemarchant.com
Website
codemarchant.com
Transform Your Odoo Data Into AI Knowledge
Install the AI Agent Field RAG module and give your AI agents access to your business data.
AI Agent - Field RAG Sources
This module extends Odoo 19's AI Agent with a new source type that allows indexing content from any model's text, char, or HTML fields for RAG (Retrieval-Augmented Generation).
Features
- Add model field content as AI agent sources
- Support for text, char, and HTML fields
- Domain filtering to select specific records
- Context fields for enriched semantic search
- Automatic sync via scheduled action
- Per-record source creation for semantic isolation
Dependencies
- base
- ai
- ai_app
Changelog
Version 19.0.1.0.0
- Initial release
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module