1.0.0 released! ๐ŸŽ‰

Context Control Center (CCC) 1.0.0 is the first stable release. Read the 1.0.0 release notes before you install or upgrade. They list the known issues and their workarounds. Read the blog post.

Contributors and testers are welcome! Please report bugs, feature requests, UX improvements, and ideas in the issue queue. ๐Ÿ™

To try CCC with nothing to install, start a free 30-day Drupal AI Demo site: a university website with Drupal AI already set up. To try CCC on a new local site, see the installation and testing steps.

Context Control Center (CCC) helps Drupal AI use your content, rules, and standards to give more accurate and relevant results. A content editor can write product pages with the correct compliance text. A marketer can make copy that matches the brand. A site builder can give AI features knowledge about the site. CCC gives your site's context to AI agents and to other supported AI features, such as AI Automators, AI CKEditor, AI Validations, and Canvas AI. For AI Automators, turn on push for each automator. AI CKEditor needs version 1.5.0-beta2 or later.

You create and manage context items like other Drupal content, with drafts, publishing, and revisions. You can organize items by use case, tag, language, site section, content type, or user role. You can link items to specific pages, and group related items so that they are used together.

You choose which context each AI feature gets, set limits to control costs, and always include or never include items. A dashboard, usage reports, and debug logs help you see what works and improve it over time.

Context examples

You can add any context that is useful for your site, for example:

  • Brand voice and tone
  • Style guides
  • Editorial standards
  • Design systems and templates
  • Regulatory requirements (HIPAA, FERPA, GDPR)
  • Accessibility standards

To see examples, apply the optional University sample context recipe. It adds three unpublished items: voice and tone, structure and grammar, and inclusive language.

Features

Context content management

Context items are Drupal content entities. The edit form looks like the node edit form. Some features need optional modules.

  • Editorial workflow: drafts and publishing with core Content Moderation
  • Revisions: view the history, and revert or delete revisions. To compare revisions, install Diff.
  • Scheduling: scheduled publishing and unpublishing with Scheduler and Scheduler Content Moderation Integration
  • Translations: with the core Language and Content Translation modules
  • Markdown editor: with rich text, diff, and source views
  • Duplicate: copy an item as a new draft
  • Content importers: an optional submodule imports text, Markdown, PDF, Word, and spreadsheet files into an item (needs Document Loader 2.0.7 or later, AI File to Text, and AI 1.5 or later)
  • Item tokens: give an item a token name, then use [ai_context:item:TOKEN_NAME] to put its published content into other text, for example an agent system prompt

Context scopes

Scopes tell CCC where a context item applies. Some scopes are filters: they remove an item when it does not match the current user, language, page, or content. When CCC cannot find the current page or content, for example in a chatbot or a cron run, it also removes items that use page or content filters. AI features can subscribe to the values of some scopes. Items that match more subscribed values get a higher rank. The plugin system is extensible, so you can add your own scopes.

  • Global: give the item to every AI feature, up to the "Max global context items" limit. A Global item has no other scopes.
  • Use Cases: the type of task, for example Working with Text or Working with Canvas
  • Context Tags: your own tags
  • Roles: give the item only to users with one of the selected roles. This is a filter, not access control: Always include and item tokens skip it.
  • Languages: give the item only for the selected languages
  • Site Sections: sections or paths of your site
  • Entity Types: a type of content, for example all Article nodes or all Canvas pages
  • Taxonomy Terms: content that has the selected terms
  • Specific Entities: one specific node, media item, Canvas page, or other entity (needs Dynamic Entity Reference)
  • Extensible: add your own scope plugins

Subcontext

Subcontext puts context items in a one-level parent and child hierarchy.

  • Required subcontext: CCC includes the child with its parent, when the child is published and the user can view it
  • Conditional subcontext: an AI call uses the Purpose of each child to decide if the child is relevant to the task. This call sends the first 500 characters of the user request to the provider in the General settings.
  • Parent scope: by default, a child uses the scope of its parent, and CCC adds it only with its parent
  • Parent and child list: the item list shows each child under its parent, with an icon for its type

Context selection

CCC selects context for each consumer. A consumer is an AI agent, an AI Automator, or another AI feature, for example an AI CKEditor tool. Top-level selection uses rules, not an AI model. Only conditional subcontext uses an AI call.

  • Selection modes: Minimal, Relevant, or Broad sets how much matching context a consumer gets. Set the site default (Relevant on new sites), and change it for each consumer.
  • Scope subscriptions: a consumer subscribes to scope values, for example a use case or a tag. Items that match more values get a higher rank.
  • Global items: CCC includes them for every consumer, up to the "Max global context items" limit
  • Always include: include an item for a consumer, also when its scopes do not match
  • Never include: leave an item out for a consumer, also when another rule selects it
  • Limits: limit the number of Global items and the number of tokens of context that CCC adds to each AI call, to control costs
  • Push and tools: CCC can push context into the system prompt automatically. Agents can also get context with tools, for example "Get Relevant AI Context Items".
  • Access: CCC gives only published items that the current user can view. Give the Use Published AI Context in AI Features permission to the roles that use AI features.

