Google Cloud Pairs Antigravity CLI With MCP to Stop AI Coding Drift
Ai4
Unstructured vibe-coding inevitably causes architectural decay and runaway token costs unless developers anchor agent workflows with modular skills and live Model Context Protocol schema connections.
## Background
Published on YouTube by Ai4 on August 15, 2026, this video features a hands-on workshop led by David Cardozo, a Google Developer Expert for Google Cloud and Senior Engineer at 575 Labs. The session outlines how to transition from brittle 'vibe-coding' to structured, spec-driven development by combining the Antigravity CLI coding agent with methodology skills and Model Context Protocol (MCP) connections to live external data.
## TL;DR
Cardozo argues that while vibe-coding enables rapid MVP prototyping, it leads to context drift, architectural decay, and runaway token costs during long-term maintenance. To solve this, he demonstrates a spec-driven development workflow using Antigravity CLI, Google Cloud Shell, and a legacy FastAPI analytics app that initially depends on static CSV files. By provisioning synthetic e-commerce data in BigQuery and integrating modular skills with a BigQuery MCP server, he illustrates how progressive disclosure enables an AI agent to inspect live schemas, execute deterministic queries, and safely refactor production code.
## Atmosphere & style
The session kicks off with an interactive ergonomic stretch and self-deprecating humor, immediately establishing an approachable, energized workshop dynamic for fatigued conference attendees. Once inside Cloud Shell, the delivery shifts into a patient, highly practical lab cadence punctuated by audience call-and-response questions, troubleshooting guidance from roaming TAs, and lighthearted swag incentives. It feels like an authentic, supportive live coding lab where software engineering discipline meets modern agentic experimentation without pretense.
## Key takeaways
- [01:06](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=66s) While unstructured 'vibe-coding' enables rapid prototyping of minimum viable products, it breaks down during long-term maintenance due to architectural decay, context dilution, and rising token costs.
- [01:06](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=66s) Spec-driven development introduces formal requirements, schemas, and acceptance criteria to give AI agents the contextual grounding needed for deterministic code generation.
- [04:02](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=242s) A robust agentic coding architecture pairs the model's reasoning loop with Skills (which define how the agent thinks) and Model Context Protocol (MCP) servers (which define what the agent can see).
- [04:02](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=242s) Methodology skills enforce structured development workflows, while domain skills supply precise API parameters to prevent hallucinating outdated conventions.
- [06:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=386s) Google Cloud Shell provides a standardized, browser-based Linux environment that matches the VS Code and Antigravity interface, avoiding local environment discrepancies during agent workflows.
- [24:39](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1479s) Migrating static CSV-based analytics to live BigQuery SQL pipelines solves operational challenges like data drift and lack of real-time visibility.
- [29:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1748s) Antigravity CLI is a terminal-based agentic coding tool that can index repositories, execute bash commands directly via bang escapes, and reason across project files.
- [34:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2048s) Progressive disclosure preserves LLM context windows by loading modular tool blueprints and skill sets on demand rather than flooding the prompt upfront.
- [34:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2048s) Lightweight methodology and utility skills, such as Caveman, compress token consumption by eliminating conversational filler during agent tool invocations.
- [37:24](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2244s) MCP servers ground AI coding agents in live infrastructure, enabling dynamic schema inspection and real query execution instead of relying on stale training weights.
## Detailed walkthrough
### [00:04](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=4s) Introduction and Ergonomic Warm-Up
David Cardozo opens the final workshop session of the conference on a Wednesday, thanking the audience for their attendance and acknowledging that many participants have been sitting down for extended periods across consecutive sessions. Before diving into technical material, he invites the entire room to stand up, stretch, and perform basic neck and shoulder rotations to relieve tension. Joking that "a little bit of ergonomics will not kill you," he engages the audience directly as attendees shake off fatigue to prepare for the interactive codelab.
Cardozo introduces himself as a Senior Engineer at 575 Labs and a Google Developer Expert (GDE) for Google Cloud. He outlines the central theme of the workshop: how to apply spec-driven development methodologies to AI-assisted workflows rather than abandoning classical engineering rigor in favor of unstructured prompting.
---
[01:06](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=66s) The Limits of Vibe-Coding and the Value of Spec-Driven Development
Cardozo examines the rise of "vibe coding," acknowledging its undeniable strengths. By allowing developers to describe problems in plain conversational language without upfront boilerplate, tedious configuration, or framework paralysis, vibe coding enables individuals to ship minimum viable products (MVPs) in hours or days. However, he cautions that this paradigm breaks down rapidly during long-term maintenance. Autoregressive large language models fundamentally operate by predicting the next token, which makes unbounded, conversational code generation prone to drift and severe architectural decay.
```mermaid
flowchart TD
accTitle: Vibe Coding vs Spec Driven Development
subgraph VIBE["Vibe-Coding (Unstructured)"]
V1["Vague Prompt\n'Build me an app'"] --> V2["Model Guesses Tech Stack\n& Schema"]
V2 --> V3["Context Loss & Drift\n(e.g., TypeScript in Python)"]
V3 --> V4["Accumulated Technical Debt\n& Escalating Token Costs"]
end
subgraph SPEC["Spec-Driven Development (Structured)"]
S1["Formal Requirements\n& Acceptance Criteria"] --> S2["Domain Skills\n& Planned Architecture"]
S2 --> S3["MCP Live Schema Inspection\n& Tool Grounding"]
S3 --> S4["Maintainable, Deterministic\nProduction Code"]
end
```
When comparing vibe coding against standard software engineering life cycles, critical development phases are routinely dropped: formal specifications are replaced with casual one-liners like "build me an app for a menu display," planned architectures are swapped for whatever tech stack happens to be statistically prevalent in model weights, and documentation is omitted entirely. Over long-running agentic tasks, even models with massive context windows (such as 2 million tokens) suffer context dilution or non-deterministic hallucinations—sometimes inappropriately introducing TypeScript syntax into a Python repository. In an AI development cycle where repeated iterations directly translate into higher token costs, structured engineering practices serve as the necessary guardrails.
- **Vibe coding benefits**: Zero boilerplate, fast prototyping, plain-language interaction, shipping an MVP in hours.
- **Vibe coding failure modes**: Lack of explicit requirements, loss of architectural intent, framework drift, and runaway token usage across extended iterations.
- **Core thesis**: Engineering artifacts (specifications, acceptance criteria, schemas) are not impediments to AI agents; they provide the precise contextual grounding agents require to operate deterministically.
---
[04:02](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=242s) The Agent Loop: Skills, MCPs, and Context Engineering
Cardozo breaks down the mechanics of an agentic coding loop into its fundamental components: a Read-Eval-Print Loop (REPL) where the agent perceives context, reasons about necessary actions, executes tool calls, observes outputs, and updates its internal state. Rather than letting the model guess system details, a robust architecture pairs the model with two foundational pillars: **Skills** and **Model Context Protocol (MCP)** servers.
```mermaid
flowchart LR
accTitle: Structured Agent Loop with Skills and MCP
subgraph CONTEXT["Agent Working Context"]
SPEC["Specifications & Plan"]
SKILLS["Methodology & Domain Skills\n(How to Think)"]
MCP["MCP Live System Connections\n(What to See)"]
end
Skills dictate how the agent reasons by enforcing structured engineering workflows (methodology skills) and providing accurate API conventions (domain skills) so the model does not hallucinate outdated parameters. Meanwhile, MCP servers expose live connections to external systems, enabling the agent to inspect live database schemas and execute real validation queries. Cardozo introduces the hands-on lab stack:
- **Antigravity CLI**: The terminal-based agent orchestrating file edits, command execution, and reasoning loops.
- **Caveman**: A utility designed to compress token consumption during agent tool invocations.
- **Google Cloud BigQuery & BigQuery MCP**: Enabling the agent to inspect schema structures and query cloud data stores directly.
- **Target Application**: Refactoring a legacy Python dashboard (built with FastAPI and pandas) that queries local CSV files into a production-grade BigQuery-backed analytics service.
---
[06:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=386s) Workshop Setup: Google Developer Credits and Cloud Shell Environment
Cardozo directs participants to a QR code on screen containing two links: the official workshop codelab instructions and a portal to claim $5 in Google Developer Program credits to cover Google Cloud compute and BigQuery usage. Attendees are advised to use personal Gmail accounts to redeem the credits and associate them with a billing profile. Teaching assistants (TAs) circulate throughout the room to assist anyone encountering authentication issues.
Participants navigate to Google Cloud Shell, a hosted Ubuntu 24.04 Linux environment provided by Google Cloud that includes a browser-based Cloud Shell Editor (built on an open-source VS Code interface). Cardozo highlights that this environment shares the exact UX and layout of Antigravity and VS Code, ensuring zero local machine dependency hurdles across the audience.
---
[10:03](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=603s) Cloning the Dashboard Repository and Exploring Project Structure
Once the Cloud Shell machines finish provisioning, Cardozo guides attendees through cloning the repository containing the baseline code for the lab:
```bash
git clone <repository-url>
```
Opening the cloned project folder—named `SD AGY BigQuery Dashboard` (Spec-Driven Antigravity BigQuery Dashboard)—reveals a modern Python repository managed with the `uv` package manager, complete with defined dependencies in `uv.lock`. Cardozo notes that the Cloud Shell environment includes Gemini Code Assist and provides access to the Antigravity CLI (`antigravity` / `agi`) directly inside the integrated terminal.
The starter repository consists of three core components:
1. `main.py`: A FastAPI web API serving as the application entry point.
2. `data_service.py`: A data processing service that currently loads records from flat CSV files using pandas.
3. A dashboard frontend: Visualizing the loaded analytics data.
The goal of the workshop is to use Antigravity CLI, equipped with spec-driven methodologies and BigQuery MCP, to migrate `data_service.py` from CSV-based ingestion to live BigQuery SQL analytics.
---
[14:30](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=870s) Configuring Google Cloud Project, Terminal, and BigQuery API
To ensure API calls and data resources route correctly, Cardozo instructs attendees to open the Google Cloud Console and create or select a dedicated project (such as `data-analytics-demo`), ensuring it is attached to the newly redeemed credit billing account.
```bash
gcloud config set project <PROJECT_ID>
gcloud auth list
```
Cardozo switches the Cloud Shell terminal theme to light mode for improved projection clarity and steps through updating environment configuration files (`configure_terminal.sh`) with the active Project ID and Project Number. He demonstrates opening a new terminal tab via the Command Palette (`Cmd+Shift+P` on macOS / `Ctrl+Shift+P` on Linux/Windows) and verifying that the active project prompt turns yellow, indicating the shell is bound to the target project.
With project bindings verified, Cardozo enables the BigQuery API on the project:
- **Project setup checkpoint**: Attendees verify their active project via `gcloud config list` and `gcloud auth list`.
- **API activation time**: Enabling `bigquery.googleapis.com` takes a few moments to initialize the underlying infrastructure and IAM permissions.
---
[22:33](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1353s) Provisioning the Look eCommerce Dataset in BigQuery
With the Cloud environment and APIs active, Cardozo introduces the problem dataset: `thelook_ecommerce`, a synthetic e-commerce dataset containing 208,000 records structured across orders, order items, and products. This dataset serves as a realistic target for writing aggregation queries and testing schema-aware agent workflows.
Cardozo guides the room through running the BigQuery CLI commands to create a local dataset named `thelook_ecommerce` inside their Google Cloud project and copy three core tables from the public dataset:
Participants verify the table creation using the BigQuery CLI to list tables within `thelook_ecommerce`:
```bash
bq ls thelook_ecommerce
```
The output confirms the presence of all three target tables (`order_items`, `orders`, and `products`), completing the infrastructure provisioning phase and setting the stage for driving Antigravity CLI through structured specifications in the upcoming development steps.
[24:39](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1479s) Querying BigQuery and Launching the Analytics Server
The session resumes with a quick check on whether attendees have explored their newly loaded dataset. David asks the room if anyone has queried the exact item counts across the imported tables: "Is there anyone that can figure out how many items do we have in order, in order items? Or how many products do we have?" After someone in the crowd shouts out an estimate in the hundreds of thousands, he confirms that the dataset contains roughly 130,000 orders—plenty of realistic volume to demonstrate real-world data pipelines. He encourages anyone comfortable with SQL to run ad-hoc queries directly through the BigQuery CLI before transitioning to the application layer.
```mermaid
flowchart TD
accTitle: Transition from CSV to Live BigQuery
subgraph LegacyFlow ["Static Architecture"]
CSV["Static CSV File"] -->|"Data Drift / Stale"| AppOld["FastAPI Analytics Engine"]
end
subgraph LiveFlow ["Modern Data Flow"]
BQ["Google Cloud BigQuery (130k+ Orders)"] -->|"Live Queries via CLI / API"| AppNew["FastAPI Analytics Dashboard (:8080)"]
end
```
To run the local dashboard, David introduces `uv`, highlighting it as the modern standard for fast Python dependency management. Attendees sync project dependencies with `uv sync` and launch a FastAPI server that hosts an interactive analytics dashboard listening on port 8080. Using the Cloud Editor's built-in web preview, they map port 8080 to inspect the interface. David then prompts the room to inspect the underlying codebase to spot a major architectural flaw: the dashboard currently pulls its metrics from a hardcoded CSV export. He points out the operational headaches of this pattern—data drift, waiting on analytics engineers for fresh exports, and a total lack of real-time visibility—setting the stage for refactoring the app to connect straight to BigQuery.
- **Dataset scale:** Over 130,000 order records spread across core relational tables.
- **Application stack:** FastAPI backend managed and synced via `uv`.
- **Environment tip:** Ensure Google Cloud project IDs do not contain spaces to prevent downstream CLI syntax errors.
---
[29:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1748s) Authenticating and Interacting with Antigravity CLI
Moving into the core topic of the workshop, David transitions to configuring the agentic workflow. He directs attendees to open a new terminal in the Cloud Editor and verify that their active Google Cloud project is configured properly via `gcloud config set project <PROJECT_ID>`. Once verified, attendees invoke the Antigravity CLI (`antigravity`). Walking through a live authentication flow, David demonstrates the OAuth login process: opening the Google authorization URL, signing in with the designated account, granting file execution permissions, and pasting the authorization token back into the terminal.
David notes that Antigravity CLI represents Google DeepMind's dedicated agentic coding tool, evolving past earlier command-line interfaces like the Gemini CLI. Once inside the Antigravity environment, developers can customize visual themes or immediately prompt the underlying Gemini model with high-level codebase inquiries, such as asking for a complete architectural overview of the current working directory. The agent parses the project `README.md`, indexes source files, and maps out operations automatically. Furthermore, David shows how developers can seamlessly drop into the underlying shell by prefixing commands with a bang (`!ls`), allowing the agent environment to execute native Linux commands and feed the output straight back into the conversation context.
- **CLI Version:** The workshop runs on Antigravity CLI version 1.19.
- **Shell Escapes:** Prefixing commands with `!` executes raw bash commands directly within the agent session.
- **Session Control:** Pressing `Ctrl+D` twice safely disconnects and exits the Antigravity prompt.
---
[34:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2048s) Structuring Agent Intelligence: Skills and Progressive Disclosure
David addresses a fundamental limitation of large language models: frozen knowledge cutoffs and API hallucinations. Because training runs are resource-intensive, base models cannot know about real-time changes, newly released library versions, or private internal endpoints. Instead of letting an agent guess at syntax, developers can provide "skills"—lightweight YAML and Markdown definitions that act as explicit blueprints teaching the model how to interact with external tools and APIs.
```mermaid
flowchart LR
accTitle: Progressive Disclosure with Antigravity Skills
subgraph AntigravityCore ["Antigravity CLI Core"]
LLM["Gemini Model Context"]
end
subgraph SkillsLayer ["Modular Skills & Plugins"]
GSkills["@google/skills<br>(BigQuery & Cloud Run)"] --> LLM
MethodSkill["Superpowers Skill<br>(Spec-Driven Workflows)"] --> LLM
TokenSkill["Caveman Skill<br>(Token Compression)"] --> LLM
end
```
He explains the principle of "progressive disclosure" as a solution to context window exhaustion. In complex, multi-step coding sessions, overflowing an LLM's context window degrades output quality on later tokens. Loading modular skills on demand keeps the context lean. David walks through installing skills via `npx skills add`:
1. **Google Skills (`@google/skills`):** Equips the agent with exact operational blueprints for BigQuery and Cloud Run.
2. **Superpowers:** A methodology skill that enforces strict spec-driven development patterns before code edits occur.
3. **Caveman:** A token-saving utility that strips conversational filler and verbose phrasing, forcing the model to output concise, high-density responses.
- **Progressive disclosure:** Avoids context bloat by feeding domain tools and rules only when invoked.
- **Skill format:** Standardized YAML manifests defining available functions, operational parameters, and usage guidelines.
- **Source flexibility:** Skills can be fetched from official registry packages or directly from arbitrary GitHub repositories.
---
[37:24](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2244s) Real-World Grounding with Model Context Protocol (MCP)
In the final minutes of the session, David demonstrates bridging skills with live data using the Model Context Protocol (MCP). By configuring an `.agent/` MCP manifest, developers give Antigravity secure, real-time access to live infrastructure rather than mock data. Combining the BigQuery domain skill with an active BigQuery MCP server allows the agent to inspect live schemas and query tables directly.
```mermaid
flowchart LR
accTitle: Agent Query Execution via MCP
subgraph UserPrompt ["Terminal Interaction"]
Prompt["'Find all BigQuery tables in my project'"]
end
subgraph AgentEngine ["Antigravity Agent"]
Skill["BigQuery Skill (Schema Knowledge)"]
MCP["BigQuery MCP Client"]
end
subgraph GCP ["Google Cloud"]
BQService["BigQuery API Service"]
end
Prompt --> Skill
Skill --> MCP
MCP -->|"list_table_ids / get_table_info"| BQService
BQService -->|"Live Schema & Metadata"| MCP
```
David demonstrates this live by entering a plain English request into Antigravity: "find all the BigQuery tables in my project." The terminal trace reveals the agent recognizing the BigQuery basic skill, prompting for execution permission, and invoking specific MCP tools under the hood—first calling `list_table_ids` and then executing `get_table_info`. Within seconds, the agent returns the exact three tables imported earlier. David wraps up the workshop by inviting attendees who successfully executed the MCP-driven queries to bring their laptops to the front to collect Google Cloud swag, encouraging them to keep experimenting with spec-driven development and agent plugins.
## Notable quotes
> [00:04](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=4s) a little bit of ergonomics will not kill you — David Cardozo
> [01:06](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=66s) build me an app for a menu display — David Cardozo
> [24:39](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1479s) Is there anyone that can figure out how many items do we have in order, in order items? Or how many products do we have? — David Cardozo
> [37:24](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2244s) find all the BigQuery tables in my project — David Cardozo
## Mentioned
David Cardozo, 575 Labs, Google Cloud, Google DeepMind, Ai4, Antigravity CLI, Gemini, Gemini Code Assist, Model Context Protocol (MCP), Google Cloud BigQuery, BigQuery MCP, Google Cloud Shell, Ubuntu, VS Code, FastAPI, pandas, Python, uv, Caveman, Superpowers, @google/skills, thelook_ecommerce
## Video description
David Cardozo - Google Developer Expert, Google Cloud
Important Note: This hands-on, interactive workshop is led by Google Cloud and is open to all Ai4 attendees at no additional cost. No RSVP or separate registration is required. To participate and get the most out of this session, please bring your own device (a laptop is recommended). Devices will not be provided on-site.
ABOUT THIS WORKSHOP:
Vibe-coding an MVP is fast — but adding features to it by throwing more prompts at the wall is how projects break. You need a way to bring structure and real-world context into AI-assisted development. That's where Antigravity CLI comes in — an AI coding agent that runs in your terminal. On its own, it can understand your code base, run commands, and edit files. Its real power comes from what you plug into it:
skills give the agent methodology and domain knowledge — a methodology skill enforces structured development workflows, while a domain skill provides accurate API knowledge so the agent doesn't hallucinate.
MCP servers give the agent live connections to external systems — letting it inspect real schemas, run queries, and validate its work against actual data instead of relying on stale training knowledge.
Skills shape how the agent thinks; MCP shapes what the agent can see and interact with. Together, they turn a general-purpose coding agent into one that follows a structured workflow grounded in real-world data. This codelab walks you through that combination, from installing plugins to shipping a feature.
David Cardozo argues that while conversational 'vibe coding' enables rapid prototyping, production-grade AI agent workflows require spec-driven development supported by explicit engineering artifacts, modular skills, and live protocols. By pairing the Antigravity CLI agent loop with Model Context Protocol (MCP) data connections, developers can mitigate context drift, token exhaustion, and architectural decay.
The Architectural Limits of Vibe-Coding (1:06)
Cardozo acknowledges that unstructured 'vibe coding'—prompting large language models in casual natural language without upfront configurations—allows developers to ship minimum viable products within hours. However, he warns that this workflow quickly fails during long-term maintenance. Because autoregressive models fundamentally predict subsequent tokens without inherent structural intent, conversational generation without explicit architecture frequently causes severe technical debt, context drift, and mounting token costs. Cardozo notes that even models with context windows up to two million tokens experience context dilution or hallucinate inappropriate syntax, such as introducing TypeScript into Python codebases.
To counter these breakdowns, Cardozo asserts that classical software engineering artifacts—such as formal specifications, system schemas, and acceptance criteria—should not be discarded. Instead, these artifacts serve as the precise guardrails and contextual grounding that autonomous coding agents require to operate deterministically.
Progressive Disclosure and Modular Agent Skills (34:08)
Foundation models inherently suffer from frozen knowledge cutoffs and risk hallucinating outdated or incorrect API conventions. To address this, Cardozo structures the Antigravity CLI agent loop—a Read-Eval-Print Loop where the agent reads context, evaluates actions, executes tools, and observes outputs—around modular 'skills.' These skills consist of standardized YAML and Markdown manifests that define tool blueprints, API parameters, and methodology rules for the agent.
To prevent context window saturation during extended workflows, Cardozo emphasizes 'progressive disclosure,' exposing skills only when relevant tasks are triggered. In the workshop environment, this modular stack includes Google Skills (@google/skills) for BigQuery and Cloud Run, the 'Superpowers' skill to enforce rigorous spec-driven development steps prior to code editing, and 'Caveman,' a utility that compresses agent outputs to conserve token consumption.
Real-Time Grounding via Model Context Protocol (37:24)
While skills teach the agent how to reason and interact with APIs, Cardozo highlights the Model Context Protocol (MCP) as the layer that connects agents to live systems rather than static or mock data. Configuring an MCP client within Antigravity CLI grants the model direct, permission-controlled visibility into operational infrastructure.
In a live demonstration, Cardozo inputs a plain-language request to identify available project tables. Rather than guessing schema details, the agent identifies its BigQuery basic skill, requests execution approval, and invokes MCP tools such as list_table_ids and get_table_info. The agent directly interrogates Google Cloud APIs to return live metadata, verifying actual database state before formulating queries or generating application code.
Migrating Legacy Ingestion to Cloud Warehouses (10:03)
Cardozo demonstrates the spec-driven approach through a hands-on refactoring exercise hosted in Google Cloud Shell. Attendees inspect a baseline FastAPI analytics dashboard managed by the uv package manager that relies on a pandas data service reading local CSV files. Cardozo points out the systemic operational flaws of static file ingestion, including data drift and total dependency on manual analytics exports.
Using Antigravity CLI version 1.19 authenticated via OAuth, participants provision a synthetic e-commerce dataset (thelook_ecommerce) containing over 130,000 order records across orders, order items, and products tables in Google Cloud BigQuery. The agent then leverages live BigQuery MCP inspection and methodology skills to systematically refactor the application's data layer into an authenticated, direct BigQuery SQL integration.
Cardozo demonstrates that integrating spec-driven methodologies, modular skills, and live MCP tool grounding converts coding agents from unpredictable generative engines into deterministic software engineering assistants. However, successful agent execution remains dependent on precise foundational setup, including verified Google Cloud project bindings, enabled APIs, and explicit schema constraints.
## Background
该视频由频道 Ai4 于 2026 年 8 月 15 日在 YouTube 发布,记录了 Google 开发者专家(GDE)兼 575 Labs 资深工程师 David Cardozo 在大会上主讲的实操工作坊。页面简介指出,本次研讨会旨在解决随意拼凑提示词的“氛围式编码(Vibe-coding)”容易导致项目崩溃的问题,重点演示如何通过 Antigravity CLI、扩展 Skills(技能)以及 MCP(模型上下文协议)构建结构化的规范驱动开发(Spec-Driven Development)工作流。
## TL;DR
工作坊深入剖析了随意“氛围编码”在长任务中容易导致上下文漂移、API 幻觉和技术债务累积的弊端,提出以规范驱动开发作为引导 AI 编码智能体的核心约束。讲师现场演示了在 Google Cloud Shell 中初始化 DeepMind 打造的 Antigravity CLI 终端智能体,并导入 BigQuery 电商数据集。随后,通过渐进式披露机制挂载 Google Skills、Superpowers 和 Caveman 技能蓝图,并接入 BigQuery MCP 服务器,让智能体在真实数据库 Schema 的约束下,成功将一个脆弱的读取本地静态 CSV 文件的 FastAPI 数据看板重构为直连云端大数据的实时分析服务。
## Atmosphere & style
现场氛围轻松幽默且极具实操互动感,讲师在开场便带领疲惫的参会者做颈部拉伸打趣破冰,随后迅速切入高强度的终端实操教学。整个流程紧凑明快,穿插着助教现场答疑、代金券兑换、学员抢答以及周边礼品奖励,既有扎实的软件工程方法论思辨,又充满开发者在 Linux 命令行与云端架构之间实机排错与见证自动化调用的极客快感。
## Key takeaways
- [00:04](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=4s) 氛围式编码(Vibe-coding)虽然能快速上线 MVP,但因缺乏明确需求和预先规划架构,容易导致技术债务累积、上下文漂移及 Token 浪费;规范驱动开发(Spec-Driven Development)才是约束并引导 AI 智能体的关键支撑。
- [04:02](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=242s) 智能体系统由 Skills 和 MCP 协同构成:Skills 塑造智能体的思维方式与方法论,MCP 则赋予智能体感知与操作外部真实系统的能力,二者结合让研发流程更加严谨。
- [04:02](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=242s) 本次实操任务目标是利用终端智能体 Antigravity CLI,将一个基于 Pandas 读取静态 CSV 文件的老旧数据看板,改造成直连 Google BigQuery 的实时分析平台。
- [26:12](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1572s) 依赖静态 CSV 数据源存在两大缺陷:一是工程团队需被动等待数据更新导致的数据漂移,二是完全缺乏实时性,无法支撑现代业务分析。
- [31:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1886s) Antigravity CLI 是 Google DeepMind 打造的下一代终端编码智能体,继承并取代了原先的 Gemini CLI,支持直接自然语言交互,并可通过感叹号前缀执行原生 Bash 命令。
- [34:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2048s) LLM 预训练成本高昂,难以预知最新的 API 变更;引入轻量级 YAML 规范的 Skills 作为调用蓝图,可以有效杜绝模型凭借陈旧知识产生的 API 幻觉。
- [34:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2048s) 渐进式披露(Progressive Disclosure)机制可防止过长上下文填满窗口而导致末尾 Token 推理能力严重劣化,使智能体仅在需要时按需挂载技能。
- [34:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2048s) 通过引入 superpowers 与 caveman 等插件技能,不仅能强制执行规范驱动开发的工作流,还能去除大模型输出中的冗余废话,显著降低 Token 消耗。
- [37:24](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2244s) 借助模型上下文协议(MCP),Antigravity CLI 能够直接调用 list_table_ids 和 get_table_info 等外部工具,实时查询 GCP 上的真实 BigQuery 表结构与元数据。
- [37:24](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2244s) 工业级 AI 辅助研发的核心在于:将智能体的推理能力、Skills 的方法论沉淀以及 MCP 带来的真实系统上下文深度融合,告别盲目随性的 Prompt 拼凑。
## Detailed walkthrough
### [00:04](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=4s) 破冰互动与规范驱动开发(Spec-Driven Development)的核心思想
作为周三最后一场实操工作坊,主讲人 David Cardozo(开源实验室 575 Labs 资深工程师兼 Google 开发者专家 GDE)在开场时邀请所有在座听众起立活动筋骨、转动头部做简单拉伸。他幽默地调侃道:“来点人体工学伸展不会要了你的命”,并对那些依然坚持赖在椅子上的与会者无奈打趣。热身结束后,David 切入本次演讲的主旨——规范驱动开发(Spec-Driven Development)。在当今以 AI 编码为热点的浪潮中,人们似乎容易遗忘传统软件工程的价值;然而,清晰的规范定义与需求拆解不仅没有过时,反而是约束并引导 AI 智能体(Agent)发挥最大威力的关键支撑。
```mermaid
flowchart TD
accTitle: 规范驱动开发与 AI 编码集成流
subgraph ContextSetup["1. 上下文与规范注入"]
A["业务需求与规格说明 (Specs)"] --> B["方法论技能 (Skills)"]
C["API/领域知识技能"] --> B
end
subgraph AgentLoop["2. 智能体循环 (Agent Loop)"]
B --> D["上下文聚合 (Context Window)"]
E["外部系统/数据架构 (MCP)"] --> D
D --> F["思考、推理与决策"]
F --> G["执行调用与文件变更"]
end
subgraph Verification["3. 观察与验证"]
G --> H["运行环境观察 (Observation)"]
H --> D
end
```
David 深入剖析了“氛围式编码(Vibe-coding)”的优势与致命缺陷。用自然语言随意抛出一个想法就能瞬间得到可行方案,无需繁琐的基础配置或框架选型的反复纠结,几小时甚至几天就能上线一个 MVP。但基于自回归模型(逐个预测下一个 Token)构建的代码极难维护:
- 缺乏明确的需求,AI 往往只能接收模糊的指令(例如“给我做个菜单展示应用”)。
- 没有预先规划的架构,AI 会随意挑选当时最流行的技术栈,甚至在长上下文任务中发生上下文漂移与记忆遗忘,最终出现“在 Python 项目里莫名其妙冒出 TypeScript”这类离奇事故。
- 随意编码导致技术债务快速累积,由于缺乏文档与验收标准,软件生命周期中的沟通成本陡增,而在 AI 迭代中,更多的轮次与试错直接等同于更多的 Token 消耗与金钱成本。
---
### [04:02](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=242s) 智能体循环机制:Skills 与 MCP 的协同作用
David 详细阐述了 AI 智能体的核心工作机制——Agent 循环(即读取、评估、提示与循环迭代的思维决策过程)。他强调:“软件工程实践绝非 AI 的绊脚石,它们恰恰是智能体最需要的上下文。”规范不仅告诉大模型究竟该构建什么,更提供了明确的验收标准、架构路径与工作流约束;领域知识则规范了正确的架构范式与精准的 API 模式。
智能体系统的全貌由以下核心要素共同交织在上下文中:
- **Skills(技能)**:塑造智能体的思维方式。方法论技能(Methodology Skills)强制执行结构化研发工作流,领域技能(Domain Skills)提供准确的 API 知识以杜绝大模型幻觉。
- **MCP(模型上下文协议,Model Context Protocol)**:连接真实的外部系统,让智能体不再依赖陈旧的预训练知识,而是实时感知外部 Schema 并执行操作查询。
- **规范与状态感知**:涵盖清晰的规格说明、实施计划与状态观察反馈,构成了真正严谨的工程闭环,彻底划清了随意“氛围编码”与正规“软件工程”的界限。
关于本场工作坊后续的动手目标,David 透露将使用终端智能体 **Antigravity CLI**、公开发布的 Skills,并配合名为 **Caveman** 的工具来大幅降低 Token 消耗;同时集成 Google Cloud 与 BigQuery MCP,将一个基于 Pandas 读取静态 CSV 文件的老旧数据看板,改造成直连 Google BigQuery 云端大数据的全功能实时分析平台。
---
### [06:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=386s) 领取实验代金券与 Cloud Shell 开发环境搭建
实操环节正式开启。David 展示了现场二维码,提供本次 Codelab 实验手册链接以及 5 美元的 Google Developer Program 云实验代金券,并安排了现场助教(TA)巡视协助参会者。为了顺利领取资源,用户需要使用个人 Gmail 账号登录 Google Developer Program 平台完成权益兑换。
随后大家打开 Google Cloud Console 中的 Cloud Shell 环境。这是一个由 Google Cloud 免费提供的基于 Ubuntu 24.04 的在线 Linux 运行环境,右侧集成了类似 VS Code / Antigravity 界面风格的开源 Cloud Shell Editor。为了拉取本实验的基础代码仓库,学员需在终端中执行 Git 克隆操作:
```bash
git clone <workshop-repo-url>
```
克隆完成后,工作区中会生成名为 `SD AGY BigQuery Dashboard` 的工程目录。对于首次启动 Cloud Shell 的用户,Google 后端需要 4 至 5 分钟来动态预配虚拟机并初始化系统环境。
---
### [12:04](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=724s) 基础 Python 项目架构与 Antigravity CLI 初始化
项目加载完毕后,David 向大家梳理了该工程的代码骨架。项目基于现代 Python 工具栈 `uv` 构建,根目录下包含 `pyproject.toml` 依赖清单和 `uv.lock` 锁定文件。该项目目前的核心文件包括:
- `main.py`:作为应用的 FastAPI 服务入口点。
- `data_service.py`:依赖 Pandas 直接读取本地 CSV 数据文件的数据服务模块。
- 动态生成的分析看板前端页面。
在 Cloud Shell 中,除了预装的 Google 官方 Gemini Code Assist 外,终端还内置了 **Antigravity CLI**(执行命令为 `agi`)。在终端输入 `agi` 后,开发者可以通过基于浏览器的 Google OAuth 授权流程完成智能体认证登录,从而在终端内直接调出具备代码理解、系统命令执行与文件修改能力的编码智能体。
---
### [14:10](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=850s) GCP 项目配置与终端环境变量绑定
为了避免资源冲突并确保正确扣除免费获得的实验额度,David 演示了在 Google Cloud Console 中新建项目的操作。他指导大家选择带有“GDP credit”账单账户的新建项目,并命名为类似 `data-analytics-demo`(项目 ID 需全网唯一)。完成创建后,需要在 Cloud Shell 终端中切换并绑定当前的项目配置:
```bash
gcloud config set project <YOUR_PROJECT_ID>
```
为了让现场学员看清终端内容,David 将编辑器界面切换为高对比度浅色主题(Light Theme)。随后,他演示了修改项目内的配置文件(如 `configure_terminal.sh`),把刚创建的项目 ID 与项目编号(Project Number)保存到环境中,并借助快捷键(Mac 下为 `Cmd + Shift + P`,Linux/Windows 下为 `Ctrl + Shift + P`)调出命令面板打开集成终端。他反复提醒大家确认命令行提示符中以黄色高亮显示的项目名称,确保终端当前上下文与新建的 GCP 项目完全一致。
---
### [22:00](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1320s) 启用 BigQuery API 与准备 Looker 电商数据集
确认项目配置无误后,实验进入后端云服务准备阶段。学员需在终端运行指令以启用 BigQuery 服务 API,该操作在后台通常需要几分钟完成。
```bash
gcloud services enable bigquery.googleapis.com
```
针对本次重构任务,实验选用了 BigQuery 官方公开的合成电商数据集 `thelook_ecommerce`。该数据集包含多达 208,000 条涵盖订单、物料及商品项目的模拟真实数据,非常适合用于演练复杂的聚合统计与数据过滤查询。通过 BigQuery CLI(`bq` 命令),学员在自己的 GCP 项目中建立了对应的目标数据集,并从公共数据集中复制了三张核心业务数据表:
```mermaid
flowchart LR
accTitle: Looker 电商公开数据表复制流
subgraph PublicData["BigQuery 公开数据集"]
P1["thelook_ecommerce.order_items"]
P2["thelook_ecommerce.orders"]
P3["thelook_ecommerce.products"]
end
subgraph LocalProject["当前用户项目"]
L1["thelook_ecommerce.order_items"]
L2["thelook_ecommerce.orders"]
L3["thelook_ecommerce.products"]
end
P1 -->|bq cp| L1
P2 -->|bq cp| L2
P3 -->|bq cp| L3
```
- 执行 `bq mk --dataset` 在当前账号项目中初始化 `thelook_ecommerce` 数据集空间。
- 通过表复制指令将公共数据集中的 3 张表导入本地:`order_items`(订单明细)、`orders`(订单)以及 `products`(商品库)。
- 运行数据表查询列表命令验证复制结果,终端输出明确显示以上三张表均已成功导入,为接下来利用 Antigravity CLI 驱动代码重构打好了数据基础。
### [24:39](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1479s) 验证 BigQuery 数据导入与 SQL 查询
讲师 David Cardozo 在现场稍作停顿,向台下的学员抛出了一个互动问题:“有没有人能告诉我,我们到底怎么查询这些表里一共有多少条数据?”他让大家去查订单表(`order_items`)以及产品表里具体有多少数据。台下很快有人算出了结果,David 笑着回应道:“我听到有人报出答案了,你查到了对吧?一百……一百多万?”确认大家成功完成了这一步查询后,他解释说,数据量已经足够支撑后续的酷炫功能演示了。
如果熟悉 SQL,只要通过简单的聚合查询统计总订单量,就会发现数据集中大约有 13 万条订单(130k orders)。David 接着询问现场是否还有人未能成功查询刚刚导入的 BigQuery 数据集,看到部分学员遇到困难,他提醒大家,如果掌握 SQL,不妨直接尝试使用 BigQuery 命令行工具(CLI)来交互查询这三张核心表。
- 数据规模:数据集中包含约 130,000 条订单记录。
- 练习建议:建议熟悉 SQL 的学员直接使用 BigQuery CLI 对导入的三张业务表执行基础查询验证。
---
### [26:12](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1572s) 启动 FastAPI 本地分析看板与 CSV 数据源缺陷
在确认底层数据已准备就绪且 BigQuery 可正常交互后,工作坊进入 Python 应用层。David 介绍了现代 Python 开发的标准包管理工具 UV,指导大家使用 UV 快速同步项目依赖项,随后启动基于 FastAPI 的后端服务。该服务会拉起一个 Web 分析仪表盘(Analytics Dashboard),默认监听在 8080 端口。在 Cloud Editor 环境中,学员只需点击“Web Preview”并选择预览 8080 端口,即可在浏览器中看到直观的可视化看板。
```mermaid
flowchart LR
accTitle: 本地数据源切换架构
subgraph Current["现有架构 (脆弱)"]
CSV["静态 CSV 文件"] -->|"存在数据漂移 / 非实时"| FastAPI["FastAPI 服务 (:8080)"]
FastAPI --> Web["Web 仪表盘"]
end
subgraph Target["目标架构 (实时)"]
BQ[("BigQuery 数据集")] -->|"MCP Server + 实时查询"| Agent["Antigravity CLI Agent"]
Agent --> FastAPI2["改造后的应用代码"]
end
```
紧接着,David 引导大家审查当前工程的源代码,寻找仪表盘背后的数据源来源:“大家能不能看看代码库,这个仪表盘的数据到底是从哪里读出来的?”台下学员迅速指出数据直接来自于本地的静态 CSV 文件。David 顺势指出了以静态 CSV 作为数据源的两大严重弊端:首先是数据漂移(Data Drift),工程团队必须被动等待分析工程师更新并交付 CSV;其次是完全缺乏实时性,“根本无法做到实时”("not real-time, not at all")。这也顺理成章地引出了本次实验的核心任务:如何让 AI 编程 Agent 改造现有工程,将硬编码的 CSV 数据源替换为直接查询刚刚建好的 BigQuery 数据集。
- 包管理与运行时:使用 `uv` 进行依赖同步并启动 FastAPI 服务。
- 端口转发:本地仪表盘服务运行在 `8080` 端口,通过 Cloud Editor 的 Web Preview 功能进行访问。
- CSV 作为数据源的两大痛点:
- 数据易发生漂移(Drift),强依赖人工交付。
- 缺乏实时性,无法感知最新业务动态。
---
### [28:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1706s) 初始化环境与 Antigravity CLI 授权认证
在进入规范驱动开发(Spec-Driven Development)核心环节前,David 留出了 5 分钟缓冲时间,并由助教团队(TAs)协助卡住的学员排查问题。他特别强调了一个容易踩坑的小细节:“请确保项目名称中不要包含空格,这样会省去很多麻烦。”在 Cloud Editor 中新开终端后,学员需要使用 `gcloud config set project` 确保当前终端上下文绑定到正确的 Google Cloud 项目,例如他在现场演示时使用的项目名 `data-analytics-demo-ai4`。
随后,David 开始现场演示并排错 Antigravity CLI 的登录授权流程。终端调用 CLI 后,会弹出 Google OAuth 认证链接,点击后在浏览器中选择账号登录并复制授权码,再粘贴回终端完成绑定。在初次配置时,终端还支持自定义色彩方案与配置项,David 选择保留默认的终端配色以便投屏展示。完成服务条款确认后,Antigravity CLI 会请求在当前工作区读取与执行文件的权限。他打趣道,认证过程只需要跟着点击指引走就行,并提醒大家千万保管好自己的授权码,切勿泄露给他人。
- 避坑指南:Google Cloud 项目 ID 和目录命名切勿包含空格。
- CLI 认证流程:调用命令生成 OAuth 链接 $\rightarrow$ 浏览器单点登录 $\rightarrow$ 复制授权码(Authorization Code)粘贴回终端完成鉴权。
- 安全提示:OAuth 授权码代表账户权限,严禁分享或外泄。
---
### [31:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1886s) 探索 Antigravity CLI:DeepMind 的下一代终端编码 Agent
David 重点介绍了 Antigravity CLI 的前世今生。过去开发者可能接触过 Gemini CLI,但如今它已经被全新的 Antigravity CLI 所取代。这款工具源自 Google DeepMind 团队,相较以往更加成熟完备,直接让开发者在终端中调用 Gemini 的强大推理能力。为了展示其工程感知能力,David 输入指令让 Agent 对当前工作目录的应用做全局概览("give me an overview of the application on the current working directory")。Agent 随即自动展开目录树,读取 README 及核心代码,精准列出所有的业务操作与关键入口。
除了直接使用自然语言交互,Antigravity CLI 还支持无缝融入终端原生开发流程。用户只需在输入时加上感叹号前缀(例如 `!ls`),CLI 就会切换至原生 Bash 模式,在底层的 Linux 环境中执行原生命令并把标准输出返回给用户。David 检查了现场学员的环境,要求大家的 Antigravity CLI 版本统一维持在 `1.19`;如果想要完全退出当前会话,连按两次 `Ctrl+D` 即可安全返回系统的标准 Shell。
- 产品演进:由 Google DeepMind 打造的 Antigravity CLI 继承并取代了原先的 Gemini CLI,具备更强的终端推理与自动化能力。
- 混合命令模式:支持直接自然语言提问;使用叹号 `!` 前缀可直接运行原生 Linux Bash 命令。
- 推荐版本:当前工作坊演示采用的版本为 `v1.19`。
- 退出快捷键:连续按下两次 `Ctrl+D` 即可退出交互会话。
---
### [34:08](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2048s) 破解大模型上下文瓶颈:渐进式披露与 Skills 机制
当谈及如何让大语言模型处理复杂、专业化的现实工程时,David 剖析了大模型底层的本质局限:由于 LLM 的预训练成本极其昂贵,模型根本无法掌握实时的 API 变更,更不可能预知未来(比如 2027 年)的技术更新。一旦底层接口演进,LLM 往往会按照记忆中过时的旧版 API 凭空幻觉出错误代码。解决这一问题的杀手锏便是引入“技能”(Skills)。Skill 本质上是一个轻量级的 YAML 配置文件,就像一张精准的蓝图,直接指导 Agent 如何正确调用外部工具和第三方库,杜绝模型胡乱猜测。
```mermaid
flowchart TD
accTitle: Skills 与 MCP 协同架构
subgraph AgentEngine["Antigravity CLI 终端环境"]
AgentCore["DeepMind Agent 核心"]
PD["渐进式披露机制 (Progressive Disclosure)"]
end
subgraph SkillsLayer["Skills 插件扩展 (思考方式与方法论)"]
GS["Google Skills (BigQuery / Cloud Run)"]
SP["Superpowers (规范驱动开发工作流)"]
CM["Caveman (精简 Token 冗余)"]
end
subgraph MCPLayer["MCP 服务器 (实时数据与真实世界连接)"]
BQMCP["BigQuery MCP Server"]
VMCP["Vertex AI MCP Server"]
end
AgentCore --> PD
PD --> SkillsLayer
PD --> MCPLayer
BQMCP -->|实时 Schema & 数据探查| RealData[("GCP 真实数据资产")]
```
更核心的设计理念在于“渐进式披露”(Progressive Disclosure)。在处理大型工程任务时,如果一次性将所有信息塞满提示词,大模型的上下文窗口会迅速被杂乱信息淹没;而当上下文极度臃肿时,模型在末尾 Token 的推理能力将呈现灾难性下降。通过渐进式披露,Agent 仅在需要时动态挂载技能:
1. **Google Skills**:为 Agent 注入使用 BigQuery 与 Google Cloud 服务的权威范式;
2. **Superpowers**:固化并强制执行规范驱动开发(Spec-Driven Development)工作流;
3. **Caveman**:去除大模型输出中冗余的客套与废话,迫使 Gemini 输出极其简练的代码与解答,大幅节约 Token 消耗。
学员可以通过执行 `npx skills add @google/skills` 进入交互式安装界面,用空格键勾选需要的技能。除官方仓库外,还可以通过指定 GitHub 地址自由引入第三方的 Superpowers 与 Caveman 插件。
- 上下文退化问题:长任务中上下文过载会导致 LLM 在末尾 Token 上的表现大幅劣化。
- 渐进式披露(Progressive Disclosure):按需引入蓝图与配置,避免一次性填满上下文窗口。
- 本次实验安装的关键 Skills:
- `BigQuery basics` 与 `Cloud Run basics`:掌握 GCP 云资源的标准调用方法。
- `superpowers`:约束规范驱动开发的执行步骤。
- `caveman`:消除生成内容中的客套废话,极大减少 Token 消耗。
---
### [37:24](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2244s) 接入 BigQuery MCP 与实机元数据探查
在最后几分钟的高潮环节,David 演示了如何借助模型上下文协议(Model Context Protocol,简称 MCP)将技能与现实数据完全联通。在项目根目录下创建 `.agents` 目录并配置好 BigQuery MCP 相关的服务器配置后,Antigravity CLI 即可无缝挂载 Vertex 与 BigQuery 的 MCP 工具集。
随着系统完成初始化,David 在终端向 Agent 发出自然语言指令:“查找我项目中所有的 BigQuery 数据表”("find all the BigQuery tables in my project")。屏幕上的调用栈轨迹(Traceback)清晰展示了 Agent 的思考与执行链条:它先是检索到了 `BigQuery basics` 技能,随后主动请求权限并调用底层 MCP 工具 `list_table_ids`,紧接着调用 `get_table_info` 深入拉取元数据。短短数秒内,先前创建的三张核心数据表的信息便完整无误地回显在终端之中。
在工作坊收尾之际,David 拿出了准备好的 Google Cloud 周边奖品(Swag),热情邀请现场完成了这一全流程、成功让 Agent 查出 BigQuery 表的学员带上笔记本电脑上前领奖。他在掌声中总结道,今天向大家揭示的核心价值,正是如何将 Antigravity CLI 的推理智能、Skills 的方法论沉淀以及 MCP 带来的真实系统上下文深度咬合在一起,彻底告别盲目随性的 Prompt 拼凑,迈向真正工业级、结构化的高阶 AI 编码范式。
- MCP 运行时接入:在 `.agents` 目录下声明配置即可为 Antigravity CLI 挂载 BigQuery 与 Vertex AI 的 MCP 服务。
- 自动化工具调用链:Agent 接收自然语言 $\rightarrow$ 匹配技能蓝图 $\rightarrow$ 请求执行授权 $\rightarrow$ 调用 `list_table_ids` $\rightarrow$ 调用 `get_table_info` 提取 Schema。
- 成果奖励:现场成功通过 Antigravity CLI + MCP 连通 BigQuery 的学员获赠 Google Cloud 官方周边礼品。
## Notable quotes
> [00:04](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=4s) 来点人体工学伸展不会要了你的命 — David Cardozo
> [04:02](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=242s) 软件工程实践绝非 AI 的绊脚石,它们恰恰是智能体最需要的上下文。 — David Cardozo
> Skills shape how the agent thinks; MCP shapes what the agent can see and interact with. — David Cardozo
> [24:39](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1479s) 有没有人能告诉我,我们到底怎么查询这些表里一共有多少条数据? — David Cardozo
> [24:39](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1479s) 我听到有人报出答案了,你查到了对吧?一百……一百多万? — David Cardozo
> [26:12](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1572s) 大家能不能看看代码库,这个仪表盘的数据到底是从哪里读出来的? — David Cardozo
> [26:12](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1572s) not real-time, not at all — David Cardozo
> [28:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1706s) 请确保项目名称中不要包含空格,这样会省去很多麻烦。 — David Cardozo
> [31:26](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=1886s) give me an overview of the application on the current working directory — David Cardozo
> [37:24](https://www.youtube.com/watch?v=IcNJa6U5FlM&t=2244s) find all the BigQuery tables in my project — David Cardozo
## Mentioned
David Cardozo, Google Cloud, Google DeepMind, Ai4, 575 Labs, Antigravity CLI, Gemini, Gemini Code Assist, Model Context Protocol (MCP), BigQuery, Looker (thelook_ecommerce), FastAPI, Pandas, Cloud Shell, Cloud Shell Editor, uv, Google Developer Program, Caveman, Superpowers, Vertex AI
## Video description
David Cardozo - Google Developer Expert, Google Cloud
Important Note: This hands-on, interactive workshop is led by Google Cloud and is open to all Ai4 attendees at no additional cost. No RSVP or separate registration is required. To participate and get the most out of this session, please bring your own device (a laptop is recommended). Devices will not be provided on-site.
ABOUT THIS WORKSHOP:
Vibe-coding an MVP is fast — but adding features to it by throwing more prompts at the wall is how projects break. You need a way to bring structure and real-world context into AI-assisted development. That's where Antigravity CLI comes in — an AI coding agent that runs in your terminal. On its own, it can understand your code base, run commands, and edit files. Its real power comes from what you plug into it:
skills give the agent methodology and domain knowledge — a methodology skill enforces structured development workflows, while a domain skill provides accurate API knowledge so the agent doesn't hallucinate.
MCP servers give the agent live connections to external systems — letting it inspect real schemas, run queries, and validate its work against actual data instead of relying on stale training knowledge.
Skills shape how the agent thinks; MCP shapes what the agent can see and interact with. Together, they turn a general-purpose coding agent into one that follows a structured workflow grounded in real-world data. This codelab walks you through that combination, from installing plugins to shipping a feature.
[Source](https://www.youtube.com/watch?v=IcNJa6U5FlM)
Source quotes
[0:04] David Cardozo: 来点人体工学伸展不会要了你的命
[4:02] David Cardozo: 软件工程实践绝非 AI 的绊脚石,它们恰恰是智能体最需要的上下文。
David Cardozo: Skills shape how the agent thinks; MCP shapes what the agent can see and interact with.
[24:39] David Cardozo: 有没有人能告诉我,我们到底怎么查询这些表里一共有多少条数据?
[24:39] David Cardozo: 我听到有人报出答案了,你查到了对吧?一百……一百多万?
[26:12] David Cardozo: 大家能不能看看代码库,这个仪表盘的数据到底是从哪里读出来的?
[26:12] David Cardozo: not real-time, not at all
[28:26] David Cardozo: 请确保项目名称中不要包含空格,这样会省去很多麻烦。
[31:26] David Cardozo: give me an overview of the application on the current working directory
[37:24] David Cardozo: find all the BigQuery tables in my project
Source quotes
[0:04] David Cardozo: a little bit of ergonomics will not kill you
[1:06] David Cardozo: build me an app for a menu display
[24:39] David Cardozo: Is there anyone that can figure out how many items do we have in order, in order items? Or how many products do we have?
[37:24] David Cardozo: find all the BigQuery tables in my project
Original transcript
[0:04] All right. So, first of all,
thank you so much for coming on
[0:09] a Wednesday, the very last lab. Hopefully, this
is something that you'll find useful. But first,
[0:16] I know that some people here have been for a while
been sitting on. So, I would kind of invite you,
[0:22] if everyone can just raise up a little bit, let
us move our heads a little bit, let us stretch
[0:27] out a little bit. So, please, everyone, a little
bit of a ergonomics will not will not kill you. I
[0:33] know I see some faces that will not Yes, perfect.
Someone there really, thank you very much. So,
[0:39] let us just move our head to the left. Let us take
those things out. Right, someone from the right.
[0:47] I don't I don't I cannot believe that
there are so many people that just want to
[0:51] to to to to keep sit down. But, anyway. So, my
name is David Cardoso. Um I'm a I'm a senior
[1:00] engineer at the 575 Labs at opensource.com.
I'm also a Google Developer Expert. So, today,
[1:06] the thing that I wanted to talk a little
bit about is what is actually how to do So,
[1:09] let us do how to do a spec-driven development. And
what I mean what by spec-driven is that sometimes,
[1:17] I think we we kind of tend to forget that software
engineer software engineering is still useful. How
[1:23] to define a spec, how to define requirements.
And what this lab is going to show you is that
[1:28] we don't need to throw these things out of
the table. We can just we we can keep using
[1:32] good engineering. And what it means is just how
to give good practice to the agent in context.
[1:38] So, I wanted to start a little bit with uh what
vibe coding gets right, right? It's generally
[1:44] powerful thing that you can just throw a problem
and it will try to give you in plain language
[1:50] a good plan. There is no
setup, there is no boilerplate,
[1:54] there is no agonizing over different framework
decisions, but you can ship your MVP in less
[2:00] than an hour or even days. But what happens
when you need to maintain this kind of stuff?
[2:05] Is that really something that you could just
buy code maintaining? Recall that autoregressive
[2:11] models, it's it's a very strange way to generate
code, right? Like you just hey, you have a text,
[2:17] predict the next token, predict the next token.
And it's something that I do believe that it's
[2:23] very hard to maintain and it's uh it's it's it's
still is easy to lost the a good engineer practice
[2:31] if you just buy code all the way. So, the
question is how we do maintain this kind of stuff?
[2:36] So, um when we compare by coding to engineer best
practices, we can see that mostly many things just
[2:43] get dropped. Instead of proper requirements, you
just get hey, build me an app for a menu display.
[2:49] Instead of a planned architecture, the AI just
decide whatever is the most popular thing at
[2:54] the time, right? Nothing get documented. And in
conventional software development life cycles,
[3:00] this will be these are steps are critical and
if they are not done, they are they are just
[3:04] communication loss. And the and the development
time doesn't get things right and that just
[3:11] accumulates codes all over. And those things just
just get bigger the the scale we context. So, even
[3:19] if you have a 2 million context LLM, everything
the AI the AI picks a framework for you and then
[3:25] after in a long in a long running task, this
context might be lost and then somehow you end up
[3:30] with TypeScript on your Python application, which
is freaking weird. So, uh there is no guarantee
[3:36] and then the not only not only like the context
get lost, but the indeterministic behavior of LLMs
[3:44] can creep in. So, how we how how we can actually
have this technical debt not to accumulate and
[3:52] in an AI software development cycle where things
equal more cost and more iteration is more tokens.
[3:58] Let us see how to get this thing right. So,
the first thing is I want to show you like
[4:02] what is an agent loop. So, if you're a software
engineer, just skip this slide, but it will be
[4:08] just a read, evaluate, prompt, and loop. And it's
just a thinking process that what to act, what
[4:15] need to call, and each of these boxes actually
is going to take something of your context.
[4:21] So, the people that are my whole talk and if
you want not to stay for the next 40 minutes,
[4:25] long story short is that the engineer practices
that we are missing is isn't just obstacles to AI.
[4:31] They're exactly the context that the agent need.
Requirements and specs tell exactly what the LLMs
[4:37] need to build. The acceptance criteria,
the architecture and plan, the workflow,
[4:43] uh everything that falls in that order can
actually be beneficial to have in context. And the
[4:49] domain domain knowledge actually tells what is the
right way and the architectural way and what are
[4:53] the correct API patterns for it. So, let us map
everything that is actually when you do a loop,
[4:58] when you when you interact with with an LLM. So,
you have a context, the MCP calls, the skills,
[5:05] uh uh how do you observe observe the result,
and everything is just get mixed into the
[5:11] into the context. A skills shapes thinking,
the methodology and the domain knowledge,
[5:17] they domain they they dominate everything
that the LLM is going to act. So, together
[5:21] they answer the questions of what actually Hey,
what does the schema does look like? What is
[5:26] the application? How does it look like? And
this is just the full picture. At the end, an
[5:32] uh whatever LLM or coding agent that you are
using, you just need to have a good set of skills,
[5:38] a good set of MCP, what are the specification,
what are the plan, how are the status goals,
[5:42] and how to observe. And this is just a complete
loop engineering. And that's the difference
[5:46] between live coding and actually real software
engineering. Now, let us make it concrete. So,
[5:52] what you're going to build in the next few minutes
is that, hey, we're going to interact with the
[5:56] anti-gravity CLI. We're going to use some skills
that are publicly available. We're going to reduce
[6:04] the amount of uh of token usage using a tool
called Caveman. We're going to also interact
[6:09] with Google Cloud technologies. We're going to
query a Google BigQuery data set. And we're also
[6:14] going to have uh the how to how to interact
with the BigQuery MCP. And then at the end,
[6:19] it's just have a complete application that that
can just uh get analytics information from that.
[6:26] So, long story short, I just hopefully gives you
the enough motivation to actually how to do a spec
[6:31] engineering. Go to the QR code. You can You also
have enough credits to run this part. So, please
[6:39] um the first link is going to be the the the
uh the code lab for this for this workshop.
[6:46] And the second one is just so you can get uh
the $5 credits. So, my TAs will be around to
[6:52] look if you are doing that correctly. So, please
um scan the code and get the and get the credits.
[7:02] So, if everything goes right, for example,
let's see how it goes. You're going to see this
[7:09] uh part of the This are This is the platform the
Google Developer Program platform. It's a It's a
[7:14] good platform to to to join because there you can
find enough resources and all documentation and a
[7:19] lot of labs that will give you uh how to build
uh AI applications using using Google Cloud.
[7:28] So, when you see here, when you're going to
claim, here I already claim it, but if you want
[7:33] to see how to how will look like if you're not
if it's not um if it's not selected, let me see.
[7:46] Yeah. I I use my Sorry, you need a personal
Gmail account, sorry. But if it looks like
[7:58] Yeah.
[8:01] Okay, good. Perfect. So, I know that many
people already did it in the last session,
[8:06] but just keep it in mind because these are
new crates. So, it will help. [laughter]
[8:11] Perfect. And then let us start with the uh Yeah,
let us start with the with the collab part.
[8:19] So, every time that you go through So,
this is the the This is the collab the um
[8:25] This is the workshop. So, every time that you
do a step, you're going to see that at the at
[8:28] the left is going to join this part. So, what
we're going to do is that we're going to take
[8:34] an applications that read a CSV. It provides an
analytics analytics on that CSV. But nobody does
[8:41] data on CSVs anymore. I think that I it was a
long time that we talk about big data. And when
[8:46] people were talking about big data, they were
talking about big query, right? So, what we're
[8:50] going to do is we're going to buy code with spec
engineering how to move that application from CSVs
[8:56] to to big query. So, the thing that you need
first is to set up your environment. So,
[9:03] we're going to open Cloud Shell. If you click
on that, it will open the Google Cloud Console,
[9:08] the Google Cloud Shell, sorry.
You're going to select your account.
[9:20] Yeah. And what you can see here is
an open-source code editor called uh
[9:26] code editor that that that it's that it's
uh that is an interface to a Linux machine
[9:33] provided for free by Google Cloud. So, you can see
that at my left is going to be the Gmail account.
[9:39] And to your right is going to be the Cloud Shell.
And if you can take a look, it's just a plain
[9:48] Linux Linux machine. Ubuntu 24.04. And if you
are familiar with VS Code or Anti-Gravity,
[9:54] you're going to see that
it's exactly the same UI UX.
[9:59] Now, if you take a look,
[10:03] normally you will have nothing on those on those
workspaces on on those machines. So just a plain
[10:09] TXT file. So the first thing that we're going
to do on that is going to be a Git clone on that
[10:15] on the on the repository.
So we're going to clone it.
[10:22] Right? We can open the folder.
And we're going to open in here.
[10:35] And there, if you did correctly the
Git clone the Git Git clone part,
[10:39] you're going to see that you have
now a new a new folder called
[10:44] SD AGY BigQuery Dashboard, in which
you will find um the code for this lab.
[10:53] You can either open the folder or you can actually
tell directly to the Cloud Shell Editor to open
[10:58] the open that open that folder directly in
your your in through through the command line.
[11:12] Perfect. Anyone so far was hasn't been
able to Git clone the part? Oh. Yeah, sure.
[11:23] Has anyone been hasn't Has everyone been
able to Git clone the work the workshop yet?
[11:34] I thought So, whenever whenever is the
first time it will take it will take a
[11:39] while because Google will provision a
machine, install Linux on that machine,
[11:43] and then provide. So, just give it a 5 to 5
minutes to 4 minutes to to create it. But,
[11:48] if you have already done many of the workshops
up today, this should be pretty quick.
[12:04] All right. So, is anyone having problems
into getting to this point, having the code?
[12:15] Here?
[12:17] Uh here. Yeah.
[12:25] Good. So, it's a plain Python project. [laughter]
Uh it's an UV tool. You're going to find what
[12:34] are the dependencies. If you have working with
Python, this should be like pretty normal stuff.
[12:39] And then an UV lock and uh Yeah.
So, we're going to see in this part.
[12:47] And the cool thing is that if you have if if
you're you can you have access to Gemini in this
[12:53] uh in in in in this environment. It's Google
is Gemini code assist, but you can also find
[12:59] on the terminal. You can also find AGI there. So,
if at any point do you have questions or doubt,
[13:06] just open the terminal and then uh start the
anti-gravity CLI. You can Google authenticate on
[13:14] this. [snorts] So, if you go to AGI, just like the
Google OAuth indications, you open it, sign in,
[13:25] You your code to login into part and then you will
[13:32] I I will owe you the authentication, but here
it's you could do it you could do it on the on
[13:39] on your own workspace. But yeah,
the important thing is that
[13:49] The important thing is that if you go to
your file to to the to the file description,
[13:53] you will find a very simple Python project
in which you can read CSV data. And
[14:02] you will be able to see that it's just
an Python analytics dashboard for it.
[14:10] So now, important files, you're going to have a
main API that is going to be your fast API entry
[14:16] point. The data service that reads from CSV and
using pandas and the dashboard that is actually
[14:24] generated from it. So for to configure
the for configure the the terminal,
[14:30] it will be important that when you go to console
[14:36] See if I can put it here. console.cloud.google,
you're going to see all your projects. [snorts]
[14:42] It will strongly recommended that
you create a new project with a with
[14:47] with the with the new billing
that you have. So for example,
[14:53] you're going to find that after you redeem
the credits, you're going to have GT
[15:01] a GDP credit for it. So select that
project select that billing account
[15:05] and then we can create this project name as
[15:10] data analytics demo. Yeah, I forgot.
[15:16] I will take this name, but you can choose
any name that you want. Unfortunately,
[15:20] it has to be unique, so I'm going to take this
one, but you can create it um by yourself.
[15:34] And then if you want to go back to the Cloud Shell
on the top right corner, you can you can get the
[15:39] activate Google Cloud Shell. And you will be in
the same spot that we have that that we were just
[15:45] there. If you want to open the editor, you just
go to the open editor. I'll be connecting the same
[15:54] Google Cloud Shell. Now, important things. If you
have done projects before along the day, just make
[16:00] sure that the project that you select correspond
to the one that you are created. So, if you have
[16:06] questions about it, my TAs is going to be around.
But you can change the project via the GCloud
[16:14] config set project. Right? And you can
find the name of the project in the top
[16:21] right corner. So, for example, I'm going to
take this one. We're going to copy the ID.
[16:29] And then from here.
[16:32] Yeah, yeah. So, um
[16:37] I'm going to change the colors for
it. So, give me a sec. Turns light.
[16:47] Hopefully, that helps, right? Perfect.
[16:54] Good. So, the state that I want you guys to
be right now is that you have your project,
[16:59] you have a new project, you
have the code to run it.
[17:02] And then you're Is there anyone
that is not at this point? Good.
[17:11] So, just keep your hands raising
but to to search for people.
[17:24] If you don't have the project, recall that you
just need to get clone it, and then with Cloud
[17:28] Shell, you can start uh the editor on it. So,
um now what we're Now what we're going to do
[17:36] is that we're going to config just make sure
that whenever you you run gcloud config list
[17:51] uh
[17:58] Sorry. Just make sure that when you
when you have the gcloud's project list,
[18:04] that your project is actually listed on it.
[18:10] Good. I have a few projects there, so
[18:13] but you should only have the one that you
have that the ones that you have just created.
[18:20] Good.
[18:23] But now we can edit the configurations the
configuration files. So, here in the configured
[18:31] if you run the Cloud Shell edit configure
terminal SSH, you can actually copy uh
[18:37] um can actually config your project ID
and the name. So, for example, here.
[18:45] And we can save it. So, all this
information can be getting can be get
[18:51] can be obtained from here. So, the
data analytics demo project AI.
[18:59] And the project
[19:03] and the project number will
be obtained from Whoop.
[19:10] from the shell.
[19:15] Good. Perfect. So, with that you can you
can just configure your terminal. Now,
[19:25] we set up the we set up the
project so we can export it.
[19:38] And voila. So, we have uh we can just
run to uh to the configured terminal.
[19:46] And it couldn't find it. So, just give me one sec.
[20:14] All right. If you want to know a few
tricks about using the code editor,
[20:17] so if you have if you have a Mac, you
can do control shift P. Oop. Sorry.
[20:26] You can use uh command shift P
and then you can go to open uh
[20:33] command shift P and then
you can open a terminal uh
[20:39] terminal.
[20:48] Right? And then um whenever whenever you don't
see that in yellow is the name of your project,
[20:56] the important thing would be is that
you need to configure your terminal.
[21:02] So, here it cannot find. So, um
[21:09] Yeah. project ID.
[21:18] Voilà. So, if we do G Cloud out list,
[21:24] it should have your account, and it should also um
[21:36] config your set project, and
then let us define a project.
[21:44] Good. So, whenever you config your project, the
important thing is that this part it's on yellow,
[21:50] and it takes specified you create a new project.
If you're not If you don't have that, please see
[21:54] any Please see one of my TAs, so they will be
able to set you to set you into the project.
[22:00] And with that, you should be good to go.
So, now that we have our project selected,
[22:05] the thing that we want to know is actually a
activate activate the services that we need. So,
[22:11] for this workshop, we're going to
use BigQuery. So, let us activate.
[22:16] Recall that it has this This
This has to be in parentheses.
[22:21] And it will take 4 to 5 minutes to activate
BigQuery. We have $5 on our credits account, so we
[22:28] It will be able to It will be able to to
to We'll be able to use BigQuery on that.
[22:33] So, now that the API So, now that we have
both BigQuery and our Cloud Editor configured,
[22:41] let us take a look at our pro- our proms-
[22:45] our problem statement. So, BigQuery it's a You
can think of it as a on-source on-source data set.
[22:51] And the data set that we're going to take a look
today is going to be the e-commerce data set.
[22:55] The e-commerce data set is a synthetic data set
of 200 and 8,000 orders, materials, and items.
[23:02] And it also it's it's a good data set to actually
familiarize yourself on how to query for items,
[23:08] how to query for doing aggregation. And the
important thing is that we're going to use
[23:12] Anti-Gravity to interact with uh with it. So,
what we're going to do now is that we're going
[23:17] to create uh using the BigQuery CLI create a
data set. So, we're going to run this command.
[23:29] And what it's going to do
[23:34] Yeah. What it's going to do
is to create the data set
[23:38] uh the look e-commerce data set into your project.
[23:44] And then we're going to copy three tables from it.
[23:50] So, if everything goes all right, if you
have at any point an error that appears,
[23:54] just make sure that your project has
been activated completely. And if you
[23:58] have questions on how to activate a project,
please go back to the section one to execute it.
[24:05] So, all the three tables have been copied. So, let
us recap what we did. We we we did with BigQuery
[24:12] uh BigQuery create table uh uh create
data set the look e-commerce part,
[24:17] and then we copy from a public data we copy that
public from that public data set uh uh from that
[24:25] public data set we copy three tables. And then we
can just see what are the tables in that data set.
[24:32] And if everything looks all right, we have three
tables, both order items, orders, and products.
[24:39] So, we're going to do a stop around here, and
the question would be that can anyone tell me
[24:44] how we can actually query how many items are in
these tables? Is there anyone that can figure
[24:50] out how many items do we have in order in order
items? Or how How products do we have? [snorts]
[25:01] I hear an answer around. [laughter]
[25:06] How long I think you have
it, right? 100 100 something?
[25:13] [laughter]
[25:14] Perfect. So, you query that that part.
So, yeah. So, we have enough data to
[25:21] to actually do something cool about
it. Now, what we're going to query up
[25:28] by the total orders if you know
your SQL we'll be able to uh
[25:34] to do. So, we have around 130k orders for it. So,
at this point is there is there any person that
[25:41] hasn't been able to query the BigQuery data set
here so far? Any raise of hands? Okay. [laughter]
[25:55] Here.
[26:00] Important exercise if you know SQL,
[26:02] try to use a BigQuery uh CLI to
actually query these three tables.
[26:12] And now that we have enough Now that we have our
data, we have our tables, we can interact with the
[26:18] with BigQuery. What we can do is now
using the Python application to do it. So,
[26:23] we're going to use UV. If you don't If you're not
familiar with UV, UV is the standard tooling to
[26:29] actually work with Python applications.
We're going to sync the dependencies.
[26:45] Then, start the server, the fast API server
that has that has that that starts um
[26:54] an analytics uh dashboard. So, you can see
that it's waiting on the 8080 on the 8080 side.
[27:01] And then, we're going to Yeah. We're
going to do click here on the web preview,
[27:07] and this is going to forward the port 8080
to the server. So, preview on port 8080.
[27:14] And if everything goes all right, you have an
analytics dashboard. Now, um the question for you
[27:21] for you, if you can take a look take a look at the
code, where is the source code of this data? Could
[27:27] anyone try to find on the code on the on on on
the code base where does this um data come from?
[27:37] Anyone?
[27:40] From the CSV, right? Good question. Good. Nice.
Could anyone think about the way uh What are the
[27:47] limitations working with the CSV as a source file?
One, it can drift, right? You're waiting from your
[27:53] uh analytics engineer to give you the CSV
to run this kind of part. Second of all,
[27:58] it's not real-time, not at all, right? [laughter]
So, now let us try to see how we can adapt uh how
[28:05] we can adapt this to actually query the BigQuery
data set that we just that that we just created.
[28:12] So, before on that, yeah, and here is the data
source that you're going to find. So, before
[28:16] on that, has anyone has any problems in to get
into this point? Please, can you raise your hand?
[28:26] If not, I I'm assuming that
you are following with me.
[28:36] Uh I can help you if the TA is still So, let us
do 5 minutes. Once All right, so just just to keep
[28:44] in mind, please use project names that doesn't
have spaces on it. It will make the life easier.
[28:50] So now that you have set up your project,
we have set the the Python application,
[28:55] we can see everything on the If any If you have
any other more problems, please raise your hands.
[29:00] My My My TAs will be there. Now let us drop into
how does the spec um How does the spec driving
[29:08] part says? And this is going to be a little
bit I'm going to take uh a bit more of time.
[29:14] So now that the application is running, we can
start a new terminal on the cloud editor by this.
[29:20] And then we're going to do Just watch out here.
Important, if your project is not is not If your
[29:28] project that you are working is not selected
here or doesn't have the correct name, let us
[29:35] I'm going to show you. Let us go
back to the set up your environment.
[29:40] And we're going to Google gcloud config to set
project. For example, and then for me was uh
[29:51] the data analytics demo AI for. Perfect.
[29:58] So now that I have the correct environment for
it, right? We're going to call the AGI AGY uh CLI.
[30:08] So here is where I had some issues, and then I'm
going to debug live with you guys. So we're going
[30:14] to use the Google uh all authentication process.
We're going to click here to authenticate. We're
[30:20] going to open it. We're going to select
our account. Sign in. Copy your code.
[30:28] We copy our authorization code. And voila. Oops.
Sorry. Yeah. Then we have to configure the AGI
[30:38] the AGI CLI. So cool things to configure, you
can change your color scheme. You can see how
[30:45] it works on on on on your code. I'm going to
keep just the terminal one so you guys can see.
[30:53] Yep. Um, let me see, open a little bit more.
[31:00] And then some terms and conditions
on using the AGI one. Then we done
[31:08] See if it goes. Yeah.
[31:13] And then you use anti-gravity CLI request
permission to read and execute files there.
[31:18] So you have problems with authentic
authentic authentication as I as I did,
[31:22] please see one of the of the TAs
and it's just a matter following
[31:26] the correct clicks. So now, the anti-gravity
CLI, this is cool this is the agent this is the
[31:35] agent tool from from Google. Previously
we had Gemini CLI, but it's being over
[31:42] overshadowed by the anti-gravity CLI.
The anti-gravity is actually a tool from
[31:45] DeepMind so it's actually more well developed
and the thing is that now you have access
[31:51] to um to Gemini and to learn from it. So for
example, give me an overview of the application
[32:04] on the current working directory. So if everything
go right, it's going to expand, it's going to read
[32:10] the readme, it's going to read all the code. And
all the operations and all the two corners you're
[32:14] going to find here. So you can ask ask your
questions for it. So you can interact with the
[32:20] with the AGI format. You can also give commands
through the shell with the following with the
[32:24] following in the following slide. So if I want
to run a bash commands for example, I will
[32:30] I will press the bank sign and then do LS. So see
that in here my shell actually changed to be a
[32:38] a shell terminal. And it's going to execute the
command in Linux and then return the return the
[32:46] the return the the output to me. So
important, has anyone had any problems
[32:52] using the antigravity AGI CLI? No? Okay,
we have one here. Hopefully I have uh Yeah.
[33:03] One of my TAs will be back. Perfect. So now that
you have your AGI, right? So this is a normal
[33:14] command line interface. So here we are on
the bash on the on on on the on the bash
[33:20] shell. So let's clear. With clear, you can just
remove everything that is on top. AGI version,
[33:27] you should be on the version 1.19. If not, just
let me know. We'll We'll help you to upgrade.
[33:35] And then uh yeah. So here is you can find all
the instruction on how to log in correctly.
[33:42] Just don't give the authentication code to anyone
because they can actually use your code for your
[33:47] for for your account. And then to get out, yeah,
probably I didn't explain that, but when you go to
[33:53] the AGI side and if you want to get out, you just
need to do control D and control D again to exit.
[33:59] All right? Perfect. We're already there. We're
already very close. So now, how do we extend
[34:08] AGY? So now um Gemini doesn't know anything
from real time. The process to train an
[34:16] LLM is extremely costly one. So sometimes we
don't have data from 2027. Or if API changes,
[34:23] the LLM is will memorize something from an old
API. So how we can bring this like new tools,
[34:30] uh new APIs, new versions from it. So
what we can do is we can bring skills.
[34:35] So, instead of the LLM guessing, you're going
to show like a blueprint on how the on how the
[34:43] on on how to use a tool, how to use another
program. And then skills are just you can see
[34:50] that this just a barely YAML side that will give
you description of where are the tools that you're
[34:55] going to have. So, this is a this is just a plain
YAML file. And how to extend this kind of part is
[35:02] is called something that is called progressive
disclosure. What is progressive disclosure?
[35:07] So, LLMs have this problem that when you do a
long task, the context get filled. And as soon
[35:14] as the context gets extremely cluttered, LLMs
will tend to perform badly on the last tokens.
[35:22] So, you can extend this by skills and the skills
that we're going to see in the labs are going to
[35:27] be the Google skills that is going to is going
to teach is going to expose to the AGI client
[35:34] how to use BigQuery, how to query Google
Cloud. The superpowers is going to be how to
[35:40] how to do a spec driving development and how to
enforce it. And finally, the caveman just to show
[35:46] you how you can actually reduce instead of being
verbose Gemini to be verbose on the output, we're
[35:52] going just to remove all the fillers so that the
LLM produce less tokens. So, how to install them?
[35:59] You go to your terminal and then
MPX skills at Google skills.
[36:08] And here is going to open a relp that will
contain all the skills that you need to install.
[36:14] So, for for this for this workshop, we're going
to just BigQuery basics. You can select with space
[36:20] and then we're going to use the other one
would be Cloud Run basics. Cloud Run basics.
[36:30] So, as you can see, as soon as they are selected,
[36:33] uh it will be automatically installed to AGI,
but if you need to install to any other codex,
[36:40] uh cloud, or everything, it will be
automatically you can select it from that.
[36:45] So, you can just continue, and then the
project score will be in the project side.
[36:51] So, you proceed with installations. You can also
install a new skill that is called find skills.
[36:57] And finally, also you can also bring external
ones, not from the skills official repositories,
[37:04] but from actually from GitHub. So, we're going
to bring superpowers and the caveman ones.
[37:10] So, now that they are executed, and we want
to take a look at the list I have two minutes,
[37:15] you can see that we have superpowers and
caveman installed for the AGI plugins.
[37:24] So, how to run MCP from that? You can just create
on So, here we're going to create a agents folder.
[37:32] We're going to configure what are the MCP configs
uh for for BigQuery, so we can just execute
[37:41] and code it. 1 minute, sorry. And if we act when
when when this is selected, and we go to AGI,
[37:50] and we select the a skill MCP, we're going to have
the have all the plugins needed, both the vertex
[37:57] MCP server and the BigQuery uh part. So, now that
I have Now I have the big Now I have the BigQuery,
[38:05] I can actually uh Let's see if it's
in lies initialized initializing.
[38:18] I can now the
[38:23] We can find find all the tables in
my project all the big query tables.
[38:37] In my project
[38:41] And then what we're going to see that is going
to find the scale of big query basic the skills
[38:46] I'm going to call the MCP tool. Uh it's
going to ask for some permissions. [snorts]
[38:54] And it's going to call the tool list table IDs.
You can see the you can see the trace back here.
[39:02] Then the get table info.
[39:06] Yeah.
[39:09] And then you can see that we have all the
tables that we copy on the three of them.
[39:12] So I have a few seconds left. So I have some I
have some some swag for people that got into that
[39:18] point. So if you can bring your laptop and show
me that you were to query the tables through AGI
[39:25] feel free to come here and and pick your swag. You
can follow the you can follow the workshop just
[39:31] to follow on that but the cool thing that I want
to show you is that how you can use AGI and the
[39:37] skills power for for installing plugins
through through AGI. So I think that I have
[39:46] closed the time but please see me if
you have any any more questions. If you
[39:51] have questions about the workshop
and the lab that should be good.