How jineshprajapat/odoo_ai_agent works
This repository is an Odoo ERP AI agent with a FastAPI interface. Its main workflow takes a user request through model discovery, registry context selection, plan generation and validation, Odoo execution, and response generation; unresolved or invalid requests can instead produce clarification. Authentication and user sessions form a separate supporting capability. The sampled workflow source establishes its internal calls, but chat-route wiring, registry internals, and the Odoo transport implementation were not sampled, so those connections are left unspecified.
Main entry points: engine.py Workflow engine · auth/service.py Auth service · auth.py Auth API · odoo/service.py Odoo execution
Components 20
AI workflow
- Workflow engine
app/workflow/engine.py - Model discovery
app/agents/model_resolver_agent.py - Action planner
app/agents/planner_agent.py - Plan validator
app/workflow/validator.py - Clarification
app/workflow/clarification.py - Response generation
app/agents/response_agent.py
Odoo integration
- Registry context
app/odoo/registry/registry_slice.py - Odoo execution
app/odoo/service.py - Odoo CRUD
app/odoo/crud.py
Identity and state
- Auth service
app/modules/auth/service.py - User repository
app/crud/user.py - Session repository
app/crud/user_session.py - Token security
app/modules/auth/security.py - JWT tokens
app/modules/auth/jwt.py - SQL database
app/core/database.py
Other components
- User
- Odoo ERP
- OpenAI
Connections 17
- User → Chat API: sends request
- Workflow engine → Model discovery: discovers models
- Workflow engine → Registry context: builds context
- Workflow engine → Action planner: plans action
- Workflow engine → Plan validator: validates plan
- Workflow engine → Clarification: requests clarification
- Workflow engine → Odoo execution: executes plan
- Workflow engine → Response generation: generates response
- Odoo execution → Odoo CRUD: performs operations
- Odoo CRUD → Odoo ERP
- User → Auth API: submits credentials
- Auth API → Auth service: handles auth
- Auth service → User repository: looks up or creates user
- Auth service → Session repository: stores refresh session
- Auth service → Token security: hashes and verifies
- Auth service → JWT tokens: issues tokens
- Session repository → SQL database: persists session