PPactDocs
Administration

AI features

The AI Hub — every AI capability in Pact overlaid with your tenant's live configuration, data-sharing mode, and recent usage.

AI features

The AI Hub is the single panel that shows every place Pact can use AI and, for each one, your tenant's live state: is it configured, which data-sharing mode is active, and how many times it was called in the last 24 hours. It is the map an admin uses to understand and govern the AI surface.

It lives at Admin → AI → Features and is backed by core.ai.catalog + core.ai.feature_registry, exposed through api/routes/ai_features.py.

Live inventory, live state

The Hub is not a static list. It reads the capability catalog and overlays each feature with this tenant's real configuration, effective data-sharing mode, and last-24h call count from the ai_usage ledger.

Two surfaces, two audiences

  • AI HubGET /v1/admin/ai/features (admin/owner). Every AI capability grouped by category, each annotated with configured/not, its resolved data-sharing mode, and recent call volume.
  • Sparkle gateGET /v1/ai/features/availability (any authenticated user). The cheap read behind the ✨ affordance on every page: is AI configured for this tenant, and which features has the tenant explicitly disabled so the sparkle should hide. One query per page, shared across every sparkle via a React Query cache.

Both are tenant-scoped from the auth context (never the request body) and read-only.

Status precedence

A feature's displayed data-sharing status follows the same resolver as the data-sharing controls:

code
per-feature override  →  tenant default  →  global default (redacted)

So the Hub, the sparkle, and the enforcement layer never disagree about what a feature will send.

What the Hub feeds from

  • core.ai.catalog — the capability catalog (what features exist, by category).
  • core.ai.feature_registry — the per-feature registry driving detail views.
  • core.ai.data_sharing — the effective redaction mode per feature.
  • core.ai.cost_recommendations — per-feature cost signal, so you can see which capabilities dominate spend.
  • core.ai.client.is_configured_for_tenant — whether AI is set up at all.

Turning a feature off

Setting a feature's data-sharing mode to disabled both stops it from calling the model (it falls back to its heuristic) and hides its sparkle for every user in the tenant. That single switch is the intended off-ramp.