Context Control Center (ai_context)

It's important to know that context items are Drupal content entities. So, they get moderation, revisions, scheduling, multilingual support, and more.

Context examples

  • Brand Guidelines
  • Taglines & Slogans
  • Pricing & Packages
  • A11y Standards
  • Case Studies
  • Tone of Voice
  • Audience Personas
  • FAQS
  • SEO Data
  • Client Quotes
  • Writing Rules
  • Journey Maps
  • Glossary
  • Content Templates
  • Partner List
  • Editorial Guide
  • Product List
  • Compliance Rules
  • Landing Page Rules
  • Privacy Policies
  • Service Catalog
  • Legal Disclaimers
  • Campaign Briefs
  • Language Rules

Overview of Context Management

The module provides a way to create "Context Items" with moderation, revisions, scheduling, multilingual support, and markdown editing in a Drupal CMS-native Ul.

Context Scope Plugins

Categorize context with agents subscribing to the most relevant scopes, all of which are plugins.

Scope: Applies Everywhere

  • Global

Scope: Chosen By People

  • Context Tags
  • Use Cases

Scope: Detected from Page, User, etc.

  • Site Sections
  • Languages
  • Role
  • Specific Entities
  • Entity Types
  • Taxonomy Terms

Consumers

Subcontext

Subcontexts group items into a one-level hierarchy, with children always included or LLM-selected based on relevance.

Context Selection

Controls what each agent receives via scopes, entity targeting, and inclusion rules, with configurable item and token limits.

Admin Experience

Includes a lightweight dashboard, usage tracking, access control, and configurable settings for scopes and moderation.

Developer Experience

Includes debug logging, agent debugging tools, comprehensive test coverage, and detailed documentation.

Three steps to your first context item

Install

composer require drupal/ai_context drush en
Requires the Al and AI Agents modules and a configured provider.

Add sample context

drush recipe modules/contrib/ai_context/recipes/ai_context_demo_university
Unpublished university examples you can edit, copy, or learn from.

Open the overview

/admin/config/ai/context
Onboarding page with links to items, consumers, scopes, and usage.

Notes

One of the ways the context can be scoped is you can create "Custom Sections", then when you create context items, you can sort of tag them with that scope.