Skip to content

Consumer configuration

A consumer is anything that receives context: an AI agent, an AI Automator when that module is installed, and other integrations (for example AI CKEditor) when those projects ship a consumer type. Each live instance can have its own override in ai_context.consumers.

Agents are one consumer type. They still get loop-aware injection and Debug / Explore links. Automators and other types do not.

Automator IDs use the canonical form automator:{ai_automator id}. Listing names are the automator label prefixed with the bundle label (for example Blog Content Default) unless the label already starts with it. Push defaults off. Matching requires the ai_automator:id:{id} request tag. AI core does not emit that tag yet. A temporary internal subscriber adds it when entity type, bundle, and field uniquely identify one automator, or when the clicked widget action UUID maps to one automator on that field. The same click also skips the other automators on that field when the clicked automator is allowed to push, so only the clicked prompt runs. Direct or cron runs on a shared field still decline. Entity-dependent scopes need entity_context on the chat input. Enable debug logging to see declined versus push_disabled versus pushed in Recent log messages. The Usage tab only records a successful push. Multi-value fields run one chat call per delta, so context can be selected and billed N times. Use the per-consumer token limit to cap that.

Accessing consumer settings

  1. Go to /admin/config/ai/context/settings/consumers and click Configure context
  2. For an agent, open the agent edit form at /admin/config/ai/tools-automation/agents, expand Context Control Center, and follow the link

The shared editor is at /admin/config/ai/context/settings/consumers/{consumer_id}/edit. Agent IDs use the canonical form agent:{agent_id}. The colon may appear literally or encoded as %3A in a URL; both resolve.

Consumer types

Consumer Types at /admin/config/ai/context/settings/consumer-types lists plugins. Each type has a status column and an Edit form for the type-wide Enable this consumer type flag. There are no inline toggles on the listing. Leftover ai_context.consumer_type_settings.{type} objects whose plugin is gone appear as stale rows. Use Remove configuration for those. That deletes the type settings object only; leftover instance rows stay on Consumers.

Disabling the Agent type turns off automatic push for every agent, including agents with no saved override. Pull-based context tools keep working. The listing then shows Off (type disabled). A type that cannot work on this site shows Unavailable on the type listing and Off (type unavailable) on the consumers listing.

See Consumer type API if you are implementing a type.

Configuration options

Push context automatically

Controls whether ranked context is pushed into this consumer. Enabled by default for agents.

When enabled, context is ranked and pushed within the global-item and token limits.

When disabled, automatic push does not run. Scope subscriptions and inclusion overrides still apply to pull-based context tools. GetRelevantAiContextItems and ListAiContextItems inherit the running agent ID when omitted.

See Events for how this interacts with BuildSystemPromptEvent.

Scope subscriptions

Consumers can subscribe to scope values to prioritize matching items. A subscription match is a ranking signal, not a delivery guarantee.

Subscriptions are available for scopes that support them. Some scopes -- like Global, Languages, Roles, and Specific Entities -- do not use subscriptions because they filter or match automatically based on context.

See Scopes and Context Selection. Entity-dependent scopes need the request entity or page path; see Page and entity context.

Always include

Items that should receive priority for this consumer, even when they do not match Languages, Site Sections, Entity Types, Taxonomy Terms, or Roles. They must still be published and visible. The token limit can still shorten or omit them.

Never include

Items that must not be used for this consumer, even if another rule would include them.

Context limits and selection mode

Optional overrides of the site-wide limits:

  • Max global context items
  • Max tokens
  • Context selection mode

Selection mode is a nested ladder. Hard filters apply in every mode.

  • Site default — follow ai_context.settings:selection_mode. If that setting changes later, this consumer changes with it. This is the radio default for agents with no stored mode.
  • Minimal — global items, always-include, Specific Entities matches, and strict scope subscription matches. New non-agent consumers default this radio to Minimal so the first save writes that mode.
  • Relevant — Minimal, plus items that Languages, Site Sections, Entity Types, or Taxonomy Terms positively match.
  • Broad — Relevant, plus remaining published context, ordered by Priority, until the token budget is used.

An unset stored mode still follows the site default at runtime (relevant unless you changed General settings). That is unchanged from 1.0. The radio default above only affects what the first save writes.

If there are no scope subscriptions, the editor warns while Minimal is in effect.

Automatic injection never widens a consumer's stored mode. getRenderedContext() and getResult() may pass a mode; that is caller opt-in. See API stability.

Loop-aware context injection

Shown only for the Agent type. When enabled, context is pushed only on loop 0.

See Events.

How context selection works

When a consumer runs, the same pipeline as Context Selection runs. Agent-backed requests without a stored mode use the site-wide default.

Consumers listing

/admin/config/ai/context/settings/consumers lists live instances (agents first, then other types by label) and any stale override rows. Stale means a saved consumer_id whose type or instance is gone (config import leftover, uninstalled type). Deleting an agent already removes its row. Use Remove configuration for leftovers.

Search filters the table and announces the visible count.