Configuration
Admin navigation
Find Context Control Center at Configuration → AI → Tools & Automation → Context Control Center.
After enabling the module, follow these steps to configure AI Context.
Step 1: Create agents
Go to /admin/config/ai/agents to add one or more AI agents. Agents are
the consumers of context items -- each agent can have its own context
configuration.
Step 2: Create context items
Go to /admin/config/ai/context/items to create context items. Each item contains
information that agents can use when helping with tasks on your site. Content
is written in markdown using the MDXEditor.
Step 3: Configure agent context
Go to /admin/config/ai/context/settings/agents to configure which context items
each agent can access. For each agent you can set:
- Scope subscriptions -- which scope values the agent should prioritize
- Always include -- context items that are always provided to the agent
- Never include -- context items explicitly excluded from the agent
- Assigned items -- specific items manually assigned to the agent
See Agent configuration for full details.
Overview page
The CCC overview dashboard, Show overview page setting, and behavior when disabled are documented in Overview page.
General settings
Configure module-wide defaults at /admin/config/ai/context/settings/general:
| Setting | Description |
|---|---|
| Show overview page | When enabled, /admin/config/ai/context/overview is the CCC default landing page. See Overview |
| AI Provider/Model | Provider and model for conditional subcontext AI decisions (when Enable conditional subcontext AI decisions is on under Context item settings) and for local token estimation when trimming injected context to the token budget. Select - None - to clear. The field description shows whether conditional subcontext AI decisions are currently enabled or disabled |
| Max global context items | Cap on global items included per selection (default: 3) |
| Max context items to inject | Cap on parent and other selected items per selection (default: 10, range: 1–20). Required and conditional subcontext children are added after this cap when subcontext is enabled |
| Max tokens for injection | Token budget for rendered context appended to prompts (default: 1200) |
| Context prefix | Text prepended before injected context in agent system prompts. Default: "The following site-specific context applies to this task. Use it strictly when relevant; do not override user intent." Translatable via Configuration translation |
| Enable debug logging | Writes selection and rendering details to the ai_context log. See Debugging |
These limits apply to agent injection unless overridden per request (for example via function call parameters or programmatic API calls).
Clearing the provider: Select - None - when no enabled feature requires a provider. You cannot clear the provider while conditional subcontext AI decisions are enabled and published conditional subcontext items exist — change those items to required, remove their parent, or disable conditional AI decisions on Context item settings first.
When conditional AI decisions are disabled, all conditional children are included without a provider call; the provider may remain configured for injection token estimation or future use.
Context item settings
Configure publishing defaults and subcontext behavior at
/admin/config/ai/context/settings/items:
| Setting | Description |
|---|---|
| Publish by default | New context items default to published (default_status) |
| Create new revisions by default | New edits create a revision by default (new_revision) |
| Enable subcontext hierarchy | Master toggle for parent/child context items. When disabled, subcontext resolution is skipped and saving an item clears subcontext fields |
| Enable conditional subcontext AI decisions | When enabled, an AI call decides which conditional children to include per parent. When disabled, all conditional children are included without an AI call |
| Max conditional parent decisions per request | Caps provider calls per context resolution (default: 3, range: 1–20). One call per parent under the cap; parents over the cap or failed AI calls fall back to required children only for that parent. Which parents receive a decision when the cap is hit follows internal processing order, not task relevance |
Conditional subcontext uses one provider call per parent (not batched across parents), with per-request caching for identical decisions. See Subcontext hierarchies.
When Scheduler is installed, this page also links to Scheduler's no-bundle
settings form for the ai_context_item entity type. See
Scheduling.
Configuration translation
The Context prefix setting (context_prefix in ai_context.settings) is
translatable via Drupal's Configuration translation UI
(/admin/config/regional/config-translation → AI Context settings).
This lets multilingual sites inject a localized prefix before context blocks
in agent system prompts.
Admin pages reference
Context management
| Page | Path |
|---|---|
| Overview | /admin/config/ai/context/overview |
| Context items | /admin/config/ai/context/items |
| Add context item | /admin/config/ai/context/items/add |
| Usage | /admin/config/ai/context/usage |
Settings
| Page | Path |
|---|---|
| Settings (redirects to General) | /admin/config/ai/context/settings |
| General settings | /admin/config/ai/context/settings/general |
| Context item settings | /admin/config/ai/context/settings/items |
| Scope settings | /admin/config/ai/context/settings/scope |
| Agent settings | /admin/config/ai/context/settings/agents |
| Agent context edit | /admin/config/ai/context/settings/agents/{agent_id}/edit |
| Usage settings | /admin/config/ai/context/settings/usage |
| Clear usage records | /admin/config/ai/context/settings/usage/clear |
Entity routes
| Page | Path |
|---|---|
| View context item | /admin/config/ai/context/items/{id} |
| Edit context item | /admin/config/ai/context/items/{id}/edit |
| Delete context item | /admin/config/ai/context/items/{id}/delete |
| Duplicate context item | /admin/config/ai/context/items/{id}/duplicate |
| Revision history | /admin/config/ai/context/items/{id}/revisions |
| View revision | /admin/config/ai/context/items/{id}/revisions/{rev}/view |
| Revert revision | /admin/config/ai/context/items/{id}/revisions/{rev}/revert |
| Delete revision | /admin/config/ai/context/items/{id}/revisions/{rev}/delete |
| Usage record detail | /admin/config/ai/context/usage/{usage_id} |
Permissions
The module provides granular permissions at
/admin/people/permissions/module/ai_context:
- Administer AI Context -- manage settings and agent configurations
- View AI Context Items -- view the context items listing
- View any unpublished AI Context Item -- view unpublished items
- Create AI Context Item -- create new context items
- Edit own / Edit any AI Context Item -- edit context items
- Delete own / Delete any AI Context Item -- delete context items
- View / Revert / Delete all AI Context Item revisions -- revision management
- Schedule publishing of AI Context Items -- use Scheduler features
- View scheduled AI Context Item -- see scheduled items
- Access published AI Context -- use published context in AI features (function calls, chatbots, and other consumers). Intended for site builders, content creators, and page builders who need context at runtime without full editorial permissions
- View AI Context Usage -- access the usage tracking page