Search by

mazzz1y / roundcube-ai

MaZy

Chat with an AI about the email you are writing: rewrite, refine and compare versions of a draft in the Roundcube compose view, via any OpenAI-compatible API.

Package info

github.com/mazzz1y/roundcube-ai

Type:roundcube-plugin

pkg:composer/mazzz1y/roundcube-ai

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-09-05 13:05 UTC

This package is auto-updated.

Last update: 2026-09-05 13:10:28 UTC


README

Chat with an AI about the text you are writing, without leaving Roundcube.

The AI assistant dialog in the Roundcube compose view

Install

  1. Copy the roundcube_ai directory into your Roundcube plugins/ folder. The directory name must stay roundcube_ai — it matches the plugin class.

  2. Enable it in config/config.inc.php:

    $config['plugins'][] = 'roundcube_ai';
  3. Point it at a model:

    cd plugins/roundcube_ai
    cp config.inc.php.dist config.inc.php
    $config['roundcube_ai_api_url'] = 'http://localhost:11434/v1/chat/completions';
    $config['roundcube_ai_model']   = 'llama3.1';

Or with Composer:

composer require mazy/roundcube-ai

Only api_url and model are required

Configuration

Option Default Meaning
roundcube_ai_api_url OpenAI chat completions URL Full endpoint URL
roundcube_ai_api_key '' Bearer token; leave empty for local endpoints
roundcube_ai_model gpt-4o-mini Model name
roundcube_ai_temperature 0.4 Sampling temperature (0–2)
roundcube_ai_max_tokens 2000 Response token cap
roundcube_ai_max_input_chars 20000 Max text length sent to the API
roundcube_ai_context_messages 20 Chat messages kept as context (0 = no limit)
roundcube_ai_context_chars 24000 Context size in characters (0 = no limit)
roundcube_ai_timeout 60 HTTP timeout in seconds (1–600)
roundcube_ai_verify_tls true TLS certificate verification
roundcube_ai_default_instruction fix grammar, keep language Used when the prompt is left empty
roundcube_ai_system_prompt built-in Override the system prompt

Conversation context is capped by roundcube_ai_context_messages and roundcube_ai_context_chars; the oldest messages are dropped first. Walking through versions does not rewind the chat.

Requirements

  • Roundcube 1.5 or newer
  • PHP 8.0 or newer, with curl and mbstring

License

MIT