Odoo AI technical guide - RAG, embeddings & agents

29. Januar 2026

Odoo 19 marked a significant shift in how AI is integrated into the platform. 

Rather than bolting on AI as an afterthought, Odoo has woven it directly into the core framework fabric with native embeddings, RAG (Retrieval-Augmented Generation) and configurable AI agents. 

But how does it all actually work under the hood? What promises can the technology deliver on? How can we customise and extend it? 

We've dug into the source code and architecture to answer the questions every technical Odoo implementer is asking. 

Learn the mechanics of Odoo 19's AI architecture, what you can customise, and what still remains unknown.

3 core pillars of Odoo’s AI architecture

Odoo 19's AI functionality is built on three core pillars:

  1. Vector database to enable RAG: Embedding-based document retrieval to ground AI responses in your data
  2. AI Agents: Configurable assistants that combine system prompts, topics, tools, and sources
  3. AI tools: Server actions exposed to the LLM for interacting with Odoo data. Conceptually, it is similar to MCP and an all-encompassing way to interact with Odoo data.

Vector-based RAG

RAG (Retrieval-Augmented Generation) is how the AI finds relevant information from your documents before answering a question. 

Instead of reading everything every time, Odoo converts your documents into mathematical patterns (vectors) and stores them. 

When you ask a question, it quickly finds the most relevant sections and includes them in the AI's response. 

This is why the AI can accurately quote your company policies or product specs – it's actually looking them up instead of making guesses.

Odoo AI Agents

An AI Agent in Odoo is like a virtual assistant that lives inside your system. 

You can configure it to answer questions, help with tasks, or provide information based on your company's documents and data. 

Think of it as a ChatGPT that knows your business – it can look up your sales figures, draft emails, or explain your internal policies.

Odoo AI Tools

AI tools are the actions an AI Agent can perform in Odoo. 

When you ask the agent, "Show me my open quotes," it uses a tool to directly search your database and retrieve that information. 

Tools let the AI do things like open records, create leads, or pull reports – rather than just talk about them.

Odoo requires PostgreSQL with the pgvector extension for storing and querying embedding vectors. This is a hard requirement. Without pgvector, the RAG functionality won't work. It is also one of the most important new lower-level requirements of Odoo 19. 

Let’s break down the technical details one feature at a time.

1. The Odoo vector store builds your AI database

RAG (“Retrieval-Augmented Generation”) is a pattern that allows AI to more natively and faster consume your content to augment the answer your generative AI gives. It is sometimes referred to as an “AI database” and is effectively just a vector store inside of PostgreSQL. 

In Odoo 19, the RAG system is centred around the ai.embedding model. This model currently only takes data from the Sources (ai.agent.source), which can be connected to any AI agent (ai.agent).

Currently, there seems to be no limit to how many sources can be attached to an agent. 

Here's what happens when you add a source to an AI agent:

Odoo AI Agent pipeline

  1. Source addition: When you add a Knowledge article, PDF, or other source to an AI agent, it creates an ai.agent source record
  2. Cron trigger: Two scheduled actions kick in. These are AI Agent Sources: Process Sources and AI Embedding: Generate Embeddings
  3. Text extraction: The source content is extracted and chunked into manageable pieces
  4. API call: Each content chunk is sent to the configured LLM provider (OpenAI or Google) to generate embedding vectors using a basic embedding model
  5. Storage: Vectors are stored in the ai.embedding table using pgvector's native vector type

The status field on sources transitions from Processing to Indexed once embeddings are complete. Updates are handled automatically by the cron jobs.

Odoo vector store FAQ

Where do vectors live in Odoo?

Embedding vectors are always stored in the ai.embedding model – never directly on the source records themselves. 

This centralised approach keeps the architecture clean and allows for efficient similarity searches across all indexed content.

Can these vectors be used in other models or datasets?

