Demonstration of @llm_tool decorator usage.
Learn how to create custom AI tools with practical examples
Your guide to creating custom AI tools for Odoo
This module demonstrates how to create LLM tools using the @llm_tool decorator. It provides 6 example tools showing different decorator patterns and best practices for tool development. Use this as a reference when creating your own AI tools for Odoo.
6 example tools demonstrating different patterns
Simple read-only tool example showing basic decorator usage.
Utility tool with type hints for automatic schema generation.
Business logic tool showing CRM integration patterns.
Complex reporting tool demonstrating Sales module integration.
Manual schema example for integrating with legacy code.
User interaction tool showing Mail integration for notifications.
Best practices demonstrated in these examples
Read-only, destructive, and idempotent tool patterns for safe AI operations.
Use Python type hints for automatic schema generation and validation.
Integration with CRM, Sales, and Mail modules for real-world use cases.
Requirements and dependencies
llm_tool, crm, sale, mail
Productivity/LLM
Developer reference
LGPL-3
Install this module, explore the code in the models directory, and use the patterns in your own modules.
Explore other modules in the Odoo LLM suite