5-Day AI Agents Intensive — Assignment Journal
5-Day AI Agents: Intensive Vibe Coding Course With Google
Kaggle × Google · June 15–19, 2026 · Team: Trifecta Agent
This journal chronicles our journey through the intensive 5-day agentic programming course. Over the course of five days, we transitioned from basic natural language prompting to building structured, multi-service, zero-trust agent workflows. What follows is a reflective developer diary capturing our design discussions, technical errors, and practical learnings. We hope this serves as an honest account of what it felt like to build agentic systems under pressure and how our perspective on code construction evolved.
Table of Contents
- About This Journal
- Meet the Team
- The Course
- Day 1 — Atmospheric
- Day 2 — Skyhook
- Day 3 — Zephyr Weather Assistant
- Day 4 — VibeCarapace
- Day 5 — AuditSentry
- Across 5 Days — What We Learned
- From Assignments to Capstone
- Acknowledgements
About This Journal
This repository houses the five daily assignments we completed during the 5-Day AI Agents Intensive. Each day's work is organized in its own directory, accompanied by detailed codebase files, environment configurations, and individual build documentation. The structure is designed to guide a reader through our progress step by step. You can explore our work day by day or jump directly to the overarching reflections at the end.
In practice, "vibe coding" was not just about typing natural language prompts and hoping for the best. It felt like a continuous, collaborative dialogue with an AI coding agent, where our role shifted from writing boilerplate syntax to system architecture, context engineering, and validation checks. There were moments of genuine surprise where the AI generated highly creative UI graphics and math trajectories. There were also moments where we had to intervene manually to fix virtual DOM layout bugs, clean up memory leaks, or restructure database session files.
The table below provides a directory map of our workspace folders and the corresponding project themes:
| Day | Folder | Project | Theme | Quick Link |
|---|---|---|---|---|
| 1 | D1-Introduction to Agents & Vibe Coding/ | Atmospheric | Introduction to Agents & Vibe Coding | → Day 1 |
| 2 | D2-Agent Tools & Interoperability/ | Skyhook | Agent Tools & Interoperability | → Day 2 |
| 3 | D3-Agent Skills/ | Zephyr Weather Assistant | Agent Skills | → Day 3 |
| 4 | D4-Vibe Coding Agent Security and Evaluation/ | VibeCarapace | Vibe Coding Agent Security and Evaluation | → Day 4 |
| 5 | D5-Spec-Driven Production Grade Development/ | AuditSentry | Spec-Driven Production Grade Development | → Day 5 |
In reviewing this journal, developers can trace our evolution from client-side UI animations to server-side tool integrations, modular skill packaging, pre-commit security perimeters, and stateful workflow resumption. We suggest reading the days in sequence to see how each day's architectural decisions laid the foundation for the next. By understanding the choices we made each day, readers can see how we gradually built the safeguards needed to run agents in real-world scenarios.
Meet the Team
We are a group of three developers who came together with diverse backgrounds in backend systems, user experience, and security engineering to tackle this intensive course.
Godfrey T R · Lead AI Architect · GitHub ↗
Spearheaded the design of the multi-agent graph hierarchy, state models, and structured orchestrations using the Google Agents SDK.
Arjun S N · Frontend Systems · GitHub ↗
Crafted the responsive SPA student workspace portal, integrated the FastAPI backend layers, and polished the responsive telemetry layouts.
Abdul Razeek A · Security Engineer · GitHub ↗
Engineered the Presidio protection safeguards, integrated FastMCP vector store ingestion, and designed secure human review interrupts.
We formed this team at the start of the course because we wanted to see how our respective disciplines would adapt to agent-driven development. Godfrey focused on agent orchestration, Arjun ensured the user experiences remained responsive, and Abdul Razeek built the security perimeters. By working together, we learned how to align non-deterministic AI logic with predictable, secure software engineering practices. We established a daily sync to review agent prompts, audit generated code, and resolve environment issues, ensuring that our collective skills translated into cohesive integrations.
The Course
The 5-Day AI Agents Intensive was a hands-on curriculum focused on graduating local, text-based AI prototypes into governed, stateful, and observable agent systems. The course focused on the transition from simple prompt engineering to agentic software engineering.
🎓 5-Day AI Agents: Intensive Vibe Coding Course With Google Hosted on Kaggle · June 15–19, 2026 · Track: Agents for Good — Education
The daily curriculum was organized around the following themes:
| Day | Date | Theme |
|---|---|---|
| 1 | Jun 15 | Introduction to Agents & Vibe Coding |
| 2 | Jun 16 | Agent Tools & Interoperability |
| 3 | Jun 17 | Agent Skills |
| 4 | Jun 18 | Vibe Coding Agent Security and Evaluation |
| 5 | Jun 19 | Spec-Driven Production Grade Development in the Age of Vibe Coding |
We entered the course hoping to learn how to move beyond basic chatbot scripts. Godfrey wanted to master stateful multi-agent graphs, Arjun aimed to build responsive user interfaces that integrate with agent lifecycles, and Abdul Razeek came to design security perimeters to block prompt injection and data leaks. We expected that the course would require us to re-examine traditional SDLC boundaries, as the role of the developer shifts from manual coding to instructing, observing, and safeguarding autonomous agent systems.
Day 1 — Atmospheric
Day 1 started with a blank directory and a lot of questions.
What the Day Taught
The opening session introduced us to the shift from writing imperative code to conducting autonomous developer agents. We focused on setting up our local environments, configuring agent harnesses, and practicing vibe coding. The course emphasized that developer productivity is maximized when natural language serves as the primary programming interface. We learned that the agent performs best when provided with clear, high-level objectives rather than granular commands.
We learned that building physics-based Canvas particle systems using traditional manual coding requires writing boilerplate draw loops, viewport handlers, and update math. By shifting the implementation details to our coding agent, we were able to focus on high-level design constraints. This exercise showed us how to guide the AI through step-by-step refinements, verifying changes directly in the browser. We observed that the model excelled at translating visual descriptions into canvas rendering parameters, such as color gradients and particle counts.
However, we also realized that vibe coding requires developer intervention to resolve performance bugs. When the AI generated code that ran slowly on large viewports, we had to step in as diagnostic leads. We pasted errors and directed adjustments to establish clean state cleanup cycles, ensuring the app met its performance goals. We discovered that a lack of strict lifecycle management leads to gradual browser slowdowns, highlighting the importance of developer oversight.
What We Built
Atmospheric — A minimalist single-page React web application that renders physics-based particle systems of falling snowflakes and rising balloons on a DPI-aware HTML5 Canvas.
The simulator features two modes: a falling snowflake system with horizontal sine-wave drift and a rising helium balloon animation with wavy string paths drawn via bezier curves. Users interact with the app through a control card in the center of the screen, which triggers particle generation cycles. The UI displays progress bars and status updates that remain synchronized with the canvas rendering loop.
To maintain high performance and prevent lagging frames, the architecture separates the React component state from the active canvas render loop. High-level properties (such as the active effect type and timer countdown) are managed by React. The coordinates, velocities, and fading alpha properties of the particles are stored in mutable plain arrays inside React refs, bypassing React's Virtual DOM checks.
[ User Clicks ] │ ▼ [ App.tsx ] ────(Resets Timer) │ ▼ [ AtmosphereCanvas ] ◀──(Canvas Resize) │ (Spawns Loop) │ [ Particles Ref ] ──▶ [ Update Physics ] │ │ │ (Sine Drift/Wobble) │ │ ▼ ▼ [ 2D Context ] ◀─── [ Alpha Decay ] │ ▼ [ Frame Repaint ]
An interesting design decision was decoupling the drawing loop from React. Initially, the collection of particles was stored in a React state array. Updating this state on every frame caused React to perform thousands of Virtual DOM comparisons. This slowed down the framerate, especially on high-DPI displays. Decoupling the physics loop and drawing directly to the canvas context restored a smooth 60 FPS.
We also designed the canvas to be DPI-aware. High-density screens render standard canvases with a blurry finish because the physical pixels outnumber the logical coordinates. We implemented a ResizeObserver that reads window.devicePixelRatio, sets the canvas element's internal bitmap size (e.g., canvas.width = rect.width * dpr), and scales the drawing context dynamically using ctx.scale(dpr, dpr). This ensures that geometries, gradients, and snowflake lines remain crisp on all screen configurations.
We structured the type definitions in types.ts (Day 1) to enforce structure on the simulation parameters:
LANG: typescriptexport interface SnowflakeProperties { driftSpeed: number; driftAmplitude: number; driftPhase: number; radius: number; } export interface BalloonProperties { wobbleSpeed: number; wobbleAmplitude: number; wobblePhase: number; width: number; height: number; }
How We Built It
We began by bootstrapping the workspace using Vite, React, and Tailwind CSS v4. Our coding agent drafted the layout of the central dashboard card. The initial prompt asked the AI to build a clean control card with buttons to trigger snowflakes and balloons. Once the UI was set, we instructed the agent to build the HTML5 canvas layer.
The first physics implementation was a basic falling particle script. The agent generated simple white circles that descended vertically. We refined this behavior by asking the AI to add horizontal swaying. The agent generated a sine-wave offset function: driftOffset = Math.sin(p.snowflake.driftPhase) * p.snowflake.driftAmplitude. This created a realistic drift effect. We then added the balloon mode, prompting the agent to draw ellipses and render wavy string lines using quadratic bezier curves: ctx.bezierCurveTo().
We structured the physics calculations in AtmosphereCanvas.tsx (Day 1) inside a requestAnimationFrame recursive loop. The update block computes coordinates:
LANG: typescript// Snowflake horizontal drift calculation const sf = p.snowflake!; sf.driftPhase += sf.driftSpeed; p.x += Math.sin(sf.driftPhase) * 0.5; p.y += p.speedY;
For helium balloons, the agent calculated wobble offsets and balloon string structures:
LANG: typescript// Balloon wobble and string drawing const bl = p.balloon!; bl.wobblePhase += bl.wobbleSpeed; p.x += Math.sin(bl.wobblePhase) * 0.3; p.y -= p.speedY; // rising speed
When we tested the application with rapid button clicks, we noticed that switching modes caused old particles to linger. This created a visual overlap of snowflakes and balloons. We resolved this by modifying the trigger handler in App.tsx (Day 1) and the canvas update block in AtmosphereCanvas.tsx (Day 1) to clear the active array immediately upon mode changes, ensuring clean animation resets.
The Hard Part
The hardest challenge was resolving the performance lag caused by React state updates. In early builds, updating particle coordinates on every frame triggered heavy Virtual DOM reconciliation. This dropped the frame rate to under 20 FPS on large viewports.
We resolved this by using React useRef arrays to store the active particles. The canvas render loop reads and writes directly to these refs, bypassing React's state updates. We configured React state updates to trigger only when the simulation starts or when all particles have faded out, restoring a consistent 60 FPS.
What We Learned
Decouple High-Frequency Updates from UI Frameworks
For smooth rendering, avoid storing fast-changing animation coordinates in React state. Using mutable refs and updating the DOM directly via Canvas APIs keeps the UI responsive.
DPI-Aware Viewport Adjustments
Canvas elements look blurry on high-density screens unless scaled using window.devicePixelRatio. Adjusting internal dimensions and scaling the context is necessary for crisp graphics.
Controlled Particle Lifecycles
Always implement automated memory cleanup to remove out-of-bounds elements. This prevents memory leaks and CPU overhead during long sessions.
Disable HMR During Agent Edits
Vite's Hot Module Replacement (HMR) can cause page reload loops during automated code writes. Setting DISABLE_HMR=true during development stabilizes the environment.
Structure Scales, Vibes Don't
While conversational prompting is effective for prototyping, maintaining design consistency and performance requires structured type validation and clear architectural boundaries.
The Project at a Glance
| Project | Atmospheric |
| Day Theme | Introduction to Agents & Vibe Coding |
| Type | Web Application / Particle Simulator |
| Language | TypeScript 5.8.2 |
| Framework | React 19.0.1 + Vite 6.2.3 |
| Model / API | Google Gemini (code-gen assistant) |
| Key Feature | 60 FPS Decoupled Canvas Physics Loop |
| Run command | npm run dev |
| Documentation | Atmospheric.md (Day 1) |
🧠 Concept difficulty: Easy
🔨 Build difficulty: Medium
⚡ Most surprising moment: Decoupling our draw loop from React state restored the frame rate from 20 FPS to a smooth 60 FPS.
Day 2 — Skyhook
Day 2 moved us from the browser sandbox to local tool integration.
What the Day Taught
Day 2 introduced us to extending agent capabilities beyond text generation. We explored how agents interact with the external world through APIs, CLI execution environments, and tool routing. The course focused on building custom utilities that agents can invoke to perform real-world actions. We learned that structuring these utilities correctly is essential for enabling models to run operations on our behalf.
We came to understand that agents cannot easily return large binary payloads in chat contexts. When an agent generates a document, an image, or a dataset, it needs a way to store the file and return a secure reference. Exposing APIs as command-line helpers allows agents to archive files and present formatted hyperlinks to users. This pattern isolates the agent from binary transfer details, keeping context clean.
However, we also learned that hardwiring external APIs requires managing authorization lifecycles. We spent time setting up OAuth2 desktop flows and token persistence. This ensured that subsequent runs could run programmatically without interrupting the user. We analyzed the mechanics of credential management, ensuring our local setup handled token expiration gracefully.
What We Built
Skyhook — A command-line utility and agent tool written in Python that automates secure OAuth2 authentication and uploads local files to Google Drive using resumable chunked streams.
The script, upload_to_drive.py (Day 2), acts as a command-line tool. It automates authentication checks, refreshes tokens in the background, and uses Google's resumable protocol to upload files. Users can override default names and target specific folder IDs.
The architecture comprises three core systems: the Authentication Manager, the API Discovery Wrapper, and the Resumable Upload Engine. The uploader connects the local file system to Google Identity Providers and Google Drive v3 endpoints. It uses local configuration files (credentials.json and token.json) to manage access.
[ CLI / Uploader ] ──▶ [ verify_file ] │ ▼ [ get_credentials ] ──▶ [ token.json ] │ (Refresh token) ▼ [ Discovery Client ] │ ▼ [ MediaFileUpload ] ──(1MB chunks) │ ▼ [ Google Drive ] ──▶ [ CLI Progress ]
An important technical decision was implementing chunked uploads. Loading entire large files into memory can cause out-of-memory crashes in resource-constrained agent environments. By utilizing MediaFileUpload with a 1MB chunk size, the script streams files in segments. This design prevents memory spikes and allows the tool to run reliably under low-resource environments.
When executed, the tool outputs real-time upload progress to the console. It uses carriage returns (\r) to overwrite the console progress bar on each successful chunk. Upon completion, the script outputs the remote file ID and a shareable web link. The shareable URL is formatted to allow immediate browser access, facilitating quick validation by the calling agent.
We structured the error handling in upload_file to capture API exceptions:
LANG: pythonexcept HttpError as error: print(f"\rAn error occurred during upload: {error}") sys.exit(1)
How We Built It
We started by configuring a Google Cloud project and enabling the Google Drive API. We set up our OAuth consent screen, restricting access to the drive.file scope. This scope limit ensures the uploader can only access files it creates. We then downloaded the client secrets file, naming it credentials.json in our local workspace.
Our coding agent helped write the core logic. We began with the authentication flow, writing a helper that launches a loopback server (InstalledAppFlow.run_local_server) to capture Google's redirect. Once we verified that this generated a valid access token, we wrote the uploader logic. The script uses Python's native mimetypes library to automatically detect and assign the correct MIME type metadata.
The chunked uploader loop was structured using the Google client library callbacks:
LANG: python# Chunked upload implementation media = MediaFileUpload(filepath, mimetype=mime, resumable=True, chunksize=1024*1024) request = service.files().create(body=metadata, media_body=media, fields="id,webViewLink") response = None while response is None: status, response = request.next_chunk() if status: percent = int(status.progress() * 100) sys.stdout.write(f"\rUploading: [{percent}%]") sys.stdout.flush()
We tested the uploader by sending text files and images. During testing, we noticed that uploading files over 10MB felt unresponsive without feedback. We prompted the agent to integrate request.next_chunk() inside a loop. The script updates a console progress bar in real-time, improving usability.
The Hard Part
The hardest challenge was configuring the local redirect server for desktop OAuth2 authentication. Because CLI tools run in local terminal environments, catching Google's authorization redirect requires setting up local ports without firewalls blocking the loopback connection.
We resolved this by using the InstalledAppFlow library. We configured the uploader to save credentials to token.json after the initial browser login. On subsequent runs, the tool uses the stored refresh token to update the access token in the background, avoiding browser prompts.
What We Learned
Background Token Management
Save OAuth tokens to a local JSON file. This allows CLI and agent tools to run headlessly after the initial login, using refresh tokens to maintain access.
Resumable Chunked Streams
Use resumable uploads to handle large files. This keeps memory usage low and allows uploads to recover from temporary network drops.
MIME Type Verification
Use automated MIME type detection to ensure files are interpreted correctly when stored. Command-line overrides provide flexibility.
Principle of Least Privilege
Use restrictive API scopes (e.g., drive.file instead of drive). This limits potential security risks in development environments.
CLI Feedback Loops
Provide terminal progress updates for long-running actions. This keeps users and calling agents informed of progress.
The Project at a Glance
| Project | Skyhook |
| Day Theme | Agent Tools & Interoperability |
| Type | CLI Utility / Agent Tool |
| Language | Python 3.11+ |
| Framework | Google API Discovery Client |
| Model / API | Google Drive API v3 |
| Key Feature | Resumable Chunked File Uploads |
| Run command | python upload_to_drive.py sample.txt |
| Documentation | Skyhook.md (Day 2) |
🧠 Concept difficulty: Medium
🔨 Build difficulty: Hard
⚡ Most surprising moment: Google's API discovery client lets us build dynamic Python wrappers for cloud endpoints with very little boilerplate code.
Day 3 — Zephyr Weather Assistant
By Day 3 the architecture was starting to feel real.
What the Day Taught
Day 3 focused on "Agent Skills"—moving beyond basic scripting to equip agents with procedural memory. We explored how to structure capabilities as self-contained skills, enabling agents to execute complex, step-by-step tasks. We used the Google Agent Development Kit (ADK) to build, test, and register these modular skills. We came to appreciate the distinction between simple python script bindings and structured, reusable reasoning directories.
We came to understand the risks of context bloat. Overloading a single system prompt with instructions leads to performance decay and increased token costs. A progressive disclosure design pattern structures skills in isolated directories, loading only metadata at startup, and pulling instructions into memory only when needed. This approach keeps the model focused and reduces trace overhead.
We also explored Agent-to-Agent (A2A) protocol integration. This standardizes how agents declare capabilities and communicate with each other using JSON-RPC. This allows developers to build modular, cooperatively executing systems, where one agent can delegate sub-tasks to specialized peer agents.
What We Built
Zephyr Weather Assistant — An autonomous weather assistant and agent skills workspace built on the Google ADK, featuring local tool call routing, A2A communication endpoints, and progressive skill loading.
The assistant combines a FastAPI backend server with the Gemini Flash model. The agent binds local python tools (get_weather and get_current_time) to handle weather queries and time lookups. The server exposes an A2A JSON-RPC interface at /a2a/app and registers a dynamic agent card.
The repository also includes an Agent Skills Lab with four distinct skills: Git Commit Formatting, Asset-Backed License Injection, Few-Shot Pydantic Conversion, and Script-Based SQL Schema Validation. The system architecture coordinates client surfaces, the ADK runner execution path, the model reasoning loop, and the skill database.
[ agents-cli / REST ] │ ▼ [ FastAPI App ] ──▶ [ Lifespan Runner ] │ │ │ (Loads Session) ▼ │ [ Root Agent ] ◀──────────────┘ │ (ReAct Loop eval) ┌─────┴──────┐ ▼ ▼ [ get_weather ] [ get_current_time ] │ │ └─────┬──────┘ ▼ [ Skills Database ] ──▶ [ dynamic load ]
An interesting design decision was using a centralized service registry in services.py (Day 3). By mapping session and artifact resources to shared:// schemas, the REST API, the A2A endpoint, and CLI playground tools all reference the same memory store.
For the skills lab, the configuration parameters were structured inside dynamic YAML frontmatter blocks inside SKILL.md files:
LANG: yaml--- name: "database-schema-validator" description: "Checks SQL files for structural errors and reserved keyword collisions." ---
When running, the agent evaluates incoming queries using a ReAct loop. If it needs real-time weather information, it invokes get_weather locally. The telemetry pipeline records trace metrics and uploads GenAI logs to Google Cloud Storage logs buckets.
In Level 4 (SQL Validation Skill), the agent executes validate_schema.py inside the skills runner:
LANG: python# validate_schema.py excerpt import sys import sqlparse def check_sql(file_path): with open(file_path, 'r') as f: content = f.read() parsed = sqlparse.parse(content) # Checks key validation definitions and table structures # Prints diagnostic details
How We Built It
We began by setting up the workspace with Astral uv and initializing the configuration with agents-cli setup. We created agent.py (Day 3), writing local Python tools with detailed docstrings. The ADK parses these docstrings to generate schemas that the Gemini model uses to invoke the tools.
Next, we focused on A2A routing, implementing JSON-RPC handlers in a2a.py (Day 3). This registers a dynamic agent card at /a2a/app/.well-known/agent-card. This card allows other agents to query its inputs and RPC endpoints.
For the skills lab, we configured the four skill folders in .agents/skills/. We wrote a custom validation script for the SQL schema checker to validate table definitions in bad_schema.sql (Day 3). We verified that the agent could run the validation script and report issues.
The progressive execution of skills follows this sequence:
- Load Skill Metadata: Read YAML block from SKILL.md (Day 4) to register matching definitions.
- Intercept Input: Match user query against active skills.
- Retrieve Assets: Load template text or scripts on demand from the skill's resources directory.
- Execute Run: Run the underlying script or compile prompt examples to construct the final response.
The Hard Part
The hardest challenge was configuring the OpenTelemetry pipeline to trace GenAI model interactions. Initially, enabling tracing caused duplicate logs in Google Cloud Logging and leaked sensitive prompt data in public trace payloads.
We resolved this by configuring OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=NO_CONTENT in telemetry.py (Day 3). This limits tracing to latency metrics and metadata. We configured the raw prompt logs to upload securely to GCS buckets, keeping trace logs private.
What We Learned
On-Demand Progressive Skill Loading
Isolate skills to separate directories and load them dynamically. This prevents system prompt bloat, keeps context windows clean, and reduces token costs.
Trajectory Validation via ADK Eval
Do not evaluate agents based only on final text outputs. Assert the tool execution path (using EXACT or IN_ORDER checks) to verify correctness.
Standardized Session Registries
Centralize session storage using shared:// URI mappings. This ensures REST APIs and A2A interfaces access consistent history.
A2A Protocol Declarations
Declare capabilities using well-known agent cards. This standardizes discovery and interaction in multi-agent environments.
Telemetry Filters Protect Privacy
Implement metadata-only filtering on trace collectors. This records operational latencies without logging sensitive user details.
The Project at a Glance
| Project | Zephyr Weather Assistant |
| Day Theme | Agent Skills |
| Type | Autonomous Agent + Agent Skills Lab |
| Language | Python >=3.11, <3.14 |
| Framework | Google ADK 0.6.0 + FastAPI ~=0.111.0 |
| Model / API | Gemini Flash (gemini-flash-latest) |
| Key Feature | Progressive Skill Loading & A2A Routing |
| Run command | agents-cli playground |
| Documentation | Zephyr Weather Assistant.md (Day 3) |
🧠 Concept difficulty: Medium
🔨 Build difficulty: Medium
⚡ Most surprising moment: The model successfully executed our custom SQL validation script on a database schema, identified key collisions, and returned formatting recommendations.
Day 4 — VibeCarapace
Day 4 was the day we realized that non-deterministic vibe coding requires secure runtime boundaries.
What the Day Taught
Day 4 focused on AI Agent Security and Evaluation. While previous days taught us to equip agents with tools and skills, Day 4 addressed security challenges like prompt injection, credential exposure, and unauthorized tool execution. The course focused on surrounding agents with an external safety envelope. We analyzed the shift from trusting models to verifying their execution limits.
We came to understand the security risks of treating user inputs directly as instructions. When an agent is exposed to user-provided text, adversarial prompts can attempt to bypass business rules or execute unauthorized tools. We must validate and sanitize data before it reaches the model context. This concept of "Context-as-a-Perimeter" ensures that non-deterministic boundaries remain protected.
We also explored "shift-left" security models for development workspaces. We configured local pre-commit hooks to block hardcoded API keys and set up runtime execution guards. These guards intercept and validate tool commands before they execute on host machines. We learned how static gates combined with dynamic hooks create a layered defense system.
What We Built
VibeCarapace — A security-first agentic framework utilizing Google ADK 2.0 to implement pre-commit static analysis, dynamic PII redaction, prompt injection screening, and command-line execution guards.
The project contains two main systems: an ambient expense report agent (ambient-expense-agent) and a secure shopping assistant sandbox (shopping-assistant). The expense agent parses incoming Pub/Sub webhook payloads, scrubs PII, scans for injections, and routes claims. The shopping assistant uses git hooks, Semgrep rules, and shell interception hooks.
The security architecture implements multiple layers of defense. The first layer consists of pre-commit static analysis rules. The second layer uses regex-based input scrubbing and injection heuristic detectors. The third layer features PreToolUse execution hooks to validate shell commands, and the final layer utilizes Human-in-the-Loop gates to pause high-risk actions.
[ Input Event ] ──▶ [ parse_expense_email ] │ ▼ [ security_checkpoint ] ├──[ Scrub PII ] └──[ Detect Injection ] │ ┌────────┴────────┐ [CLEAN] [FLAGGED] │ │ [route_by_amount] │ ┌───────┴───────┐ │ [< $100] [>= $100] │ │ │ │ ▼ ▼ │ [Auto Approve] [review_agent] │ │ │ │ └───────┬───────┘ │ ▼ ▼ [ request_approval HITL Node (Pause) ]
An interesting design decision was the shell command execution hook in hooks.json (Day 4). When the agent attempts to trigger run_command, the ADK intercepts the call and runs a Python validator script. The script checks for destructive commands (e.g. rm -rf /) and aborts execution if they are detected.
We configured the Semgrep scanning rules in rules.yaml (Day 4) to run on local commits. The rules target Google API key prefixes to prevent accidental leaks:
LANG: yamlrules: - id: detect-hardcoded-google-api-key pattern-regex: 'AIzaSy[A-Za-z0-9_\-]*' message: "Leaked credentials detected." languages: [python] severity: ERROR
When running, the expense agent validates text descriptions in security.py (Day 4). It replaces credit card patterns and SSN strings with categorical placeholders. If prompt injection is detected, the workflow routes the run directly to human review, bypassing the LLM.
How We Built It
We began by configuring the monorepo workspace, syncing packages with uv sync. We initialized a local Git repository, installing pre-commit hooks using uv run pre-commit install. The hooks run code formatting checks and a custom Semgrep scan defined in rules.yaml (Day 4) to detect Google API key signatures.
Next, we built the PII scrubbing and injection screening logic in security.py (Day 4). We wrote regex patterns to detect 16-digit credit cards and 9-digit SSNs, replacing matches with placeholders. We added heuristic keyword checks to identify injection attempts (e.g., "ignore instructions").
For the shell guard, we wrote validate_tool_call.py (Day 4). This script reads the agent's proposed arguments from stdin. If it finds keywords like rm -rf / or mkfs, it prints an error and exits with code 1. We mapped this script to the run_command tool call in hooks.json (Day 4).
The PreToolUse hook configurations were declared in hooks.json (Day 4):
LANG: json{ "hooks": [ { "trigger": "pre-tool-use", "tool": "run_command", "handler": "python .agents/scripts/validate_tool_call.py" } ] }
The Hard Part
The hardest challenge was preventing double-redemption race conditions in the shopping assistant's discount tool. Under concurrent executions, multiple requests could attempt to redeem the same code. If the database read/write actions are not synchronized, this could allow multiple redemptions before the state is updated.
We addressed this challenge in the threat model documentation. We recommended replacing simple in-memory dictionary checks with database transactions. Using optimistic concurrency controls or row-level locking ensures that code status updates remain atomic under concurrent loads.
What We Learned
Zero Ambient Authority
Never grant agents direct shell access. Sandboxing the runtime environment and intercepting tool calls mid-trajectory is necessary to prevent command execution issues.
Shift-Left Commit Security
Use local pre-commit hooks and Semgrep scans to block hardcoded API keys. This prevents credential leaks before code changes leave the workspace.
Context-as-a-Perimeter sanitization
Sanitize all user-provided inputs before passing them to the model context. This protects downstream nodes and log outputs from data leaks and prompt injections.
Adversarial Injection Bypasses
When prompt injection is detected, bypass model reasoning entirely. Routing flagged runs directly to human review routes prevents adversarial exploits.
Interception-in-Depth architectures
Combine static code gates, dynamic runtime filters, and mid-trajectory tool hooks. This multi-layered security model provides a stronger perimeter.
The Project at a Glance
| Project | VibeCarapace |
| Day Theme | Vibe Coding Agent Security and Evaluation |
| Type | Event-Driven Security Framework / Secure Sandbox |
| Language | Python >=3.11, <3.15 |
| Framework | Google ADK 2.0.0 + Semgrep 1.74.0 + pre-commit 3.7.1 |
| Model / API | Gemini 3.1 Flash Lite |
| Key Feature | PreToolUse Command Intercept Guards |
| Run command | uv run uvicorn expense_agent.fast_api_app:app --port 8080 |
| Documentation | VibeCarapace.md (Day 4) |
🧠 Concept difficulty: Hard
🔨 Build difficulty: Very Hard
⚡ Most surprising moment: The pre-commit hook blocked our commit because we had a mock Google API key prefix in a developer script, showing the effectiveness of static gates.
Day 5 — AuditSentry
Day 5 was the day everything we'd learned had to count.
What the Day Taught
The final session focused on Spec-Driven Production Grade Development in the Age of Vibe Coding. We explored the tools and patterns required to graduate local, conversational prototypes into production-grade systems. The curriculum emphasized that production systems require deterministic safety guardrails. We came to understand how Gherkin specifications and stateful persistence form the basis of production environments.
We came to understand that "vibe coding is not vibe in production." Developing reliable agent fleets requires defining Gherkin-style specifications, running automated evaluations, and implementing stateful session tracking. We learned how to author Behavior-Driven Development (BDD) specs to specify agent behavior without ambiguity. This alignment ensures that code generation remains bounded.
We also designed stateful Human-in-the-Loop workflows. By serializing active runner states to SQLite or Vertex databases, we can pause execution, wait for approval, and resume runs from external processes. This ensures human operators retain control over sensitive actions. We analyzed the mechanics of graph serialization, verifying that session tokens could resume runs.
What We Built
AuditSentry — An event-driven expense compliance agent and manager dashboard service featuring regex-based PII scrubbing, conditional threshold routing, risk profiling, and a web interface to resume paused workflows.
The system comprises two services: the AuditSentry Agent Webhook (running on port 8080) and the Manager Dashboard Portal (running on port 8081). The webhook parses expense claims, redacts PII, and runs injection checks. Low-value claims (<$100) are auto-approved, while higher claims trigger a Gemini risk audit.
The architecture manages the interaction between the FastAPI webhook, the sqlite session database, and the HTML dashboard. The agent webhook parses input emails and routes claims based on value. If a claim requires review, the agent yields a RequestInput event, pausing execution and saving the session state. The dashboard displays pending claims and lets managers resume the workflow.
[ Webhook POST ] ──▶ [ fast_api_app ] │ ▼ [ security_checkpoint ] ├──[ Regex Scrub ] └──[ Injection Check ] │ ┌────────┴────────┐ [CLEAN] [INJECTION] │ │ [route_by_amount] │ ┌───────┴───────┐ │ [< $100] [>= $100] │ │ │ │ ▼ ▼ │ [Auto-Approve] [review_agent] │ │ │ │ └───────┬───────┘ │ ▼ ▼ [ request_approval (HITL Pause) ] │ [ Writes to sqlite/Vertex ] │ ▼ [ Manager Portal App (8081) ] ──▶ [ Resume Webhook ]
An interesting design decision was implementing the resumption handler in main.py (Day 5). When a manager decides to approve or reject, the dashboard backend loads the session state from database, injects the decision as a FunctionResponse event, and restarts the runner. This resumes the execution graph from the pause point.
We author BDD Gherkin specifications to map system behavior beforehand:
LANG: gherkinFeature: Expense compliance processing Scenario: High value expense triggers review Given an expense claim with amount $150 When processed by AuditSentry Then route to review agent and yield approval pause
When running, the dashboard portal at http://localhost:8081 features status badges, glassmorphic layout cards, and modal review panels. The portal shows the LLM-generated risk summary and lists redacted categories. This provides managers with the context needed to resolve claims.
The FastAPI webhook in fast_api_app.py (Day 5) handles event payload conversions:
LANG: python# Pub/Sub payload conversion @app.post("/pubsub") async def handle_pubsub(request: Request): payload = await request.json() data = base64.b64decode(payload["message"]["data"]).decode("utf-8") # Runner invokes graph execution flow
The manager portal backend in main.py (Day 5) manages resumption updates:
LANG: python# Resume handler execution @app.post("/api/action/{session_id}") async def resume_session(session_id: str, action: ApprovalAction): # Retrieve serialized execution states # Inject manager decision properties # Run the remaining workflow nodes
How We Built It
We began by reviewing the agent requirements and drafting BDD test scenarios. We configured config.py (Day 5) to manage threshold settings and model selections. We implemented the pipeline nodes: email parsing, PII scrubbing, injection detection, and threshold checking.
We then integrated the ADK Workflow to link the nodes into an execution graph in agent.py (Day 5). The graph routes inputs through the security checkpoint. Under $100, the claim auto-approves. For higher values or injection flags, it routes to request_approval, yielding a RequestInput to pause execution.
We structured the node transition hooks to yield the interrupt event cleanly:
LANG: python# Human-in-the-Loop Node pause yield def request_approval(node_input: dict, ctx: Context) -> Event: yield RequestInput(message="Pending review", payload=node_input) # Runner resumes execution here after decision is received decision = ctx.state.get("manager_decision") return Event(route="DECISION_MADE", output=decision)
Finally, we built the dashboard backend in main.py (Day 5) and the frontend in index.html (Day 5). The dashboard backend connects to the SQLite database to fetch paused sessions. We verified the integration by submitting test payloads, confirming they paused correctly, and resuming them from the dashboard.
The Hard Part
The hardest challenge was managing SQLite database access concurrency during rapid transaction processing. When the agent webhook (running on port 8080) and the dashboard service (running on port 8081) attempted to read and write to session.db simultaneously, it threw database locking exceptions.
We resolved this by using shared session service providers in services.py (Day 5). We configured the connection pool with retry handlers and enabled WAL (Write-Ahead Logging) mode on the SQLite engine, preventing transaction conflicts.
What We Learned
Spec-Driven Design Prevents Ambiguity
Author Gherkin BDD specifications to define behavior prior to development. This provides clear rules for the agent, reducing implementation drift.
Stateful Resumption Decouples Web Services
Serialize active graph states to a shared database. This allows runners to pause on RequestInput and resume from external endpoints.
Hygiene Shields Downstream Contexts
Sanitize inputs at the entry node. Replacing credit card and SSN values with placeholders prevents sensitive data leakage in model logs.
LLM-as-Judge Evaluation Pipelines
Use evaluation frameworks to run grading tests over traces. This provides a repeatable way to measure routing accuracy and containment.
Shared Registries Align Session States
Expose databases via unified session services. Connecting sqlite for development and Vertex AI for staging maintains state across services.
The Project at a Glance
| Project | AuditSentry |
| Day Theme | Spec-Driven Production Grade Development |
| Type | Compliance Agent + Resumption Portal |
| Language | Python 3.12 + ES6 JavaScript / HTML5 |
| Framework | Google ADK 2.0.0 + FastAPI 0.110.0+ + SQLite |
| Model / API | Gemini 3.1 Flash Lite & Pro |
| Key Feature | Stateful Resumption of Paused Runs |
| Run command | make serve (Agent) & python main.py (Dashboard) |
| Documentation | AuditSentry.md (Day 5) |
🧠 Concept difficulty: Very Hard
🔨 Build difficulty: Very Hard
⚡ Most surprising moment: Watching the workflow state write its binary progress to SQLite and resume from a separate Uvicorn process when the manager clicked approve.
Across 5 Days — What We Learned
Looking back across the five days of this intensive course, we can see a clear progression in how we think about agent development. At the start of the week, we viewed AI agents as fast code generators. We used simple prompts to write local physics simulations, treating the AI as an assistant to write boilerplate code. By the end of the week, we realized that production-ready agents require structured software engineering practices. We moved from simple scripting to building secure, stateful, and observable agent systems.
The Shape of the Learning
Our conceptual understanding evolved through a structured sequence. On Day 1, we established our local development environments and practiced vibe coding. On Day 2, we extended the agent's capabilities by giving it access to external APIs, showing how agents can interact with the cloud. On Day 3, we structured capabilities into self-contained skills to manage context windows. On Day 4, we addressed security challenges by implementing pre-commit gates and runtime guards. Finally, on Day 5, we brought these concepts together, using BDD specifications, database state management, and Human-in-the-Loop gates to build a production-ready compliance agent.
This progression showed us that vibe coding is not about quick, unverified generation. While conversational prompts are effective for prototyping, deploying agents in business environments requires wrapping them in validation pipelines and sandboxes. We transitioned from relying on model outputs to enforcing security perimeters and evaluation frameworks.
Recurring Themes
Decoupled State & Execution Loops
Decoupling calculation state from the presentation or framework layer is a key performance pattern. On Day 1, we decoupled the particle physics loop from React state to maintain a smooth 60 FPS. On Day 5, we decoupled the agent execution loop from the HTTP serving layer by serializing the graph state to SQLite. This allowed the workflow to pause and resume across separate processes.
Zero Ambient Authority (Security-by-Default)
We must treat agent actions as potentially untrusted commands. Rather than granting the agent broad permissions to execute shell scripts or modify files, we must wrap them in strict boundaries. We implemented this by restricting API scopes on Day 2, setting up pre-commit gates on Day 4, and using PreToolUse hooks to intercept and validate shell commands.
Context Hygiene & Token Conservation
Managing the model's limited context window is essential for performance and cost. On Day 3, we implemented progressive disclosure to load skills dynamically. On Day 4 and Day 5, we used pre-LLM middleware to scrub credit cards and SSNs. This protects user privacy and reduces the token footprint.
Human-in-the-Loop Governance
For processes that impact external systems, human verification is necessary. We designed this by using the RequestInput function to yield control back to the hosting app. The companion dashboard provides a way for managers to inspect compliance data and resume the workflow safely.
Spec-Driven Quality Control
Graduating prototypes to production requires structured verification. Using Gherkin specifications provides clear rules for the agent. Combining this with automated evaluations (like EXACT and IN_ORDER checks) helps verify that agent trajectories match developer intent.
Deterministic vs. Probabilistic Coordination
Integrating language models requires maintaining boundaries between deterministic software components and probabilistic AI outputs. We structured this by routing input parsing, threshold routing, and PII checks through Python code, using the Gemini model only for risk evaluation and policy reviews.
Continuous Evaluation Loops
Reliability is achieved by evaluating agent trajectories against datasets rather than relying on manual checks. Using evaluation scripts to generate and run grading tests helps check that agent routing outputs remain accurate after codebase edits.
The Hardest Moment
The hardest challenge we faced was managing database transaction concurrency and state serialization across separate network processes. During Day 5, the agent webhook on port 8080 and the dashboard service on port 8081 both needed to read and write to session.db simultaneously. This caused SQLite database locking exceptions.
We resolved this by using shared session service providers in services.py (Day 5). We configured the connection pool with retry handlers and enabled WAL (Write-Ahead Logging) mode on the SQLite engine, preventing transaction conflicts. We also ensured the dashboard service could load, inspect, and resume the serialized ADK graph state without losing session history.
The Biggest Breakthrough
Our biggest breakthrough was realizing that high-frequency updates and agent execution loops must be completely decoupled from standard state reconstruction paradigms. On Day 1, this clicked when we decoupled the canvas loop from React's virtual DOM reconciliation by using mutable useRef buffers.
This paradigm of decoupling execution state from the presentation layer laid the groundwork for Day 5. We successfully serialized and persisted active graph states into database sessions, allowing us to pause, inspect, and resume agentic runs across independent network processes.
What Vibe Coding Actually Means
In practice, vibe coding is a collaborative software construction workflow where natural language instructions and specifications drive the creation of application logic. Rather than manually writing boilerplate code, the developer acts as a systems orchestrator, using conversational prompts to guide an AI coding agent to generate, modify, and test components. By treating the AI assistant as a collaborative partner, developer productivity is amplified, shifting the focus from syntax to architectural design, security, and verification.
Where vibe coding accelerated us was in rapid prototyping. We were able to build a canvas-based particle engine, an OAuth2 uploader script, and a FastAPI webhook service in a fraction of the time it would take to write them manually. The agent handled API details, css classes, and boilerplate setup.
However, vibe coding requires developer intervention when debugging. When the model generated code that caused memory leaks or layout issues, we had to analyze the performance and provide specific correction prompts. We learned that prompting is most effective when guided by strict type definitions, structured schemas, and outcome-based assertions.
Our prompting technique improved throughout the week. On Day 1, we used broad instructions like "make snowflakes fall." By Day 5, we were writing specific constraints, such as "bind the parsing node to input validations, redact 16-digit cards, and return a conditional route edge." If we started the course again, we would define type interfaces and validation schemas before writing any prompts. This gives the agent a clear target and reduces iterations.
We observed that writing precise guidelines inside configuration files (such as .agents/CONTEXT.md) helps anchor the agent's focus. This minimizes generation loops and ensures that the generated code aligns with structural project rules.
Skills Before and After
| Skill / Concept | Day 1 Understanding | Day 5 Understanding |
|---|---|---|
| ADK Graph Workflow API | Had not used the framework | Built conditional routing graphs, node mappings, and event edges |
| Prompt engineering for agents | Wrote basic text generation prompts | Formulated structured prompts, few-shot examples, and BDD constraints |
| Multi-agent orchestration | Understood agents only as single assistants | Designed parent-child hierarchies and agent-to-agent RPC networks |
| Security pipeline design | Relied on model-level instructions | Implemented pre-LLM regex redactors, Semgrep keys detection, and command gates |
| Human-in-the-Loop patterns | Thought in terms of simple confirmation prompts | Compiled stateful workflow pauses and resumption web interfaces |
| MCP server integration | Unfamiliar with the protocol | Configured FastMCP servers and mapped external data structures |
| Spec-driven development | Wrote code before testing | Wrote Gherkin specifications and automated trajectory evaluations |
| Context Hygiene | Ignored context limits | Implemented progressive skill loading and input sanitization |
| Database Concurrency | Standard SQLite single thread | Dynamic connection pools, retry locks, and WAL engine settings |
| PreToolUse Intercepts | Had not implemented intercepts | Built arguments filters that scan and abort commands before execution |
From Assignments to Capstone
The five daily assignments we completed during this intensive course served as the building blocks for our graduation capstone project, Trifecta Agent. The particle simulations from Day 1 helped us build smooth progress displays and telemetry dashboards for the student workspace. The OAuth2 credential manager and chunked uploader logic we built on Day 2 became the backbone of our cloud ingestion pipeline, letting students save reports directly to Google Drive.
The progressive skill loading system from Day 3 allowed the capstone agent to access specialized study aids, like code validators and few-shot converters, without experiencing context bloat. The zero-trust security perimeters we designed on Day 4—including Semgrep key scanning, input redactors, and PreToolUse command filters—provided the security gates required to run the student sandbox safely. Finally, the stateful session databases and Human-in-the-Loop web forms we built on Day 5 allowed us to pause study sessions and route grading reports to instructors for review.
The capstone — Trifecta Agent — is documented in its own repository.
🚀 Trifecta Agent — Capstone Project A personalized AI study coach built with Google ADK 2.0, multi-agent orchestration, MCP document ingestion, Presidio security, and dual Human-in-the-Loop approval flows.
Repository: https://github.com/TheOrionGD/trifecta-agent Team: Godfrey T R · Arjun S N · Abdul Razeek A Track: Agents for Good — Education Track · Kaggle × Google · June 2026
Acknowledgements
We want to thank Google and Kaggle for hosting the 5-Day AI Agents Intensive. Access to early releases of the Google Agent Development Kit (ADK) 2.0 allowed us to explore stateful workflow resumption, and the Agents for Good framework gave our assignments a clear focus.
We are grateful to the instructors and curriculum designers behind the 5-Day Intensive. The assignment structure was well-paced, ensuring each day's project built on the concepts and tools from the previous day.
We also want to thank the open-source communities behind the tools we used:
- The Google ADK team for their early documentation and samples, which was the foundation for our stateful workflows.
- The FastAPI community for providing a fast backend routing layer.
- The Microsoft Presidio project, which guided our PII scrubbing designs.
- We thank the creators of React, Vite, and Tailwind CSS for making front-end prototyping fast.
- We also thank the ReportLab team for assisting with report generation.
Finally, we thank our fellow course participants in the Discord community. Sharing error messages and discussing design patterns helped us resolve locking issues and deploy our local setups.
This collaborative learning experience allowed us to transition from client-side interactive simulators to secure, multi-agent frameworks, proving that engineering discipline is critical when developing with non-deterministic models. We look forward to applying these agentic patterns to future educational projects.
This journal was written by Team Trifecta Agent as part of the 5-Day AI Agents: Intensive Vibe Coding Course With Google, June 2026. Godfrey T R · Arjun S N · Abdul Razeek A