If you've inspected ir.model.fields for the embedding_vector field, you'll notice its ttype is null. This isn't a bug – it's a consequence of how Odoo implemented pgvector support. 

Odoo introduced a new field type called Vector that interfaces directly with PostgreSQL's pgvector extension. 

However, this new field type was never added to the ttype selection field in ir.model.fields

Whether this was intentional or an oversight remains unclear, but the field works correctly at the database level regardless of the metadata gap.

It does make it more difficult to bring this functionality to other models and datasets, as no mixin is available either.

What data is really getting embedded by Odoo?

When using the new AI features, we always felt that search in products or opportunities worked really well. 

But Odoo is currently not using embeddings for standard Odoo models like leads, products, or contacts. The impressive search capabilities you see with the AI agent come from tools, not embeddings.

So when you ask the AI, "Show me my open opportunities," it's not doing a semantic vector search. It's calling a tool that runs a standard database query. 

As this works really well and is obviously a lot more efficient, more affordable and faster, we expect that Odoo will improve the tools, but not add all data to a RAG. 

Only items in ai.agent.source (Knowledge articles, PDFs, uploaded documents, Link content) currently get to join our RAG.

The way the models are split generally allows Odoo and us to later add more data to our local RAG.

What is the future of AI vector search in Odoo? 

For us, the best candidates to add to the Odoo vector database would be items already close to the Agent sources: 

  • All articles of the knowledge app
  • All documents 

This lets you find duplicates and suggest connected sources, making agents extremely powerful by default.

Though less obvious, we could incorporate models containing extensive text. This would enable full-text search capabilities for:

  • Project tasks: Find similar tickets and write tickets based on the ticket history
  • Helpdesk tickets: Automatically write FAQs in the knowledge app for commonly asked questions, and automatically answer any ticket based on past answers
  • Products: Find well-fitting products for clients based on the description 
  • And any other process that has a lot of text!

Our hope for Odoo 20 is that embedding gets cheaper and pgvector gets faster! 

Truth be told, at much. Consulting, we run our own custom RAG exactly for these kinds of Odoo models.

Our takeaways so far? The use cases this enables are amazing.

2. Odoo AI Agents build responses through a prompt sequence

When a user sends a prompt to an AI agent, Odoo constructs the request in a specific order:

Odoo AI prompt assembly process

1. System prompts

Odoo’s configured system prompts work as the base. The system prompts are deep system instructions for the LLM, and all tool prompts are also added.

2. Agent prompt

The agent's specific prompt is added to the system's prompt.

3. Context injection

Object context: Current date and user details are appended. If used on a record, the record information is also attached.

RAG context: Relevant chunks from the agent's sources are retrieved via embedding similarity search and added to the system message.

4. User message

The user’s input is added.

5. API call

The complete request is sent to the LLM (OpenAI or Google).

6. Tool execution

If the AI decides to call a tool, Odoo executes it and feeds the result back. Odoo allows the LLM to recursively call Odoo AI tools to fulfil the task.

7. Final response

The AI generates its response based on all available context.

This process loop can repeat multiple times if the AI needs to call several tools to gather information before responding.

Interestingly, Odoo gives some limits that can be changed in system parameters: 

  • ai.max_successive_calls (default 20): if not set, it recursively allows up to 20 recursive calls to llm agent if an answer to the user prompt is not found. This consumes a lot of the tokens when observing live workloads. 
  • ai.max_tool_calls_per_call: The LLM is only allowed to call tools 20 times in a single run, to avoid extremely long loading times and database load.

3. AI agents interact with Odoo data through topics and tools

Topics are the bridge between AI agents and your Odoo data. They bundle together the AI Tools (server actions) that the agent can use.

How do AI tools work in Odoo?

Each topic has a many2many field pointing to server actions (AI Tools). These tools allow the AI to:

  • Get details of fields in Odoo models
  • Open various views (form, list, pivot, graph)
  • Create records (leads, tasks, etc.)
  • Search and retrieve data
  • Execute custom business logic.

