Module AI Suite

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search

AI Suite integrates an AI assistant panel directly into Dolibarr ERP, offering context-aware help with a sleek, slide-in interface and real-time streaming responses. Your ERP database data is never sent to AI providers — the AI simply interprets your natural language requests, and Dolibarr handles all actual data operations internally.

Features

  • Collapsible AI Panel — A sleek, slide-in panel that overlays your Dolibarr interface without interrupting your workflow.
  • Context Awareness — The AI understands which page you are on and provides relevant, context-sensitive assistance.
  • Multiple AI Providers & Models — Choose from OpenAI, Anthropic Claude, or Google Gemini; switch between providers and models at any time.
  • Assistant Templates — Admin-defined templates (e.g. General Inquiry, Form Filling, Search) each with their own model, system prompt, rate limit, and access control settings.
  • Structured AI Actions — The AI can trigger automated form-filling or record search/view actions via structured JSON responses.
  • Real-time Streaming — Responses stream in real time so you see output as it is generated.
  • Rate Limiting — Built-in protection against API abuse, configurable per template.

Specialized AI Assistants

AI Suite ships with three built-in specialized assistants:

Search Assistant
Find records in your ERP using natural language queries instead of manual filter forms.
Form Filling Assistant
Fill out Dolibarr forms quickly using plain language — describe what you want and the AI populates the fields for you.
General Inquiry Assistant
Your built-in Dolibarr expert. Ask any question about how to use Dolibarr ERP and get guided step-by-step.

Requirements

Requirement Details
Dolibarr Version 17.0 or higher
PHP Version 7.4 or higher
PHP Extensions cURL must be enabled
AI API Key Valid key from at least one provider (OpenAI, Anthropic, or Google Gemini)
Internet Required for API access to the chosen provider

Installation

Method 1: Manual Installation

  1. Copy the aisuite module folder to your Dolibarr custom directory:
    /path/to/dolibarr/htdocs/custom/
  2. Log in to Dolibarr as an administrator.
  3. Navigate to: HomeSetupModules
  4. Find AI Suite in the module list.
  5. Click Activate.

Method 2: Using the Module Manager

  1. Package the aisuite folder as a ZIP file.
  2. Log in to Dolibarr as an administrator.
  3. Navigate to: HomeSetupModules
  4. Click Deploy/install external app/module.
  5. Upload the ZIP file and activate the module.

Configuration

1. AI Provider & API Key

  1. Navigate to: HomeSetupModulesAI SuiteSettings
  2. Select your AI Provider: OpenAI, Anthropic, or Google Gemini.
  3. Enter the API key for your chosen provider:
  4. Click Modify to save.
  5. Click Test Connection to verify the key works.

2. Assistant Templates

  1. Navigate to: HomeSetupModulesAI SuiteTemplates
  2. Create or edit templates (built-in: General Inquiry, Form Filling Assistant, Search Assistant).
  3. Configure each template's model, system prompt, rate limit, and allowed users/groups.
  4. Set one template as the default; users will see a template selector in the AI panel.

3. User Permissions

  1. Navigate to: HomeSetupUsers & Groups
  2. Edit a user or group and go to the Permissions tab.
  3. Enable AI SuiteUse AI Assistant.
  4. Save.

4. Enable API / Web Services Module

The AI Suite's search and form-filling assistants rely on Dolibarr's built-in REST API.

  1. Navigate to: HomeSetupModulesAPI / Web servicesActivate
  2. Edit the relevant user account.
  3. Generate an API key for that user and save.

Usage

Opening the AI Panel

Click the AI button in the top-right menu bar (next to the user menu). The panel slides in from the right side of the screen.

Chatting with the AI

  1. Select a template from the dropdown in the panel header if multiple templates have been configured.
  2. Type your question or message in the text area at the bottom.
  3. Press Enter or click the Send button.
  4. The AI response will stream in real time.
  5. Your current conversation is saved per-user and persists as you navigate between pages. Use Clear chat to start a new conversation.

Privacy & Security

  • API keys are stored securely in Dolibarr's server-side configuration and are never exposed to the frontend.
  • Conversations are stored in the database on a per-user basis.
  • Your ERP database data (records, financials, contacts, etc.) is never transmitted to AI providers.
  • Rate limiting per template prevents accidental or intentional API abuse.

API Costs

AI Suite uses your chosen provider's API. Costs are determined by token usage and vary by provider and model:

Provider Example Models Pricing Info
OpenAI GPT-4o, GPT-4o mini openai.com/pricing
Anthropic Claude 3.5 Sonnet, Claude 3 Haiku anthropic.com/pricing
Google Gemini Gemini 1.5 Pro, Gemini 1.5 Flash ai.google.dev/pricing

A typical conversation uses approximately 500–2,000 tokens per response. Monitor your usage in your provider's dashboard.

More Information