Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Search API attachments 10.0.13 — Minor update available for module search_api_attachments (10.0.13). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Mismatched entity and/or field definitions 1.2.1 — Minor update available for module meaofd (1.2.1). Release: Lupus Custom Elements Renderer 2.8.1 — Minor update available for module lupus_ce_renderer (2.8.1). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

This module provides a secure connection layer for Drupal sites to interact with a central services platform, handling authentication, AI requests, notifications, and essential front-end components for the Central Connect AI suite. It acts as a foundational platform for other modules within the suite, ensuring a unified and protected communication channel.

Every module of the Central Connect AI suite needs a connection to the central that runs the AI and holds the licences, a way to tell people what just happened, and a header that looks the same everywhere. Central Connect AI SDK is that shared layer for Drupal 10.3 and 11: no sibling keeps its own credentials or bell.

The day you enable it, your site gains a settings page with a Connect button, a notification bell, a phone-first app shell, and a toolkit of icons, modals, toasts and design tokens. No credentials exist until you connect, from the settings form or the account modal.

What you get

  • One connection, two ways to make it. SdkConnection keeps the instance id and OAuth2 credentials in State for every sibling. Press Connect (the central proves domain ownership through /.well-known/tangram-install.txt first) or register or sign in from the account modal, also a block.
  • A notification centre. A bell and inbox, a ccai_notification entity only its recipient can read, and per-user in-app, email and browser preferences; siblings add types as plugins.
  • A phone-first app shell. A bottom tab bar on a phone or a left rail on a desktop, built from what the user may access, plus an account page (at /ccai/cuenta) with avatar upload.
  • The AI meter and cost modal. A meter in the header shows how much of the month's AI allowance is spent; the modal sets the limit, toggles each system's AI, picks its model and reads the balance.
  • An AI gateway client, no provider key on the site. AiGatewayClient relays an operation and its messages to the central, which runs the model and meters the cost; failures carry a typed reason such as credit_exhausted.
  • An entitlements resolver. EntitlementsClient reports tier, feature keys and limits, replays the last good answer for 24 hours during an outage and otherwise returns the free set, so a gate stays closed.
  • A hardened transport and a shared front end. Bearer tokens live in a private cache bin and every outbound origin passes Ssrf::safeOrigin(); the front end ships as libraries, components, a ccai_icon() Twig function over bundled Phosphor icons and a Spanish translation.

How it works

One central, many sites, one connection per site. Each site gets its own OAuth2 client credentials and talks to the central through this module only; consumer modules ask for a connection, an AI call or an entitlement and never handle a client secret or a bearer token themselves.

Everything starts at the settings form (/admin/config/services/central-connect-ai-sdk): Connect, Reconnect and Disconnect, plus a status-report warning while unconnected. The base URL ships pointing at the sponsor's central; change it on that form or in settings.php.

Free, and what the optional service adds

Most of the module runs with no network at all: the connection form, the notification centre with every channel for what your own modules raise, the app shell, the icons and every front-end library. The cost modal still opens, with a local snapshot and a Connect to the central call to action.

A connected central adds every authenticated call, AI execution, entitlements (tier, feature keys, free credit, seats), the AI cost snapshot, prepaid balance and recharges, the services catalogue with its subscriptions and trials, the suggestions feed and the five shipped notification types.

A provider operates the central: Suscripciones Tangram by Tangram Consulting is the reference one, and a provider exposing the same API can serve its own sites, although the account modal still carries the reference brand and links today. You connect explicitly and nothing is provisioned before that; purchases happen on the central's checkout page, never inside Drupal. The SDK enforces nothing itself: a locked feature shows a Premium pill or a card with a next step, never a broken screen. ccai_premium_override in settings.php forces the answer, for development and testing only.

