Inspiration

In a world where digital boundaries are disappearing, linguistic barriers remain a significant hurdle for global collaboration. We were inspired to build the Translate AI Agent to prove that language translation could be more than just a static tool—it could be a context-aware, stateful interaction. By leveraging the latest breakthroughs in AI, we aimed to create a bridge that understands not just words, but intent.

What it does

Translate AI Agent is a sophisticated, real-time translation platform. It allows users to instantly translate complex text into numerous languages, such as Sinhala, with high semantic accuracy. Powered by the Gemini 2.5 Flash model, the agent handles nuances that traditional translators miss. Every translation is securely logged into a private PostgreSQL 15 database, creating a durable history that can be used for audit trails or personalized user experiences.

How we built it

We architected a robust cloud-native solution using:

AI Engine: Integrated the next-generation Gemini 2.5 Flash via Vertex AI for rapid, high-fidelity linguistic processing.

Compute: Deployed a FastAPI backend containerized with Docker on Google Cloud Run for serverless efficiency.

Data Persistence: Managed by Cloud SQL (Instance: my-cloudsql-instance-test2) running Postgres 15.

Secure Networking: Established a dedicated VPC Network (easy-cloudsql-vpc) using Private IP (10.94.0.5) connectivity to ensure that sensitive database traffic never traverses the public internet.

Challenges we ran into

The primary challenge was orchestrating the "Secure Hybrid Egress." We had to carefully configure the Cloud Run service to utilize Direct VPC Egress—specifically setting it to private-ranges-only—to allow the agent to talk to the private database via the VPC while simultaneously reaching the public Vertex AI endpoints for the Gemini 2.5 model. Overcoming 404 and 503 errors during this networking setup was a major technical milestone.

Accomplishments that we're proud of

Cutting-Edge Integration: Successfully implementing the Gemini 2.5 Flash model within a production-grade environment.

Hardened Security: Building a "Zero-Exposure" database architecture where the Cloud SQL instance is only accessible through internal private IPs.

Full-Stack Orchestration: Achieving a seamless flow from a customized Frontend UI to a containerized Backend, through a private network, and into the AI brain.

What we learned

We mastered the intricacies of GCP Networking, specifically the interaction between Cloud Run, VPCs, and Cloud SQL. We also learned how to manage IAM permissions at a granular level to ensure our Service Account had the exact "Vertex AI User" roles needed to unlock the power of the Gemini 2.5 model garden.

What's next for Translate AI Agent

With the Gemini 2.5 foundation in place, we plan to:

Multimodal Input: Expand the agent to support image-to-text translation (e.g., translating signs from a photo).

History Dashboard: Develop a frontend interface to query the Postgres 15 logs for user-specific translation trends.

Edge Deployment: Exploring the use of lighter versions of the model for mobile-first, offline translation experiences.

Share this project:

Updates