- Introduction
- Prerequisites
- Installation
- Configuration
- Usage
- Advanced Options
- Maintenance and Diagnostics
- FAQ
Dalfred - AI Assistant for Dolibarr
Dalfred is a Dolibarr module that integrates an intelligent assistant (AI) directly into your ERP. It allows you to converse with an AI to query your data, generate content, execute actions and automate common tasks, all without leaving Dolibarr. Dalfred relies on the MCP (Model Context Protocol) to interact securely with your instance.
Introduction
What is Dalfred?
Dalfred is a conversational AI assistant designed specifically for Dolibarr. It understands your ERP context and can access your data (customers, invoices, orders, products, etc.) to provide relevant answers and execute concrete actions.
Why use Dalfred?
- Time savings: Ask questions in natural language instead of navigating through menus ("What is this month's revenue?", "List unpaid invoices over 30 days old")
- Action execution: Dalfred can create, modify or query elements in Dolibarr via MCP tools
- Content generation: Write emails, product descriptions, reports and other content directly from the chat
- SQL queries: Query your database in natural language — Dalfred translates it into secure SQL
- Multi-conversation: Manage multiple discussion threads in parallel, each with its own context
- Knowledge base: Enrich Dalfred with your own documents and internal procedures
- Open MCP: The MCP server can also be used from external clients (Claude Desktop, OpenClaw, etc.)
Prerequisites
Before installing Dalfred, make sure your environment meets the following requirements:
| Component | Minimum version |
|---|---|
| Dolibarr | 18.0 or higher |
| PHP | 8.1 or higher |
| PHP Extensions | json, curl, mbstring |
You will also need an API key from a compatible AI provider:
- Anthropic (Claude) - Recommended
- OpenAI (GPT)
Note: The API key is used to communicate with the AI provider. API usage costs are billed directly by the provider, independently of the Dalfred licence.
Installation
From the DoliStore
- Go to the DoliStore and search for Dalfred
- Purchase the module (EUR 400, lifetime licence) and download the ZIP archive
- Extract the archive into the
htdocs/custom/folder of your Dolibarr installation - The final folder should be
htdocs/custom/dalfred/
Activation in Dolibarr
- Log in to Dolibarr as an administrator
- Go to Home -> Setup -> Modules/Applications
- Search for "Dalfred" in the modules list
- Click the Enable button
Once the module is activated, a new Dalfred menu appears in your navigation bar.
Configuration
Dalfred configuration is done through several administration pages, accessible from Dalfred -> Setup.
General Configuration (setup.php)
The general configuration page allows you to define the main module settings:
- MCP activation: Enable or disable the built-in MCP server
- MCP settings: Configure MCP server behaviour (port, authentication, etc.)
- Rate limiting: Define the maximum number of requests per user per period
- Logging: Enable activity logs for monitoring and diagnostics
Tip: Start with default settings, then adjust according to your needs once you are familiar with the module.
AI Configuration (ai_setup.php)
This page allows you to configure the connection to the artificial intelligence provider:
- AI provider: Select your provider (Anthropic, OpenAI, etc.)
- API key: Enter your API key obtained from the chosen provider
- Model: Choose the AI model to use (e.g. Claude 3.5 Sonnet, GPT-4, etc.)
- Click Save then Test connection to validate
Important: The model choice influences response quality and cost per request. More powerful models are more expensive but provide better responses.
Tool Permissions (toolkit_permissions.php)
Dalfred can execute actions in Dolibarr via MCP tools. This page allows you to precisely control which tools are available:
- Query tools: Reading customer records, products, invoices, orders, etc.
- Creation tools: Creating new elements in Dolibarr
- Modification tools: Updating existing elements
- SQL tools: Executing read-only SQL queries
- Content tools: Generating text, emails, descriptions
For each tool, you can define:
- Enabled/Disabled: Allow or deny the use of the tool
- Authorised groups: Restrict access to specific Dolibarr user groups
Security tip: Only enable the tools that are needed and restrict modification tools to trusted users.
Knowledge Base (knowledge.php)
The knowledge base allows you to enrich Dalfred with information specific to your company:
- Go to Dalfred -> Setup -> Knowledge Base
- Add documents, procedures or information that Dalfred can consult
- Organise entries by categories for easier retrieval
- Dalfred will use this information to contextualise its responses
Supported content types:
- Free text: Internal procedures, FAQs, memos
- Documents: PDF files, text files or other reference documents
- Instructions: Specific directives about the assistant's tone, style or behaviour
Usage
The Dalfred Chat
Dalfred's main interface is a conversational chat accessible from the Dalfred menu:
- Click on Dalfred in the navigation bar
- A chat window opens
- Type your question or instruction in natural language
- Dalfred analyses your request, queries your data if necessary, and responds
Example questions:
- "What is the revenue for the current quarter?"
- "List the 10 most recent unpaid invoices"
- "Summarise the customer record for Dupont SA"
- "Write a payment reminder email for invoice FA2401-0042"
- "How many orders were placed this week?"
MCP Tools
When Dalfred needs to access your data or perform an action, it uses MCP tools. These tools are executed transparently:
- You ask a question or give an instruction
- Dalfred identifies the required tool(s)
- The tools are executed (query, creation, modification)
- Dalfred presents the result in a readable format
Note: Available tools depend on the permissions configured by the administrator (see Configuration section).
Using MCP from an External Client
Dalfred's MCP server can be used from external MCP-compatible applications:
- Claude Desktop: Connect Claude Desktop to your Dolibarr instance
- OpenClaw: Use OpenClaw to interact with your Dolibarr data
- Other MCP clients: Any client compatible with the MCP protocol
To configure an external client, you will need the MCP server URL and authentication credentials available on the general configuration page.
Managing Conversations
Dalfred supports multi-conversation:
- New conversation: Click the "+" button to start a new thread
- History: Find your previous conversations in the sidebar
- Context: Each conversation maintains its own context and history
- Deletion: Delete conversations you no longer need
Advanced Options
Rate Limiting
Rate limiting protects against excessive API usage:
- Requests per minute: Maximum number of requests per user per minute
- Requests per day: Daily limit per user
- Global limit: Maximum number of requests across all users
Activity Log (activity_log.php)
The activity log records all interactions with Dalfred:
- User requests: Who asked what question and when
- Tools executed: Which MCP tools were used
- Tokens consumed: Number of tokens used per request (for cost tracking)
- Errors: Failed requests with error details
Access the log from Dalfred -> Activity Log.
About Page (about.php)
The About page displays version information, licence and module credits. It is accessible from Dalfred -> About.
Maintenance and Diagnostics
The maintenance page allows you to check the status of your installation and diagnose any issues.
Installation Check (maintenance.php)
Go to Dalfred -> Maintenance to run an automatic check:
- AI connection: Connectivity test with the configured AI provider
- MCP server: Verification that the MCP server is functioning correctly
- PHP extensions: Verification of required extensions
- Permissions: Validation of file and directory access permissions
- Knowledge base: Integrity check of the knowledge base
Logs and Debug
When logging is enabled (see General Configuration):
- Detailed logs are written to the
documents/dalfred/logs/directory in Dolibarr - Each interaction generates an entry with the request, response and tools used
- API errors are recorded with the error code and full message
Common Issues
Dalfred does not respond or returns an error
- Check your API key in the AI configuration
- Test the connection from the Maintenance page
- Verify that your server can reach the provider's API (no firewall blocking)
MCP tools are not working
- Check that the tools are enabled in the permissions
- Verify that the user belongs to an authorised group
- Consult the activity log to identify the error
Slow responses or timeouts
- Check your server load and internet connection
- Try a lighter AI model (fewer tokens, faster response)
- Adjust timeout settings in the general configuration
High API costs
- Consult the activity log to identify the most active users
- Reduce per-user rate limits
- Use a less expensive model for simple queries
FAQ
Which AI providers are supported?
Dalfred currently supports Anthropic (Claude) and OpenAI (GPT). Additional providers may be added in future versions. We recommend Anthropic Claude for the best experience.
Is my data sent to the AI provider?
Yes, the data needed to answer your question is sent to the AI provider via its API. Consult your provider's privacy policy (Anthropic, OpenAI) to understand how your data is processed. No data is stored by Dalfred outside your Dolibarr server.
Can I use MCP without the chat interface?
Yes, Dalfred's MCP server can be used independently of the built-in chat interface. You can connect it to external MCP clients such as Claude Desktop or OpenClaw to interact with your Dolibarr data from other applications.
How much does Dalfred cost?
The Dalfred licence is EUR 400 (one-time purchase, lifetime licence) available on the DoliStore. AI API usage costs are separate and billed directly by the chosen provider (Anthropic, OpenAI).
Can Dalfred modify data in Dolibarr?
Yes, if modification tools are enabled in the permissions. The administrator precisely controls which tools are available and for which user groups. By default, we recommend enabling only query tools.
How do I update the module?
- Download the new version from the DoliStore
- Replace the files in
htdocs/custom/dalfred/ - Access Dolibarr — the module will detect the update and apply necessary migrations
Where can I find help?
- E-dem support: Contact us for any technical questions
- Anthropic documentation: docs.anthropic.com for Claude API-related questions
- OpenAI documentation: platform.openai.com for GPT API-related questions