Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Vertex AI API

Hello, im building a help chat using agent builder.

Im using flutter as front end and firebase as backend. As a POC I simply used Gemini with specific instructions hardcoded in the client side. Now I built a simple agent using Agent Builder and I would like to know if there is a way to still use the vertex ai sdk to use the tuned model. 

vertex sdk documentation: https://firebase.google.com/docs/vertex-ai/get-started?platform=flutter&hl=es-419

Thanks in advance for any help 🙂

0 1 505
1 REPLY 1

Hi @alber0077,

Welcome to the Google Cloud Community!

Yes, you can use the Vertex AI SDK within your Flutter application, even when you’re working with an Agent Builder-created agent. Here are some approaches you can consider to achieve this:

  • Firebase and Vertex AI Setup: To use the Vertex AI SDK with your Agent Builder agent in Flutter, you must first: configure Firebase, follow the Firebase Vertex AI SDK setup instructions from the documentation you linked, enable the Vertex AI API in your Google Cloud Project, and grant the appropriate permissions to your Firebase project for Vertex AI access.
  • Identify the Agent Endpoint : In the Google Cloud Console, navigate to the Vertex AI Conversation section, find your Agent Builder-created agent, and obtain the agent's endpoint or resource name, which is crucial for making API calls.
  • Use the Vertex AI SDK in Flutter: Import the necessary Vertex AI packages into your Flutter code, then use the predict method to send requests to your agent's endpoint by constructing a request payload with the user's query, and finally, parse the response to retrieve the agent's reply.

In addition, you may refer to this Google Cloud Skill Boost course about Integrate an AI Agent with a Flutter App Using Vertex AI Agent Builder for your reference.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help