Inspiration

I realized that most people still waste hours every week on repetitive data chores: cleaning messy spreadsheets, reconciling files, aggregating numbers, and waiting on reports. I've built automation scripts before (bots that watch the screen and act on their own), and I wanted to take that logic further. Instead of a script that follows one fixed path, I wanted a true AI Agent that understands a goal, makes its own decisions, and executes the whole data workflow autonomously using Google Gemini.

What it does

Riemann Agent is an asynchronous autonomous data-engineering agent. You point it at a dataset — or a whole folder of messy files — and give one high-level goal (e.g., "clean these, keep paying customers, and rank regions by revenue"). The agent then profiles the real schema, plans a pipeline of transforms, executes it in the background on Google Cloud, and returns the result plus a full reasoning trace. It's not a chatbot — it's a digital worker that takes real action, cleans and models the data, and writes the report on its own.

How we built it

We used Gemini 3.7 Flash via Vertex AI as the brain, driven through the Google GenAI SDK with native function calling — the model decides which tools to call and in what order; the human never designs the pipeline. The agent runs on Google Cloud Run (an API service plus an async worker), so it executes long tasks without anyone keeping a browser open. Jobs are dispatched asynchronously through Pub/Sub (the API returns 202 instantly; a private worker consumes the job). State, runs and memory persist in Cloud SQL, with Secret Manager and Artifact Registry completing the stack. The agent mimics a human operator: observe the data, plan the next step, execute, verify, then move on.

Challenges we ran into

The hardest part was shifting from a "chat" mindset to a "task" mindset. An AI that talks is easy; an AI that reliably executes multi-step workflows without crashing is hard. We solved asynchronous execution (the API hands the job to Pub/Sub and a Cloud Run worker picks it up), made every transform row-preserving so the user's data is never silently dropped, and added a numeric-grounding guard so the agent never reports a figure that isn't supported by the evidence. Keeping Google Cloud costs near zero during testing (scale-to-zero, tiny instances) was also a constant focus.

Accomplishments that we're proud of

The agent runs fully in the background and adapts to data it has never seen. Point it at a folder of ten messy datasets, and it triages each one by content, decides what needs doing, cleans them, trains models where a real target exists, and produces per-dataset reports — with zero clicks. If a file's format shifts, it doesn't crash; it adapts and continues. Seeing it finish a complex, multi-dataset job without a human touching the keyboard was the biggest win.

What we learned

We learned how to design robust agent loops with the GenAI SDK, how to structure prompts for tool-use (not just conversation), and how to deploy stateless AI logic to Cloud Run while keeping state and context safe in Cloud SQL — with Vertex authenticated by the service account, so no API key ever lives in the cloud.

What's next for Riemann Agent

Next, we're deepening the enterprise spine: a full Agent Registry to catalogue and version every capability, and expanding Model Armour-style guardrails (we already mask PII before anything reaches the model) to guarantee zero prompt injection and data leakage.

Built With

Share this project:

Updates

Submission history