Skip to content

Context Control Center

AI Context (also called Context Control Center or CCC) helps AI agents give you better, more relevant answers by teaching agents about your specific website and content.

Think of it like giving agents a guidebook to your site. Instead of only knowing general information, agents can use your site's specific rules, terminology, and context to give more accurate and helpful responses.

Example: If you run an e-commerce site selling medical equipment, you can teach agents about your product categories, compliance requirements, and industry terminology. When agents help create content or answer questions, they will use this knowledge to be more accurate and relevant.

Beta status

This module is currently in beta. APIs and configuration may change between releases; see release notes when upgrading. For the developer-facing public versus internal boundary, see API stability.

Who is it for?

  • Content editors who want AI writing assistance that understands your site
  • Marketers who want consistent AI-generated pages that match your brand
  • Site builders who want to integrate AI features with specific knowledge
  • Developers who want to extend the scope and context system

Features

  • Overview dashboard: Onboarding-style landing page with setup status and quick links — see Overview
  • Easy context creation: Write context items using a markdown editor
  • Smart organization: Categorize context by topic, language, site section, or entity type/bundle using the scope system
  • Automatic selection: AI automatically uses the most relevant context
  • Content association: Link context to specific landing pages or content
  • Multi-language support: Provide context in different languages
  • Agent configuration: Control what information different agents can access, including always-include and never-include overrides
  • Subcontext: Organize context items in parent-child hierarchies — see Subcontext
  • Content moderation: Full editorial workflow (draft, published) for context items
  • Usage tracking: See which context items are being used and where
  • Revision history: Track changes to context items over time with diff support
  • Scheduling: Schedule context items for future publishing or unpublishing

Requirements

This module requires:

Optional modules

  • Dynamic Entity Reference -- enables the target entity scope and content association field (the module hides that scope when DER is not installed)
  • Diff -- compare context item revisions side-by-side
  • Scheduler -- schedule publish and unpublish of context items; the module degrades gracefully without it
  • Scheduler Content Moderation Integration -- bridges Scheduler with Content Moderation; requires Scheduler
  • Content importers -- import PDF, URL, and file content into the Context Item markdown editor (experimental Document Loader: Context Importer submodule)

Installation

Markdown editor (MDXEditor)

If you are using the AI core dev branch rather than a tagged version of the module, you need to build the markdown editor assets. The minimum required version of Node is 20.14.0.

cd web/modules/contrib/ai/ui/mdxeditor
npm install
npm run build

Context Control Center

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

composer require drupal/ai_context
drush en ai_context
drush cr

Quick configuration

After enabling the module:

Find CCC at Configuration → AI → Tools & Automation → Context Control Center.

  1. Create one or more agents at /admin/config/ai/agents
  2. Create context items at /admin/config/ai/context/items
  3. Configure agent context settings at /admin/config/ai/context/settings/agents

Visit /admin/config/ai/context/overview for an onboarding dashboard (enabled by default via Show overview page in general settings). See Overview page for when to enable or disable it.

For module-wide defaults (limits, subcontext, debug logging), see General settings.

Documentation

This documentation is generated using MkDocs from the source files located in the docs/ directory. To build the docs locally:

pip install mkdocs mkdocs-material
mkdocs serve

Then open http://localhost:8000.