Additional features

  • Overview page: a dashboard with the main tasks and resources
  • Usage tracking: optional. It records which pushed items each consumer used, and on which pages and content. It does not record the items that agents get with tools.
  • Debug logging: optional detailed logs for troubleshooting
  • Agent debugging: works with the AI Agents Debugger and Explorer modules
  • Access control: separate permissions to manage context, change settings, view usage, and get context in AI features
  • Admin settings: provider, limits, selection mode, scopes, consumers, publishing defaults, and subcontext
  • Tests: automated tests for all features
  • Documentation: feature, configuration, and developer documentation

Requirements

  • Drupal 10.5 or a later 10.x release, or Drupal 11.2 or a later 11.x release (this includes Drupal CMS 2). CCC 1.0.0 does not support Drupal 12.
  • AI 1.4.12 or a later 1.4 release, or 1.5.2 or a later 1.x release
  • AI Agents 1.2 or later
  • An AI provider
  • If your site uses Canvas: Canvas 1.8.0 or later

See the Upgrade and compatibility policy for the PHP versions, the optional modules, and upgrades from beta and release candidate versions. From 1.0.0, public APIs follow the Drupal deprecation policy.

Roadmap and releases

Released

Planned 1.0.x releases

See all milestones for the 1.1.0 plans.

Blog posts and videos: beta1 announcement, beta1, beta2, beta3, beta4, beta5, rc1, rc2, 1.0.0

Getting support

Installation and testing steps

To try CCC without an installation, use the Drupal AI Demo. It gives you a free university site for 30 days, with Drupal AI and AI credits already set up.

To add CCC to an existing site:

composer require drupal/ai_context
drush en ai_context

If Composer cannot install CCC because of the installed AI version, see the supported AI versions and update AI first.

To try CCC on a new local site, use one of these two sets of steps. They use ddev.

Install on Drupal CMS

mkdir my-drupal-site && cd my-drupal-site
ddev config --project-type=drupal11 --docroot=web
ddev start
ddev composer create-project drupal/cms
ddev composer drupal:recipe-unpack
ddev composer require drupal/ai_context 'drupal/ai_agents_debugger:^1.0@beta' -W
ddev launch
# Go through the installer in the browser and choose the Byte site template.
ddev drush en ai_context ai_agents_debugger canvas_ai -y

Install on Drupal 11

mkdir my-drupal-site && cd my-drupal-site
ddev config --project-type=drupal11 --docroot=web
ddev start
ddev composer create-project "drupal/recommended-project:^11"
ddev composer require drush/drush
ddev composer require drupal/ai_context 'drupal/ai_agents_debugger:^1.0@beta' -W
ddev drush site:install --account-name=admin --account-pass=admin -y
ddev drush en ai_context ai_agents_debugger -y
ddev launch
# Or log in automatically with:
ddev launch $(ddev drush uli)

AI Agents Debugger is optional. It has only beta releases. It lets you run an agent and see the context that CCC adds to the system prompt.

Configure a provider

On Drupal CMS, if you selected AI in the installer, the amazee.ai provider is installed with a free trial. You can also install and configure a different AI provider.

On Drupal 11, install and configure an AI provider.

The provider settings page is at /admin/config/ai/providers. Agents use the default provider and model for "Chat with Tools" (/admin/config/ai/settings).

Simple testing steps

  1. Go to the overview page: /admin/config/ai/context/overview
  2. Add a context item and publish it: /admin/config/ai/context/items/add
  3. Go to the Consumers page: /admin/config/ai/context/settings/consumers
  4. For an agent (for example, Content Type Agent), click Configure context. For your item, select Always include context item, then save.
  5. On the Consumers page, click Debug agent for the agent (or go to /admin/config/ai/agents/debug). Enter a prompt and run the agent.

For example, if your context says "always add the word hello when you respond", and your prompt for the Content Type Agent is "list all the content types", then the response should include "hello".

Working on issues

This is an official AI Initiative project. We welcome contributions from AI Partners as well as from the wider community.

Some issue etiquette:

  • Please do not work on an issue that is already assigned before first commenting on the issue and/or contacting the person assigned.
  • Only assign yourself an issue if you will be able to work on it within the next couple of days. Exceptions can be made for project maintainers or those who have arranged something with the project maintainers.
  • Since assigning an issue blocks others from working on the issue, it's important to unassign an issue as soon as you know you can't work on it. If an issue has been assigned for more than 3 days with no updates, we will assume it's not being worked on and we may unassign it so others can take it on.

Issues that are tagged as AI Initiative Sprint are worked on during sprints run by the AI Initiative. Sprints run for two weeks. If you are not officially part of the AI Initiative, you can still work on these issues if you follow the guidelines above. When in doubt, DM Kristen Pol in Drupal Slack or add a messaging in the #ai-context Slack channel.

Much of the code for this module has been created through AI assistance or generation, and has been spec'ed, reviewed, tested, and updated by real people.
ย 
Supporting organizations: 
Project leadership, creation, roadmap, architecture, development
UX/UI/feature discussions
UX/UI/feature discussions
Focus on Outside AI development and general reviews

Project information

Releases