Download the PHP package woutersf/ai-console-bundle without Composer

On this page you can find all versions of the php package woutersf/ai-console-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ai-console-bundle

Mautic AI Console Bundle

An AI-powered console interface for Mautic with voice input, intelligent assistance, and tool integration. Chat with your Mautic instance using natural language!

Overview

The Mautic AI Console Bundle provides an intelligent assistant that helps users interact with their Mautic instance through natural language. Ask questions about your data, get help with configuration, or execute actions - all through a conversational interface.

Features

Requirements

Installation

Via Composer

This will automatically install the required mautic/ai-connection-bundle dependency.

Manual Installation

  1. First, install the Mautic AI Connection Bundle (required)
  2. Download or clone this repository
  3. Place the MauticAiConsoleBundle folder in docroot/plugins/
  4. Clear Mautic cache:

  5. Go to Mautic Settings → Plugins
  6. Click "Install/Upgrade Plugins"
  7. Find "Mautic AI Console" and publish it

Dependencies

Mautic AI Connection Bundle (Required)

This plugin requires the Mautic AI Connection Bundle to function. The AI Connection Bundle provides:

Important: Configure the AI Connection Bundle first before using the AI Console!

Configuration

Navigate to Mautic Settings → Plugins → Mautic AI Console to configure the plugin.

Basic Settings

1. AI Console Enabled

Enable or disable the AI Console interface.

2. AI Model

Select which AI model to use for the console:

Note: The AI Console and AI Reports can use different models independently.

3. Pre-prompt (System Instructions)

The pre-prompt is critical for controlling the AI's behavior. This is where you define:

Default Pre-prompt Example:

Available Tokens in Pre-prompt

Importance of a Good Pre-prompt

The pre-prompt is the most important configuration for the AI Console. A well-crafted pre-prompt will:

✅ Define personality - Is the AI formal, friendly, technical, or casual? ✅ Control output format - HTML vs Markdown vs plain text ✅ Set boundaries - What the AI can and cannot do ✅ Provide context - User info, system capabilities, documentation ✅ Ensure consistency - Same behavior across all users ✅ Improve accuracy - Clear instructions = better responses

Tips for Writing Good Pre-prompts:

  1. Be specific about output format

  2. Define the AI's role clearly

  3. Set response length expectations

  4. Include relevant documentation or context

  5. Handle edge cases

Speech-to-Text Settings

Enable Speech-to-Text

Toggle voice input functionality.

Speech-to-Text Model

Select the model for speech recognition:

Note: Speech-to-text requires audio transcription support in your LiteLLM configuration.

Tool Configuration

Enable or disable specific tools that the AI can execute:

Security Note: Only enable tools you want the AI to have access to. Disabled tools won't be available to the AI.

Usage

Accessing the Console

The AI Console can be accessed in two ways:

  1. Keyboard Toggle (Recommended) - Press the console key (` or ~ key, depending on your keyboard layout) or the paragraph key (§) to instantly toggle the AI Console on/off. This provides quick, game-like access similar to consoles in Counter-Strike or Minecraft.

  2. Toolbar Button - Click the AI Console button in the Mautic toolbar (top right).

Pro Tip: The keyboard toggle is the fastest way to access the AI while working in Mautic!

Asking Questions

Examples:

Using Voice Input

  1. Click the microphone icon in the AI Console
  2. Speak your question
  3. The AI will transcribe and respond

Using Tools

When enabled, the AI can execute actions:

Example:

Architecture

Advanced Configuration

Custom Tools

Create custom tools by extending the tool system:

  1. Create a new tool class in Tools/ directory:

  2. The tool will automatically appear in plugin settings
  3. Enable it to make it available to the AI

Conversation Context

The AI Console maintains the last 7 conversation turns for context. This allows:

Example conversation:

Troubleshooting

Console button not appearing

Solution:

  1. Ensure plugin is published
  2. Enable "AI Console Enabled" in settings
  3. Clear cache

"LiteLLM endpoint must be configured" error

Solution: Configure the Mautic AI Connection Bundle first with your LiteLLM endpoint and credentials.

AI responses are in the wrong language

Solution:

  1. Check your Mautic user profile language - Go to your user profile settings and verify the language is set correctly. This language preference is automatically passed to the AI via the {language} token in the pre-prompt.

  2. Verify the pre-prompt uses the {language} token - Ensure your pre-prompt includes instructions like You answer in {language} so the AI knows which language to respond in.

  3. Example: If your profile is set to French, the {language} token will be replaced with "French" in the instructions sent to the AI.

Speech-to-text not working

Solution:

  1. Enable "Speech-to-Text Enabled" in settings
  2. Ensure your LiteLLM instance supports audio transcription
  3. Check browser microphone permissions

AI gives incorrect answers

Solution: Improve your pre-prompt:

Tools not executing

Solution:

  1. Ensure tools are enabled in plugin settings
  2. Check that the AI's pre-prompt mentions tool capabilities
  3. Verify user has necessary permissions in Mautic

Development

Adding Documentation to Pre-prompt

You can include Mautic documentation in the pre-prompt to improve accuracy:

Testing Tools

Test tool execution:

Best Practices

  1. Start with a detailed pre-prompt - Spend time crafting clear instructions
  2. Test with different models - GPT-4 vs GPT-3.5 behave differently
  3. Enable only needed tools - Limit AI capabilities for security
  4. Include user context - Use tokens like {account_firstname} for personalization
  5. Monitor conversations - Check AI logs to improve prompts
  6. Keep responses concise - Configure AI to be brief by default
  7. Use HTML formatting - Makes responses more readable in the console

Security Considerations

Support

License

GPL-3.0-or-later

Credits

Created by Frederik Wouters and the Mautic Community

Version

1.0.0

Changelog

1.0.0 (2024)


All versions of ai-console-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
mautic/core Version ^4.0|^5.0
mautic/ai-connection-bundle Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package woutersf/ai-console-bundle contains the following files

Loading the files please wait ...