Use cases

  • An agency with several client sites connects each one once; the sibling modules share that connection, cost limit and bell.
  • A support operator on a phone works from the app shell, notifications one tap away.
  • A developer writing a new suite module injects AiGatewayInterface and EntitlementProviderInterface and ships a CcaiNotificationType plugin.

Getting started

  1. Run composer require drupal/central_connect_ai_sdk and enable the module.
  2. Go to Administration » Configuration » Web services » Central Connect AI SDK (/admin/config/services/central-connect-ai-sdk), check the base URL and press Connect, or let a trusted operator sign in from the account modal.
  3. On the Permissions tab (/admin/people/permissions/module/central_connect_ai_sdk) grant:
    • View own notifications for the bell.
    • View the AI cost/usage breakdown and Manage the AI cost limit and system toggles for the spend.
    • Use the mobile app shell to operator roles.
    • Connect the site to the central (self-service) to trusted operators only.
  4. Ask each user to pick their channels at /ccai/notifications/preferences, then install the siblings you need.

Requirements

  • Drupal 11.1 or newer, and the PHP version it requires (8.3); composer require drupal/central_connect_ai_sdk.
  • No contributed module is required. With core Image and File enabled, the module creates the user_picture field for the avatar; Symfony Mailer, if present, takes over the email channel.
  • A central implementing the same API for every remote feature. No AI provider key is needed by this module: AI calls go through the central.

Privacy and security

  • Only the base URL is exported configuration: instance id, client credentials and health pull token live in State, bearer tokens in the private bin cache.central_connect_ai_sdk, channel preferences per user in user.data.
  • The proxy endpoints that write to the central (cost limits and toggles, checkout and cancellation) and the avatar upload need their permission plus the CSRF request header token; the account, cost, billing and checkout proxies are flood-limited per user and IP address.
  • Connecting sends the site's instance id, domain and environment; the account modal sends the email, password and name you type; AI calls send the consumer module's messages. Before that, the only outbound request is an anonymous read of the public services catalogue when someone opens the cost modal or a premium card. The public challenge file carries only a random instance id.
  • The module never calls an AI provider or a payment processor: the central runs the models and hosts its payment pages on Stripe, and as an external service it is not covered by drupal.org security advisories.
  • On install, non-administrator roles holding Act as aiticketchat support receive the app-shell permission and the administration theme.

Part of the Central Connect AI suite

The suite is a support, assistance and growth toolkit whose AI work happens on a central you connect to; every sibling depends on this module:

  • AI Ticket Chat sends its AI calls through the gateway and its ticket notifications to the bell.
  • Multi-Role AI Chatbot relays its default provider's replies through the gateway and reads its licence and seat cap here.
  • Web Health Status shows the shared header, bell and AI meter on its dashboard; its credentials moved here in update 10002.
  • Sales Pipeline AI runs its AI helpers through the gateway and checks its subscription here.
  • Booking Calendar and Forms & Ads Manager use the header, icons, bell and AI meter; neither has a premium tier.

Similar projects and how this one differs

  • AI calls the models directly with keys stored on the site; this SDK holds no provider key and relays every call to one provider-operated central.
  • OAuth2 Client offers configurable clients for several grant types; the SDK is one fixed client-credentials flow with SSRF validation and a private token bin.
  • DANSE is a general subscription and notification framework; the SDK's centre is a small plugin-typed inbox for the suite, with no subscriptions.
  • UI Icons offers pluggable icon packs for site builders; the SDK bundles one Phosphor set behind ccai_icon() for its own suite.

Development

Parts of this module were written with the assistance of AI-based coding tools, as required by the policy on the use of AI when contributing to Drupal. All the code has been read, corrected, tested and is maintained by the human maintainer listed below, who takes full responsibility for it.

Maintainers and sponsor

Maintained by pedroromán. Development is sponsored by Tangram Consulting, which also operates the reference central. Issues, ideas and contributions are welcome in the issue queue.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jun 2026
Latest release
3 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.x-dev Dev 10–11 Jun 28, 2026