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. For supported versions and beta-to-1.0 upgrade steps, see Upgrade and compatibility policy.
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
- Sample context: Optional university samples you can apply from a recipe or copy from markdown — see Sample context
- 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 — see Context Selection
- Page and entity context: Entity-dependent scopes need the request entity or page path — see Page and entity context
- Content association: Link context to specific landing pages or content
- Multi-language support: Provide context in different languages
- Consumer configuration: Control what information different consumers can access, including always-include and never-include overrides
- Subcontext: Organize context items in parent-child hierarchies — see Subcontext
- Content moderation: Dedicated editorial workflow (draft, published, archived) 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:
- AI (Artificial Intelligence) -- AI core platform
- AI Agents -- agent management system (submodule of AI)
- Content Moderation -- editorial workflow for context items (Drupal core)
- Taxonomy -- organize context items via tags (Drupal core)
Optional modules and recipes are listed under Installation.
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
Installing via a recipe or config sync does not apply config/install/
automatically. See
Recipe and config-sync installs.
Canvas sites
If you use Context Items with Canvas, require Canvas 1.8.0 or later:
composer require 'drupal/canvas:^1.8'
Optional modules
None of these are required to use Context Control Center. Install the integrations you need.
bash
composer require drupal/diff
drush en diff
- Dynamic Entity Reference: Associate context with specific entities (Specific Entities scope and content association). See Scopes.
bash
composer require drupal/dynamic_entity_reference
drush en dynamic_entity_reference
- Document Loader,
Document Loader Webpage,
AI File to Text, and
Document Loader: Context File Importer (
ai_context_document_loader): Import files, URLs, and documents into the markdown editor. See Content importers.
bash
composer require drupal/document_loader drupal/document_loader_webpage drupal/ai_file_to_text
drush en ai_context_document_loader document_loader_webpage
- Scheduler and Scheduler Content Moderation Integration: Schedule publish, unpublish, and moderation state changes. See Scheduling.
bash
composer require drupal/scheduler drupal/scheduler_content_moderation_integration
drush en scheduler scheduler_content_moderation_integration
Optional recipes
Recipes are not applied when you enable Context Control Center.
- University sample context (
ai_context_demo_university): Three unpublished university editorial samples (voice and tone, structure and grammar, inclusive language). See Sample context.
bash
drush recipe web/modules/contrib/ai_context/recipes/ai_context_demo_university
Quick configuration
After enabling the module:
Find CCC at Configuration → AI → Tools & Automation → Context Control Center.
- Create one or more agents at
/admin/config/ai/tools-automation/agents - Create context items at
/admin/config/ai/context/items - Configure consumer context settings at
/admin/config/ai/context/settings/consumers
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.
Quick links
- Configuration -- setup, admin pages, and permissions
- Overview page -- CCC landing dashboard
- Context items -- creating and managing context
- Sample context -- optional university samples via recipe or markdown
- Subcontext -- parent/child hierarchies and when to use them
- Content importers -- importing content into context items
- Scopes -- how the scope system works
- Context selection -- filtering, ranking, priority tiers, and limits
- Page and entity context -- how the request entity and page reach CCC, including chatbots and AI Assistants
- Consumer configuration -- per-consumer settings
- Developers -- architecture, services, and APIs
- Upgrade and compatibility policy -- supported versions and beta-to-1.0 upgrades
- Multilingual -- translation support
- Contributing -- how to contribute
- Debugging -- debug logging
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.