Skip to main content

tandem_firebase_ai 0.2.0 copy "tandem_firebase_ai: ^0.2.0" to clipboard
tandem_firebase_ai: ^0.2.0 copied to clipboard

Add an AI agent to Flutter screens with Tandem and Firebase AI Logic, without an agent backend. Gemini reads what a screen lists and proposes calls of its methods.

example/example.md

The Firebase order example uses an existing Tandem screen. Configure Firebase and App Check, then create one connection outside build:

  final connection = FirebaseConnection(
    firebase: FirebaseAI.googleAI(),
    model: model,
    instructions:
        'Help the user prepare their order. '
        'Describe the result after each change. '
        'Only place an order when the user asks you to.',
  );

Pass it to TandemScope.connected. The scope still reads the same surface and uses the same approval UI:

      child: TandemScope.connected(
        surface: (context) => context.read<OrderCubit>(),
        connection: connection,
        approvals: const .fromState(),

The screen's methods are the model's tools. Tandem sends their results back to the model after execution or a user decision. The app supplies the chat through the scope's child.

1
likes
160
points
111
downloads

Documentation

API reference

Publisher

verified publisherleancode.co

Weekly Downloads

Add an AI agent to Flutter screens with Tandem and Firebase AI Logic, without an agent backend. Gemini reads what a screen lists and proposes calls of its methods.

Homepage
Repository (GitHub)
View/report issues

Topics

#firebase #generative-ai #agent #genui #function-calling

License

Apache-2.0 (license)

Dependencies

firebase_ai, http, tandem, uuid

More

Packages that depend on tandem_firebase_ai