Configure Odoo AI

Set up AI providers, create role-based AI Agents, and attach knowledge sources for a solid AI foundation.

This page combines the full Odoo AI setup foundation: provider API keys, AI Agents, Topics, Default Prompts, and RAG knowledge sources.

A correct initial setup prevents common issues such as Ask AI not responding, agents answering without context, or sources failing to index. After this foundation, continue with AI Agents and knowledge sources for deeper work on system prompts, topics, and sources.

You can start with OpenAI or Google Gemini, then build agents for clear business roles such as sales, support, or internal knowledge assistance. Once setup is complete, read daily AI usage to roll AI into real operations.

OpenAI
Google Gemini
AI Agent
RAG
Topics
Default Prompts

Before you start

Key points

  • • Make sure you have system administrator access or permission to edit settings.

  • • Choose the provider that fits your needs: OpenAI for GPT-4o or GPT-4.1 Mini; Google for Gemini 2.5 Pro or Gemini 2.5 Flash.

  • • Prepare a valid API key and store it securely before entering it into Odoo.

  • • Decide which AI roles you want to deploy, such as Sales Assistant, Support Agent, or Internal Knowledge Assistant.


Configure AI providers

To use AI in Odoo, the system needs at least one valid API key from OpenAI or Google Gemini. API keys are stored as password fields and only system administrators can view or edit them.

Steps

  • 1. Go to Settings → General Settings.

  • 2. Find the AI or Providers section.

  • 3. Enable Use your own ChatGPT account for OpenAI, or Use your own Google Gemini account for Google.

  • 4. Enter the matching API key.

  • 5. Click Save.

  • 6. Test an AI feature such as Ask AI to confirm the configuration works.

Core configuration fields

FieldDescription
OpenAI API KeyAuthentication key for OpenAI models such as GPT-4o, GPT-4.1, and GPT-4.1 Mini.
Use your own ChatGPT accountEnable this option when using your own OpenAI account.
Google API KeyAuthentication key for Gemini models such as Gemini 2.5 Pro or Gemini 2.5 Flash.
Use your own Google Gemini accountEnable this option when using your own Google Gemini account.

How to obtain an API key

Key points

  • • OpenAI: go to platform.openai.com/api-keys, create a new secret key, and copy it immediately because it is shown only once.

  • • Google: go to console.cloud.google.com, enable the Generative Language API, then create an API key in Credentials.

  • • Never share API keys through email or chat, and never store them directly in source code.

  • • Rotate keys regularly and revoke old ones if exposure is suspected.


Create a new AI Agent

An AI Agent defines the role, tone, knowledge boundaries, and model used for responses. Each agent should focus on a clear business responsibility so quality is easier to control.

Steps

  • 1. Go to AI → Agents → Agents.

  • 2. Click New.

  • 3. Fill in the name, subtitle, and LLM model.

  • 4. Choose the response style.

  • 5. Write the System Prompt to define role and behavior.

  • 6. Enable Restrict to Sources if responses must stay within attached knowledge sources.

  • 7. Click Save.

Key AI Agent fields

FieldDescription
NameVisible agent name such as Sales Assistant or Support Agent.
SubtitleShort description so users quickly understand the purpose.
System PromptCore instruction defining the role, scope, and response behavior.
Response StyleResponse style such as Analytical, Balanced, or Creative.
LLM ModelAI model used to generate responses.
Restrict to SourcesRestrict answers to the knowledge sources attached to the agent.
TopicsAdditional topics that provide reusable instructions and tools.

Write effective System Prompts

A good System Prompt is concise, clearly defines the role, states limits, and sets response priorities. Avoid overly long prompts or combining too many roles into one agent.

Example: “You are a professional sales assistant. Recommend suitable products, keep a polite tone, and explicitly say when available data is insufficient.”


Test the AI Agent

Steps

  • 1. Open the agent you created.

  • 2. Click Test to open a trial chat.

  • 3. Ask realistic sample questions.

  • 4. Evaluate accuracy, tone, and usefulness.

  • 5. Adjust the System Prompt, Response Style, or knowledge sources if needed.


Create Topics for reusable logic

Topics group reusable instructions, business context, and allowed AI tools so multiple agents can share the same logic. This keeps configuration more consistent when you operate many agents.

Steps

  • 1. Go to AI → Agents → Topics.

  • 2. Click New.

  • 3. Fill in Name, Description, and Instructions.

  • 4. Select Tools if the topic should allow specific AI tools.

  • 5. Save the topic, then return to the agent and assign it in Topics.

Key Topic fields

FieldDescription
NameTopic name such as Customer Service, Sales Support, or Internal Help.
DescriptionShort summary of what the topic is for.
InstructionsDetailed instructions applied when the topic is used.
ToolsList of AI tools allowed for that topic.

Add RAG knowledge sources from files or URLs

Knowledge sources allow AI Agents to reference internal materials instead of relying only on general model knowledge. You can attach files or public URLs so the system indexes them for retrieval.

Steps

  • 1. Open the AI Agent and go to the Sources tab.

  • 2. Click Add a line.

  • 3. Choose Binary for uploaded files or URL for web links.

  • 4. Save so indexing can start.

  • 5. Monitor source status and resolve any errors if they appear.

Knowledge source statuses

FieldDescription
ProcessingThe source is currently being processed and indexed.
IndexedThe source is ready for the agent to reference.
FailedThe source failed and needs review of the file, URL, or a retry.
Retry / ReprocessOptions to retry or re-index the source when needed.

Common source formats

FieldDescription
PDFSuitable for process documents, guides, and internal policies.
ImagesPNG, JPG, JPEG, WEBP, or GIF; the system can extract text from images.
SpreadsheetsExcel, CSV, or ODS files for tabular data.
TextTXT or Markdown; usually the most stable and easiest to process.
URLUsed for public web pages that should become part of the agent knowledge base.

Manage knowledge sources effectively

Key points

  • • Only attach relevant and up-to-date documents aligned with the agent role.

  • • Split long documents into smaller sections with clear headings for better retrieval.

  • • Review source status after every new upload or update.

  • • Do not attach sensitive materials unless access is properly controlled.


Configure Default Prompts

Default Prompts let the system automatically call the right agent for contexts such as email, chat, or a specific business model. This is the main mechanism for standardizing AI behavior across the organization.

Steps

  • 1. Go to AI → Configuration → Default Prompts.

  • 2. Create a new rule.

  • 3. Choose the trigger context such as mail composer or a specific model.

  • 4. Select the agent to call.

  • 5. Enter an additional Default Prompt and optional quick buttons.

  • 6. Save and test in the target interface.


Common setup issues

Key points

  • • Invalid API key: check whether the key was revoked, expired, or copied incompletely.

  • • API not responding: confirm the provider account has credits or required APIs enabled.

  • • Agent answers too generically: improve the System Prompt or attach more relevant knowledge sources.

  • • Source not indexing: verify file format, size, or whether the URL is publicly reachable.

  • • AI configuration menu missing: the current user may not have system administration rights.