Crucially, no embeddings are used for this. 

When the AI searches your CRM or retrieves product data, it's calling tools that execute standard database operations. 

This is regular Odoo querying, not semantic search.

Can custom AI tools be created for Odoo?

You can extend agent capabilities by creating new topics and tools:

  1. Create a new server action with your custom logic
  2. Create or select a topic
  3. Link your server action to the topic's AI Tools field
  4. Add the topic to your agent.

This gives you a powerful way to expose any Odoo functionality to your AI agents without modifying core code.

Odoo AI customisation options and limitations

Here's a practical breakdown of customisation options: zero-code adaptations, custom solutions and future hopes.

Easy to adapt without customisation

  • System prompts: Full control over agent personality and instructions
  • Sources: Add any Knowledge articles or documents
  • Topics: Create new topics and link them to agents
  • New simple AI tools: Build simple custom server actions and expose them as AI tools
  • Response style: Configure how the agent communicates.

Possible but requires work

  • Base URL for AI providers: Can be added in via system parameters or settings via customisation
  • New complex AI tools: Can be done by creating server actions and linking them to topics.

Currently limited, but expected in the future 

  • RAG for custom models: Odoo doesn't embed standard models; significant work would be needed to add this
  • Hardcoded endpoints: Individual API endpoints (not just base URL) appear hardcoded; drop-in replacement for self-hosted LLMs is uncertain
  • Chatter action buttons: "Send as message" and "Write as note" buttons appear hardcoded in JavaScript.

Odoo API endpoints - hardcoded or configurable?

This is a common question for organisations wanting to use self-hosted LLMs, using an LLM aggregator or LLM through their cloud provider (AWS Bedrock (AWS), Azure OpenAI, Vertex AI). 

The Odoo reality:

  • The base URL is changeable
  • Individual API endpoints are hardcoded in the code
  • These endpoints are specific to OpenAI and Google's API structures, so they will only work when the endpoints are the same on the alternative service.

This means that while you will be able to point to a different base URL, it's uncertain whether a self-hosted LLM with a different API structure would work as a drop-in replacement. 

You'd need the LLM to implement Odoo-base-compatible endpoints or do a lot of rework. 

We expect that many marketplace or OCA solutions will pop-up bringing more models and custom services to Odoo. 

Practical implications & tips

For implementers

Don't expect semantic search on leads/products: It's tool-based querying, not RAG.

Invest in creating good Knowledge articles: This is the best content to embed into an AI agent, as it is an updatable knowledge source.

Custom tools are your friend: They're the cleanest way to extend agent capabilities.

Test with your actual data: RAG quality depends heavily on source content.

For developers

The Vector field type works: Despite the null ttype, it functions correctly.

pgvector is mandatory: Ensure your PostgreSQL setup includes it.

Server actions are the extension point: Build tools, not core modifications.

JavaScript work is needed for UI changes: Action buttons require frontend work.

The future of AI in Odoo

Odoo 19's AI architecture is a solid foundation, but it's clearly just the beginning. 

We expect future versions to potentially expand RAG capabilities to other models, add more built-in tools, and improve customisation options for AI providers.

For now, the system works well within its designed scope: document-based RAG combined with tool-based Odoo interactions. 

Understanding these mechanics helps set realistic expectations and guides where to invest customisation effort.

Let's discuss your Odoo AI setup 

Our experts are actively working with clients on AI-enhanced Odoo deployments and are happy to tailor our learnings to your needs.

in Odoo
Your Dynamic Snippet will be displayed here... This message is displayed because you did not provided both a filter and a template to use.

Lernen Sie mehr über Odoo: 

Treffen Sie much.! Erfahren Sie mehr über unser Team

Über uns
Sprechen Sie mit unseren Experten
Your Dynamic Snippet will be displayed here... This message is displayed because you did not provided both a filter and a template to use.

Diese Themen könnten Sie ebenfalls interessieren: