Skip to Content

AI Agent Orchestration in Odoo - Sub-Agent Delegation via MCP

How Odoo MCP Studio now piggybacks Odoo 19's native AI agent infrastructure to orchestrate sub-agent tool calls with RAG support
10 March 2026 by
AI Agent Orchestration in Odoo - Sub-Agent Delegation via MCP
Codemarchant
| No comments yet

The Gap

This last weekend i was thinking about what could be missing from Odoo MCP Studio. The tools are solid —CRUD, code execution, dashboards, web apps, module builder, code search. But one gap kept nagging me: unstructured data.

If someone asks "What's our remote work policy for employees outside the EU?" — none of my existing tools can answer that well.

That's not structured data sitting in a model field. It's buried in policy documents, PDFs, internal wikis. You need RAG (Retrieval-Augmented Generation) to handle that - semantic search over indexed documents.

I started thinking about building my own RAG implementation. Then I stopped myself.

Odoo 19 Already Did It

Odoo 19 Enterprise ships with a native AI module. It's actually quite capable:

- Configure multiple AI agents, each with their own system prompt
- Support for different LLM providers (ChatGPT, Gemini, etc.)
- Built-in RAG with semantic vector search over indexed document sources
- Server actions as callable tools via "Topics"

It's a full AI agent infrastructure, sitting right there in the enterprise edition.

So instead of reinventing the wheel, I asked a better question: what if I just piggyback the whole thing?

The ai_agent_query Tool

The new ai_agent_query tool lets your MCP client (Claude, n8n, whatever) delegate prompts to Odoo's native AI agents as sub-agent calls.

Here's what that looks like in practice:

You ask Claude: "What is our company's remote work policy for employees outside the EU?"

What happens under the hood:
1. Claude recognises this needs domain-specific knowledge it doesn't have
2. It makes an ai_agent_query tool call, delegating to your "HR Policy Assistant" agent configured in Odoo
3. That Odoo agent accepts the prompt, runs semantic search over its indexed HR policy documents
4. Relevant document chunks come back, the Odoo agent formulates a response
5. The response flows back to Claude, who presents it to you

Your main AI agent is orchestrating Odoo's AI agents as sub-agents. Full circle.

How It Works

Configuration is straightforward. In the MCP Studio settings, there's a new AI Agents tab:

1. Install Odoo's ai module (Enterprise)
2. Set up an AI Agent in Odoo with your preferred LLM provider
3. Optionally configure RAG sources — index your HR docs, legal contracts, whatever
4. Optionally add server action tools via Topics
5. Add the agent to MCP Studio config with its record ID and a usage description

The usage description is key — it tells your MCP client when to delegate. Write something like: "Use this agent for questions about HR policies, employee benefits, and workplace regulations. This agent has access  to indexed HR policy documents that are not available through standard Odoo data toos."

The tool dynamically builds its description based on which agents you've configured, so Claude knows exactly what sub-agents are available and what each one specialises in. If no agents are configured, the tool doesn't even show up - clean and graceful.

The Context Message

One nice touch: the tool accepts an optional context_message parameter. This lets your main agent inject extra context into the sub-agents's system prompt - results from prior tool calls, conversation history, domain-specific instructions. It makes the delegation smarter because the sub-agent isn't working blind.

Access Control

Same philosophy as the rest of the module — granular control. Each configured agent has a user allowlist. Leave it empty and all MCP users can access it. Add specific users and only they get that agent in their tool list. Admin-only configuration, user-level filtering at runtime.

Why This Matters

Before this, if you wanted RAG capabilities through MCP, you'd need to build and host your own vector search infrastructure.

Now you configure it in Odoo's UI, point MCP Studio at it, and you're done.

But it's not just about RAG. Odoo's AI agents can have their own tools via server actions. You could have a "Finance Agent" that not only searches indexed financial documents but also runs speicfic Odoo automations. Your main AI agent orchestrates all of this through a single tool call.

It's sub-agent orchestration. Your MCP client becomes the conductor, Odoo's AI agents become the orchestra.

What Could You Build?

- HR chatbot — "What's our parental leave policy?" → sub-agent queries indexed employee handbook
- Legal review — "Summarise the key obligations in our vendor contract with Acme Corp" → sub-agent searches indexed legal documents
- Technical support — "How do I configure the inventory valuation method?" → sub-agent with indexed Odoo documentation and product manuals.
- Multi-provider reasoning — Your main agent runs on Claude, but your Odoo sub-agent runs on Gemini. Different models for different tasks, orchestrated seamlessly.

The Bigger Picture

With this addition, Odoo MCP Studio now covers:

- Structured data — CRUD tools, execute_orm
- Unstructured data — AI agent delegation with RAG
- Code — Search and read tools
- Visualisation — ECharts dashboards
- Applications — React web app builder
- Automation — Sub-agent orchestration across providers

It's becoming quite the powerhouse. I've had some real traction on the Odoo Apps Store the past few weeks — let's go! 🚀

Try It

The AI Agent feature requires Odoo 19 Enterprise with the ai module installed. Configure your agents in Odoo, point MCP Studio at them, and start orchestrating.

- Get the module: https://apps.odoo.com/apps/modules/19.0/odoo_remote_mcp

Sign in to leave a comment