<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Elia Secchi on Medium]]></title>
        <description><![CDATA[Stories by Elia Secchi on Medium]]></description>
        <link>https://medium.com/@eliasecchig?source=rss-523d4d51cbb1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WEhqAZVCLIqlMUY2</url>
            <title>Stories by Elia Secchi on Medium</title>
            <link>https://medium.com/@eliasecchig?source=rss-523d4d51cbb1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 08:13:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eliasecchig/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Take a Claude Agent SDK agent from install to deploy with Agents CLI]]></title>
            <link>https://medium.com/google-cloud/take-a-claude-agent-sdk-agent-from-install-to-deploy-with-agents-cli-f0a52e99cbc7?source=rss-523d4d51cbb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0a52e99cbc7</guid>
            <category><![CDATA[cli-agents]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Elia Secchi]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 00:00:49 GMT</pubDate>
            <atom:updated>2026-11-10T04:04:48.196Z</atom:updated>
            <content:encoded><![CDATA[<h3>How the Claude extension in Agents CLI takes a Claude Agent SDK agent from install to a validated Cloud Run deploy, with sessions, tracing and eval set up for you.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kmNin-8ZczWq9V9d.png" /></figure><p>A Claude Agent SDK agent is a few lines of Python. Running it for real users takes more than the agent: somewhere to store each conversation so it isn’t lost when the server restarts, traces that show what the agent did at each step when something goes wrong, evals (tests for agent answers) to run before each change, and a secure deploy. That’s usually the part teams build by hand.</p><p><a href="https://github.com/google/agents-cli">Agents CLI</a> already handles these for agents built on the Agent Development Kit (ADK). Since v1.12.0, a first-party extension does the same for Claude Agent SDK agents: you keep writing a ClaudeAgentOptions, and you get the same create, run, eval, and deploy commands as an ADK agent. We took one agent from install to a validated deploy on v1.13.0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ONCyDWKVb9olzcnn.png" /></figure><p>Figure 1. You write app/agent.py, and the template wires in sessions, traces, logs, metrics, and eval.</p><h3>Step 1: Install and create</h3><p>One command installs Agents CLI and its skills for your coding agent:</p><pre>uvx google-agents-cli setup</pre><p>Then create a project from the Claude template, with Cloud Run as the target and Cloud SQL for sessions, and send it a prompt. run calls Claude in process through the SDK, and the reply ends with a session ID you can resume:</p><pre>$ agents-cli create claude-agent \<br>    --agent google/agents-cli/extensions/claude/template@v1.13.0 \<br>    -d cloud_run --session-type cloud_sql -y<br>...<br>✅ Success! Your agent project is ready.<br>...<br>$ cd claude-agent &amp;&amp; agents-cli install<br>...<br>$ agents-cli run &quot;what&#39;s the weather in San Francisco?&quot;<br>running &#39;run&#39; via extension &#39;claude&#39; (project scope)<br>...<br>The weather in San Francisco is currently **60 degrees and foggy**. Typical San Francisco weather! You might want to bring a jacket if you&#39;re heading outside.</pre><pre>Session: 84a0699d5de54c748333b24bf00b3b14<br>  Resume with: agents-cli run &quot;&lt;message&gt;&quot; --session-id 84a0699d5de54c748333b24bf00b3b14</pre><p>The project’s app/agent.py is plain Claude Agent SDK code: a @tool for the weather, an in-process Model Context Protocol (MCP) server that exposes the tool to Claude, and options that switch off Claude Code&#39;s built-in tools (such as running shell commands) so the agent can only call what you allow.</p><pre>root_agent = ClaudeAgentOptions(<br>    model=&quot;claude-haiku-4-5&quot;,<br>    system_prompt=&quot;You are Skye, a helpful assistant. Use get_weather for weather questions.&quot;,<br>    mcp_servers={&quot;weather&quot;: weather_server},<br>    tools=[],<br>    allowed_tools=[&quot;mcp__weather__get_weather&quot;],<br>    max_turns=10,<br>)</pre><p>The model has to be enabled in Model Garden, the Google Cloud page where you turn on models for your project. create writes the project to .env as GOOGLE_CLOUD_PROJECT, but ANTHROPIC_VERTEX_PROJECT_ID wins if your shell sets it.</p><h3>Step 2: Evaluate it like any other agent</h3><p>An eval has two steps. eval generate runs the agent on a set of test prompts and saves its answers, and eval grade has a model score those answers. The extension replaces only the first step and saves the answers in the same format ADK agents use, so eval grade works unchanged. Both test cases, greeting and weather_lookup, scored 5 out of 5:</p><pre>$ agents-cli eval generate \<br>    --dataset tests/eval/datasets/basic-dataset.json \<br>    -o tests/eval/output/<br>running &#39;eval generate&#39; via extension &#39;claude&#39; (project scope)<br>[claude-generate] wrote tests/eval/output/eval_dataset_20261109_110946.json<br>$ agents-cli eval grade \<br>    --traces tests/eval/output/eval_dataset_20261109_110946.json \<br>    --config tests/eval/eval_config.yaml<br>...<br>Evaluation Summary</pre><pre>custom_response_quality:<br>  num_cases_total: 2<br>  num_cases_valid: 2<br>  num_cases_error: 0<br>  mean_score: 5.0000<br>  stdev_score: 0.0000</pre><pre>RESULT: PASS (no thresholds set; add &#39;thresholds&#39; to the eval config or pass --fail-under to gate on scores)</pre><p>The template leaves thresholds: commented out in tests/eval/eval_config.yaml, since only you know your bar. Once you set it, eval grade and eval run exit 1 when a score falls below it (<a href="https://github.com/google/agents-cli/blob/main/RELEASE_NOTES.md">v1.13.0</a>), so the same command can gate CI.</p><h3>Step 3: See what production adds</h3><p>agents-cli infra single-project uses Terraform, a tool that describes cloud resources as code, to plan everything the agent needs in your project: the Cloud Run service, the database for sessions, and the logging and tracing setup. Without --apply, it only prints the plan, 42 resources in all:</p><pre>$ agents-cli infra single-project --project my-project<br>...<br>  # google_cloud_run_v2_service.app will be created<br>...<br>  # google_logging_project_sink.genai_logs_to_bq will be created<br>...<br>  # google_project_iam_member.agent_identity_roles[&quot;roles/cloudtrace.agent&quot;] will be created<br>...<br>  # google_project_iam_member.agent_identity_roles[&quot;roles/logging.logWriter&quot;] will be created<br>...<br>  # google_project_iam_member.agent_identity_roles[&quot;roles/monitoring.metricWriter&quot;] will be created<br>...<br>  # google_sql_database_instance.session_db will be created<br>...<br>Plan: 42 to add, 0 to change, 0 to destroy.</pre><p>Apply it once before the first deploy. That creates the Cloud SQL instance, connects the Cloud Run service to it, and gives the agent’s identity the Cloud Trace role. We didn’t apply it for this post:</p><pre># Not run for this post: creates the resources in the plan above.<br>agents-cli infra single-project --apply --project my-project</pre><p>Think of the template as a chassis: you bring the engine, and the wiring is already there.</p><ul><li><strong>Sessions:</strong> with --session-type cloud_sql and the infra applied, transcripts go to Cloud SQL, so a conversation can resume on another instance or after a restart. Without the database, they stay on the instance.</li><li><strong>Traces:</strong> once the infra grants the Cloud Trace permission, every turn and every tool call is recorded as a span (one timed step), and you can open the whole turn as one trace in Cloud Trace.</li><li><strong>Logs and metrics:</strong> logs go to Cloud Logging tagged with the turn’s trace, and turn duration and token usage go to Cloud Monitoring. BigQuery Agent Analytics is optional.</li></ul><h3>Step 4: Deploy</h3><p>agents-cli deploy builds your code and deploys it to Cloud Run with gcloud beta run deploy --source .. With --dry-run, it first checks that your project has the right APIs turned on and that you have the permissions to deploy, without changing anything:</p><pre>$ agents-cli deploy --dry-run --project my-project<br>...<br>🔎 Validating the deployment (no resources are changed)...<br>  ...<br>  ✅ APIs enabled: run.googleapis.com, artifactregistry.googleapis.com, cloudbuild.googleapis.com<br>  ✅ Target service: creates a new service named &#39;claude-agent&#39;<br>  ✅ IAM permissions: all 4 permissions granted<br>  ...<br>  Would run: gcloud beta run deploy claude-agent --project my-project --region us-east1 --source . --memory 4Gi --cpu 1 --min-instances 0 --max-instances 10 --concurrency 8 --no-allow-unauthenticated --no-cpu-throttling --functional-type agent --identity-type agent-identity --update-env-vars &#39;...&#39; --update-labels &#39;...&#39;</pre><p>--no-allow-unauthenticated keeps the service private, so only callers with access can reach it. --identity-type agent-identity gives the agent its own identity in Google Cloud, with only the permissions deploy grants it, so it doesn&#39;t borrow your account or a shared one. That is the default for new projects since v1.13.0.</p><p>Once deployed, the agent speaks the Agent2Agent (A2A) protocol, a standard way for agents and apps to call each other, and you can reach it from your terminal:</p><pre>agents-cli run --url https://&lt;service-url&gt; --mode a2a --app-name app &quot;hello&quot;</pre><h3>What to take away</h3><p>Of the commands we ran, the extension handled only run and eval generate. eval grade, infra, and deploy ran exactly as they do for an ADK agent. Apply the infra before the first deploy, because that step creates the session database.</p><p>To bring an existing agent over, run scaffold enhance. It writes the template into your project and moves the files it replaces to .agents-cli-original/. Then move your ClaudeAgentOptions into app/agent.py:</p><pre>agents-cli scaffold enhance google/agents-cli/extensions/claude/template@v1.13.0 -d cloud_run</pre><p>To start fresh, install Agents CLI and follow Step 1:</p><pre>uvx google-agents-cli setup</pre><p>The <a href="https://google.github.io/agents-cli/guide/extensions/first-party/">extension guide</a> covers migration step by step, and Agents CLI is on <a href="https://github.com/google/agents-cli">GitHub</a>.</p><p><em>Originally published at </em><a href="https://eliasecchig.github.io/blog/2026-11-09-claude-agent-sdk/"><em>https://eliasecchig.github.io/blog/2026-11-09-claude-agent-sdk/</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0a52e99cbc7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/take-a-claude-agent-sdk-agent-from-install-to-deploy-with-agents-cli-f0a52e99cbc7">Take a Claude Agent SDK agent from install to deploy with Agents CLI</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[As agents write the code, defining good becomes the job]]></title>
            <link>https://medium.com/google-cloud/as-agents-write-the-code-defining-good-becomes-the-job-e47c7463acfc?source=rss-523d4d51cbb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e47c7463acfc</guid>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[cli-agents]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[google-adk]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Elia Secchi]]></dc:creator>
            <pubDate>Wed, 19 Aug 2026 16:15:49 GMT</pubDate>
            <atom:updated>2026-08-20T01:01:29.179Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>7 rules for self-improving agent loops every AI engineer should know</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I5IzefExVgf3AGRV.jpg" /></figure><p>Every advance in software tooling moves human effort up a level of abstraction. Assembly gave way to high-level languages, which gave way to frameworks. Each step let developers spend less time on <em>how</em> a machine executes and more on <em>what</em> it should build.</p><p>We are crossing that threshold again. Coding agents can now build and refine other agents — writing instructions, testing performance, fixing flaws, and repeating the cycle. Automating this self-improving loop is the core of <a href="http://goo.gle/agents-cli">agents-cli</a>, our open-source toolkit for Google Cloud.</p><p>But the loop has a blind spot: it cannot define what “better” means.</p><p>Give it a shallow metric, and it will happily optimize your agent into something that scores well but fails in production — reporting total success the entire time.</p><p>The metric is the new code. Defining what “good” means, and measuring it reliably enough for a loop to target, is where engineering judgment now lives. This article covers how the loop runs, where human oversight is essential, and seven rules for keeping your evaluations honest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EKUFc0-jfcA2vdpH.jpg" /></figure><h3>The metric is what you now author</h3><p>Software teams have always known you get what you measure. The loop makes it literal. It improves whatever number you give it, and nothing inside it can tell the difference between a target that reflects what you want and one that merely scores well.</p><p>We kept relearning this while building the tool. The metric sits upstream of the prompt, the code, and the behavior. The loop will reshape all three to fit whatever it rewards.</p><p>Every tooling advance has moved effort up a level. Assembly to compilers. Compilers to frameworks. This one moves it from the artifact to the standard.</p><p>Quality is specific, and it belongs to you</p><p>The definition of good that matters is rarely the one a public benchmark measures. It’s the refund policy. The escalation rule. The compliance line. The tone your customers recognize.</p><p>A general model does not know these things, and a general test will not check them.</p><p>Consider a support agent whose rule is to offer the retention path before confirming a cancellation. A model can follow that rule in its reasoning and still drop it from the final reply. We’ve watched agents fail in exactly this shape: internal state correct, right tool called, and the final message to the user echoing a stale value anyway. Nothing crashes. The output reads fine on a skim. The answer the user receives is wrong.</p><p><strong>Only an evaluation that grades the reply, not the reasoning, catches this.</strong> And no public metric knows your retention rule exists. So you define your own: a custom metric, `retention_offered`, that returns 0 or 1 and a one-line reason for the verdict. Written down, that definition is yours to own, version, and sharpen as new failures come in.</p><h3>The loop in practice</h3><p>agents-cli turns the measure-and-improve loop into a few commands, run over agents built with the Agent Development Kit (ADK). Install it into your coding agent:</p><pre>uvx google-agents-cli setup</pre><p>Then describe what you want measured.</p><p>Take the support agent from earlier. No public metric captures its retention rule, so you define your own: a custom metric, retention_offered, that returns 0 or 1 and a one-line reason for the verdict. That definition is the standard everything else is judged against.</p><p>The coding agent starts by running your agent over a set of cases to produce traces:</p><pre>agents-cli eval generate \<br>  --dataset tests/eval/datasets/cancellation_cases.json \<br>  -o artifacts/traces/</pre><p>The tempting shortcut at this point is to let the coding agent read its own output and decide whether it passed. An agent asked to judge its own reply grades it optimistically, and the failures that matter are exactly the kind it waves through.</p><p>Grading breaks that circularity. Every trace is scored against your metric, a standard the coding agent cannot move, so a fix is judged by something other than what proposed it:</p><pre>agents-cli eval grade \<br>  --traces artifacts/traces/ \<br>  --config tests/eval/eval_config.yaml</pre><p>Now the loop can improve on its own. Each failing case comes back with the metric’s own reason, and that reason is the direction for the next attempt. The coding agent reads it, edits the agent’s instructions, and re-runs. Then it compares the two runs to confirm the change helped without breaking anything else:</p><pre>agents-cli eval compare \<br>  artifacts/grade_results/results_baseline.json \<br>  artifacts/grade_results/results_after_fix.json</pre><p><strong>That cycle (propose a fix, grade it, revise from the reason) is the entire optimization.</strong> It runs unattended between your checkpoints: you set the target and hold the held-out set, and everything the loop needs to steer by is already in the metric you wrote.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q3bUeeZdSjH0ClZj.jpg" /></figure><h3>The 7 rules for self-improving loops</h3><p>Automating the loop was the easy part. The hard part was keeping humans in control of something designed to run without them. These seven rules are how, and they’re now built into the agents-cli skills themselves.</p><p><strong>1: Start with one case, not a suite.</strong> One failing case tells you what to fix next. Twenty tell you nothing. Expect five to ten iterations before it passes. That’s normal. Add the next case only once it holds.</p><p><strong>2: Make judges explain themselves.</strong> A number says you failed. The reason says what to change, and the reason is what the next iteration gets written from. Deterministic checks are exempt, since the assertion is its own explanation.</p><p><strong>3: Use code wherever the answer is deterministic.</strong> “Did it call the retention tool before confirming?” is a Python function. Exact, free, no judge variance. Save the judge for tone, completeness, whether an explanation holds up.</p><p><strong>4: Score behavior, not paths.</strong> An agent that geocodes before checking the weather isn’t wrong. Exact-match trajectories end up measuring how much the agent changed rather than how good it is.</p><p><strong>5: Treat a flaky case as a finding.</strong> A score that moves between identical runs means your agent is non-deterministic in a way you hadn’t noticed, or your judge is. Run the case a few times and see which one moves. Deleting it removes the evidence, not the behavior.</p><p><strong>6: Never let the proposer move the bar.</strong> A bar moves three ways: lowered threshold, edited expected output, quietly dropped case. All three look like an improving score. This is what the held-out slice is for. A real gain shows up there too. A gamed one doesn’t.</p><p><strong>7:Auto-optimize once, at the end.</strong> Prompt optimization is expensive and only fixes wording, never a missing tool call. Looping on it spends hours rediscovering what the failure reasons already said.</p><h3>It compounds over time</h3><p>The payoff grows over time. The eval set turns into a durable record of what your organization means by quality, running on demand in development and in CI on every change, always against one definition of good.</p><p>Past deployment, the same definition keeps working. In development you call it eval. In production you call it monitoring. It’s the same metric.</p><p>A deployed agent already exports its execution traces. With prompt-response logging, its prompts and replies land in BigQuery, so running your metric over that table is the same grading step applied to real traffic instead of a written dataset.</p><p><strong>Eval and observability turn out to be one loop sampled two ways.</strong> Over the cases you wrote, and over the conversations you didn’t.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W5ISi2jLllmf14--.jpg" /></figure><p>Every production exchange that goes wrong becomes a new case, graded by the same metric, guarding against that regression from then on. Treat each grade as a signal about direction rather than ground truth, and trust the movement between runs more than any single score.</p><h3>Get started today</h3><p>One rule sits above the other seven. The coding agent does the iterating. It writes the prompt, runs the agent, finds the gap, and closes it. What it cannot generate is the definition of good it optimizes toward. You should be in control of it.</p><p>Then start today with <a href="https://google.github.io/agents-cli/">agents-cli</a>, starting small and iterating:</p><pre>uvx google-agents-cli setup</pre><p>Pick one behavior your agent must get right. The retention rule. The compliance line. The thing you currently check by reading transcripts. Write it as a metric that returns pass or fail with a one-line reason. Add one failing case. Point your coding agent at it and let the loop run.</p><p>Your agent doesn’t have to be perfect, it has to be improvable!</p><p>Full docs at <a href="http://google.github.io/agents-cli">google.github.io/agents-cl</a>i</p><p>Authors: <a href="https://medium.com/u/5a7cdb63bae">Shubham Saboo</a> <a href="https://medium.com/u/523d4d51cbb1">Elia Secchi</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e47c7463acfc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/as-agents-write-the-code-defining-good-becomes-the-job-e47c7463acfc">As agents write the code, defining good becomes the job</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agentic RAG with BigQuery DataFrames and Agent Starter Pack]]></title>
            <link>https://medium.com/google-cloud/agentic-rag-with-bigquery-dataframes-and-agent-starter-pack-743553adf997?source=rss-523d4d51cbb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/743553adf997</guid>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Elia Secchi]]></dc:creator>
            <pubDate>Wed, 26 Mar 2025 10:41:14 GMT</pubDate>
            <atom:updated>2025-03-26T18:49:48.731Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<h4>Effortlessly Build Production-Ready RAG Pipelines on Massive Datasets Using Python</h4><blockquote>BigQuery DataFrames aka BigFrames is an open source Python library offered by Google. BigFrames scales Python data processing by transpiling common Python data science APIs to BigQuery SQL. You can read more about BigFrames in the <a href="https://cloud.google.com/python/docs/reference/bigframes/latest">official introduction</a> to BigFrames and can refer to the public <a href="https://github.com/googleapis/python-bigquery-dataframes">git repository</a> for BigFrames.</blockquote><h3>The Challenge: Building RAG Applications That Scale</h3><p>Traditional Retrieval Augmented Generation (RAG) implementations hit a wall when facing massive datasets. If you’ve tried to build production-ready RAG systems that handle terabytes or even hundreds of gigabytes of data, you know the struggle is real.</p><p>What if you could combine production-ready agent templates with BigQuery’s massive data processing capabilities — all using familiar Python code?</p><h3>The Solution: Agent Starter Pack + BigFrames</h3><p>This powerful combination offers a complete approach to building and deploying data-intensive GenAI agents on Google Cloud, with <strong>zero data movement</strong> and seamless Vertex AI integration.</p><h3>🚀 Agent Starter Pack: Production-Ready Agents in Minutes</h3><p>The <a href="https://github.com/GoogleCloudPlatform/agent-starter-pack">Agent Starter Pack</a> is a collection of templates for building agents in Google Cloud. It provides everything you need to build production-grade GenAI agents — no more wrestling with infrastructure setup, deployment complexities, or monitoring.</p><p>Getting started is incredibly simple:</p><pre># Create and activate a Python virtual environment<br>python -m venv venv &amp;&amp; source venv/bin/activate<br><br># Install the agent starter pack<br>pip install agent-starter-pack<br><br># Create a new agent project with an agentic RAG template<br>agent-starter-pack create my-awesome-agent -a agentic_rag</pre><p>With those three commands, you have a fully functional agent project with frontend, backend, and deployment infrastructure.</p><h3>What makes the Agent Starter Pack powerful:</h3><ul><li><strong>Production-Ready Templates:</strong> Pre-built designs for ReAct, RAG, multi-agent systems, and multimodal agents</li><li><strong>Complete Solution:</strong> Includes deployment options, evaluation integration, monitoring, and data pipeline infrastructure</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlByNUR-msqXetbuR0eOsg.png" /><figcaption>End-to-end architecture for building scalable agentic RAG applications using the Agent Starter Pack with BigQuery DataFrames on Google Cloud.</figcaption></figure><h3>✨ Built-in Data Ingestion Pipeline for RAG</h3><p>One of the most powerful features of the Agent Starter Pack is its automated data ingestion pipeline. Whenever you create a project with the agentic_rag agent template (or add the — include-data-ingestion flag), a complete data pipeline is automatically included in your project.</p><p>This pipeline seamlessly handles:</p><ul><li>Loading data from various sources</li><li>Processing and chunking documents</li><li>Generating embeddings with Vertex AI</li><li>Storing processed data in Vertex AI Search</li><li>Scheduling periodic data updates</li></ul><p>All infrastructure requirements are defined in Terraform, making it simple to deploy and maintain. The included <em>data_ingestion/README.md</em> provides step-by-step instructions for getting started.</p><h3>✨ BigFrames: The Secret to Terabyte-Scale RAG</h3><p>The data ingestion pipeline leverages BigFrames, bringing pandas-like simplicity to BigQuery and revolutionizing how you process data for RAG:</p><ul><li><strong>Zero data movement:</strong> All processing stays within BigQuery, minimizing costs and complexity.</li><li><strong>Server-side Python execution:</strong> Use the familiar pandas API without data transfer headaches.</li><li><strong>Seamless Vertex AI integration:</strong> Generate embeddings at scale.</li><li><strong>Terabyte-Scale:</strong> process millions of documents without infrastructure headaches</li><li><strong>Automated and Production-ready:</strong> Build pipelines that automatically refresh your knowledge base.</li></ul><p>As an example, this is how you can read data from a BigQuery table and perform chunking for RAG if all the text can fit into memory:</p><pre>import bigframes.pandas as bpd<br><br>query = f&quot;&quot;&quot;<br>    SELECT<br>        doc_id,<br>        text,<br>   last_modified<br>    FROM `my_project.my_dataset.my_table`<br>&quot;&quot;&quot;<br><br># Read Table from BigQuery<br>df = bpd.read_gbq(query)<br><br># Split the text into chunks<br>df[&quot;text_chunk&quot;] = df[&quot;text&quot;].to_pandas().apply(my_split_function)<br><br># Explode the chunk list so that we get a row per chunk, ready for embedding<br>df = df.explode(&quot;text_chunk&quot;).reset_index(drop=True)</pre><p>Sometimes data is too large to run local processes when running custom Python functions. In fact, every time we convert a series or a DataFrame to pandas using to_pandas(), the data is loaded into memory.</p><p>To be able to run large datasets processes remotely, we can define a BigFrames <a href="https://cloud.google.com/bigquery/docs/samples/bigquery-dataframes-remote-function">remote function</a>:</p><pre>@bigframes.pandas.remote_function(packages=[&quot;langchain&quot;], reuse=True)<br>def chunk_text_udf(text: str) -&gt; str:<br>    return json.dumps(my_split_function(text))<br><br># Split the text into chunks<br>df[&quot;text_chunk&quot;] = df[&quot;text&quot;].apply(chunk_text_udf)<br><br># Explode the chunk list so that we get a row per chunk, ready for embedding<br>df = df.explode(&quot;text_chunk&quot;).reset_index(drop=True)</pre><p><em>This code has been adapted from the </em><a href="https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/use-cases/retrieval-augmented-generation/scalable_rag_with_bigframes.ipynb"><em>Scalable RAG with BigFrames</em></a><em> notebook on the Google Generative AI repo.</em></p><h3>Taking Your Agent to Production</h3><p>After creating your agent project with the commands above:</p><ol><li>Explore the generated code structure and readme files</li><li>Deploy the included data ingestion pipeline following the instructions in <em>data_ingestion/README.md</em></li><li>Test your agent locally, then follow the deployment instructions described in <em>deployment/README.md</em></li></ol><h3>Build Scalable GenAI Agents Now!</h3><p>The Agent Starter Pack templates, combined with BigFrames, offer production-ready agents and BigQuery’s scalability — all within a familiar Python environment.</p><p>Get started by visiting the <a href="https://github.com/GoogleCloudPlatform/agent-starter-pack">Agent Starter Pack repository</a> or installing the pack using the commands provided earlier.</p><p>Use the agentic_rag template or the — include-data-ingestion flag to unlock the BigFrames-powered data pipeline. Scale your RAG to terabytes, automate updates, and simplify development. Start building!</p><p><strong>The BigFrames team would love to hear from you. If you would like to reach out, please send an email to: bigframes-feedback@google.com or by filing an issue at the open source BigFrames repository. To receive updates about BigFrames, </strong><a href="https://docs.google.com/forms/d/e/1FAIpQLSflLgF8_aDUafcBQttVGBsaOpjRnGoHubqMi_tjI0NJtoqvUA/viewform?usp=dialog"><strong>subscribe</strong></a><strong> to the BigFrames email list.</strong></p><p>Authors: Elia Secchi, Lorenzo Spataro</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=743553adf997" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/agentic-rag-with-bigquery-dataframes-and-agent-starter-pack-743553adf997">Agentic RAG with BigQuery DataFrames and Agent Starter Pack</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>