After Framework

after_ai

AI capability platform: purpose, dependencies, key APIs and example for after_ai.

Docs version: supercore main · packages 1.0.0

PurposeLink to this section: Purpose

AI capability platform

A modular AI layer: products select an AfterAiProfile that enables capabilities. Calling a disabled capability throws. Every capability ships with a mock adapter.

DependenciesLink to this section: Dependencies

after_ecosystemafter_aiafter_consumerafter_enterpriseafter_firebaseafter_coreafter_design_system
Depends on
after_core
Used by
No package depends on it
Notable third-party dependencies
flutter_riverpoduuid

Key APIsLink to this section: Key APIs

  • AfterAiPlatform
  • AfterAiProfile
  • AfterAiCapability
  • AfterAiCapabilityDisabledException
  • afterAiProfileProvider
  • afterAiPlatformProvider
  • AfterToolCallingAi
  • AfterAiPluginRegistry

ExampleLink to this section: Example

dart
// after_framework.dart
afterAiProfileProvider.overrideWithValue(AfterAiProfile.superGarage),

// feature code
final ai = ref.watch(afterAiPlatformProvider);
if (ai.canChat) {
  final reply = await ai.chat(message: input);
}

Source supercore/packages/after_ai/README.md (opens in a new tab)