This module is part of the AI module ecosystem and included in DXPR CMS.

Transform CKEditor 5 into an AI-powered content creation platform with slash commands, real-time streaming, and support for 400+ AI models. Like ChatGPT but faster, and better at creating HTML content. Built on DXPR's CKEditor 5 AI plugin.
CKEditor AI Agent generating a structured blog post with headings, paragraphs, and a Cancel Generation button visible in the editor

You need CKEditor AI Agent if

How It Works

Type / in any CKEditor 5 field to open the AI command menu. Enter a prompt, press Enter, and watch content stream into the editor in real time. All requests are routed server-side through the Drupal AI module; API keys never reach the browser. The module works with any AI provider supported by the AI module: DXPR, OpenAI, Anthropic, Ollama, and more.

CKEditor AI Agent dropdown menu showing AI editing commands including Edit or review, Polish Text, Improve Tone of Voice, Make Shorter, Make Longer, Simplify Language, and Generate from selection options

Features

CKEditor AI Agent tone of voice dropdown showing options: Default tone, Professional, Educational, Persuasive, Approachable, Formal, and Inspirational

Keyboard Shortcuts

Extended Content Capabilities

DXPR AI Provider enables long-form content creation by automatically routing between multiple AI providers when limits are reached. Combined with CKEditor AI Agent, content teams can generate 1,000+ word articles with proper research and structure in a single prompt.

Getting Started

  1. Install with Composer:
    composer require drupal/ckeditor_ai_agent
  2. Enable the module and install an AI provider (e.g. DXPR AI Provider, OpenAI, or any other supported provider)
  3. Configure a default Chat provider at /admin/config/ai/settings
  4. Grant the "Use CKEditor AI Agent" permission to roles that should have AI access
  5. Edit your text format at /admin/config/content/formats and drag the "AI Agent" button into the CKEditor toolbar
  6. Start using slash commands or the toolbar button for AI assistance
CKEditor 5 toolbar configuration page showing AI Agent buttons in the Active toolbar and plugin settings sidebar

Prefer a turnkey demo site?

Spin up DXPR CMS: Drupal pre-configured with DXPR Builder, DXPR Theme, CKEditor AI Agent module, and security best practices.

Get DXPR CMS »

Usage Examples

Dependencies


FAQ

Does CKEditor AI Agent require a paid subscription?

The module itself is free and open source (GPL). You need an AI provider to process requests. DXPR AI Provider includes 10,000 free words and 10 images per month for all sites. Alternatively, use your own API keys with OpenAI, Anthropic, Ollama, or any other provider supported by the Drupal AI module.

How does CKEditor AI Agent keep API keys secure?

All AI requests are routed server-side through the Drupal AI module. API keys are stored in your Drupal configuration (or in the Key module for extra security) and never sent to the browser. The CKEditor plugin communicates only with your own Drupal backend, which then forwards requests to the AI provider.

Can CKEditor AI Agent generate long-form content like full blog posts?

Yes. When paired with DXPR AI Provider, the module supports long-form content creation by automatically routing between multiple AI providers when token limits are reached. Content teams can generate 1,000+ word articles with proper research and structure in a single prompt, including headings, lists, and formatted HTML.

Does CKEditor AI Agent work with existing content?

Yes. The module is context-aware and reads the surrounding editor content to produce relevant responses. You can also select existing text and use the AI menu to revise, translate, summarise, or adjust tone. All edits are inserted directly into CKEditor with full undo/redo support.

Which AI models are supported?

CKEditor AI Agent works with any chat model available through the Drupal AI module ecosystem: over 400 models from providers including OpenAI (GPT-4o, GPT-4), Anthropic (Claude), Google (Gemini), Mistral, XAI (Grok), and local models via Ollama. Switch models at any time without changing your content workflow.

Can I use CKEditor AI Agent inside DXPR Builder?

Yes. CKEditor AI Agent works inside DXPR Builder's text editing fields. When editing rich text elements in the page builder, all slash commands, streaming, and AI menu options are available. DXPR Builder also passes its security settings to the CKEditor 5 AI Agent plugin automatically.

Does the module support multilingual content?

Yes. CKEditor AI Agent uses the entity's language setting to generate content in the correct language and can translate selected text between languages directly in the editor.

CKEditor AI Agent generating Arabic RTL content with heading and paragraph text in the CKEditor 5 editor

Related Modules

CKEditor AI Agent is part of the AI-powered content stack included in DXPR CMS, a turnkey marketing CMS for Drupal that combines AI content creation, a premium Drupal theme, and a drag-and-drop layout builder. See getting started or explore pricing.