---
season: 4
season_name: "Season 4 — December 2026 (Getting Work Done with Gemini)"
day: 4
date: "Dec 4"
weekday: "Fri"
track: "dev-week"
week: "{DEV}"
week_title: "Dev Week Warm-Up"
title: "AI harnesses and production agents"
summary: "The model writes code, while the AI harness supplies context, calls tools, enforces permissions, and runs the test-and-revise loop. Start with this 9-minute crash course, then explore the 27-minute production roadmap and deeper harness videos below."
presenter: "Annie Wang · @GoogleCloudTech"
duration: "9:28"
tags: ["AI Harnesses", "Dev Week Warm-Up"]
has_agent_brief: true
canonical_url: "https://adventofagents.com/2026/12/04"
markdown_url: "https://adventofagents.com/2026/12/04.md"
video_url: "https://www.youtube.com/watch?v=2C_CefSQEAQ"
---

# ✦ Day 04: AI harnesses and production agents

> **Season 4 — December 2026 (Getting Work Done with Gemini)** · {DEV} (Dev Week Warm-Up) · Dec 4 (Fri) · [Interactive Web View](https://adventofagents.com/2026/12/04?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s4_2026&utm_content=day04) · [Raw Markdown](https://adventofagents.com/2026/12/04.md?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s4_2026&utm_content=day04)

**Presenter:** Annie Wang · @GoogleCloudTech · **Duration:** 9:28

**Summary:** The model writes code, while the AI harness supplies context, calls tools, enforces permissions, and runs the test-and-revise loop. Start with this 9-minute crash course, then explore the 27-minute production roadmap and deeper harness videos below.

## Overview

Follow one coding task across four harness parts: session, state, and long-term memory; Python and MCP tools with ADK graph workflows; sandboxed execution and prompt-injection guards; plus deterministic, LLM-judge, and human evaluation.

## Watch

- [Watch on YouTube](https://www.youtube.com/watch?v=2C_CefSQEAQ)

## Agent Brief: AI Harnesses and Production Agents

In this 9-minute crash course, Annie Wang (`@GoogleCloudTech`) breaks down the software layer around an AI model that makes a coding agent work reliably in production. Pair this walkthrough with the 27-minute [complete production roadmap](https://www.youtube.com/watch?v=BKVDdL1InsA) (Learn, Guard, Review, and Score) and the deeper harness engineering sessions featured alongside it.

### Core Capabilities Covered

- **The AI harness loop:** A model can generate code, but it cannot read files, run tests, or ask before risky actions on its own. The harness provides context, invokes tools, enforces permissions, and decides when to continue, retry, stop, or ask a human for help.
- **Context and memory:** Separate the session (full conversation transcript and tool history), application state (key-value scratchpad for active task fields), and long-term memory (distilled user preferences carried across future sessions with ADK session and memory services).
- **Tools and execution flow:** Connect Python functions and Model Context Protocol (MCP) servers for external actions such as reading build logs. Use ADK graph workflows to run independent checks (unit tests and browser tests) in parallel and enforce strict retry limits.
- **Runtime, security, and privacy:** Execute coding agents inside an isolated sandbox with synthetic test data instead of production databases. Treat external files as untrusted data to resist prompt injection, enforce tool permissions in software, require human approval for sensitive actions, and audit where tool outputs flow.
- **Three-part evaluation:** Combine deterministic code checks for objective requirements, LLM-as-a-judge checks grounded in evidence for explanation clarity, and human review for UX issues automation misses.

### Video Chapters

- `00:00` [What is an AI harness?](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=0s): Why models need surrounding software to edit files, run tests, and enforce permissions.
- `00:49` [The loop: read, edit, test, feed back](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=49s): How the harness drives iterative code changes and test feedback.
- `01:19` [Four parts of harness design](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=79s): Context and memory, tools and flow, runtime and security, and evaluation.
- `01:40` [Context & memory: session vs. state](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=100s): Separating conversation transcripts from structured key-value scratchpads in ADK.
- `02:46` [Persisting sessions, long-term memory](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=166s): Resuming saved sessions and retrieving distilled preferences in future conversations.
- `03:37` [Tools: Python functions and MCP servers](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=217s): Giving agents standard ways to edit files, run tests, and query external build logs.
- `04:23` [Execution flow: parallel checks and retry limits with graph workflows](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=263s): Running unit and browser checks in parallel with ADK graph workflows and capping retries.
- `05:18` [Runtime: sandboxing the coding agent](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=318s): Isolating filesystem and network access with sample customer data.
- `06:00` [Prompt injection and enforced permissions](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=360s): Enforcing tool limits, credential isolation, and human approval in software rather than prompts.
- `06:54` [Privacy: where tool output and memory actually go](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=414s): Auditing data sent to hosted models, session logs, and long-term memory.
- `07:25` [Evaluation: deterministic checks](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=445s): Verifying clear CSV export requirements automatically in code.
- `08:00` [Evaluation: LLM-as-a-judge](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=480s): Checking response clarity with evidence-grounded model grading.
- `08:37` [Evaluation: human review, and mixing all three](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=517s): Catching UX gaps and combining code, judge, and human checks.
- `09:13` [Wrap-up](https://www.youtube.com/watch?v=2C_CefSQEAQ&t=553s): Putting the four harness pillars together.

### Agent Action Patterns

- **Enforce safety in code, not prompts:** Use sandbox isolation, restricted tool permissions, and human-approval pauses for sensitive actions instead of asking the model to be careful.
- **Split memory by scope:** Keep transcripts in the session, active flags in key-value state, and cross-session preferences in long-term memory.
- **Layer your checks:** Run fast deterministic tests first, add LLM-as-a-judge for explanation quality, and keep human review for real user workflows.

### Companion Reading

- **[AI Agent Crash Course Playlist (Google Cloud Tech)](https://www.youtube.com/playlist?list=PLIivdWyY5sqLNeW9MPxldbbevMEJGMWBG):** Full ADK video series covering sessions, Memory Bank, MCP servers, design patterns, and agent evaluation.
- **[Google Agent Skills Specification (GitHub)](https://github.com/google/skills?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s4_2026&utm_content=day04):** Open specification and examples for progressive-disclosure `SKILL.md` modules referenced in the 27-minute production roadmap.
- **[Google Cloud Developer Plugin for AI Coding Agents](https://cloud.google.com/blog/topics/developers-practitioners/introducing-the-google-cloud-developer-plugin-for-ai-coding-agents?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s4_2026&utm_content=day04):** 150+ curated skills and workflows for production cloud engineering.
- **[Agent Evaluation Documentation (Gemini platform)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/optimize/evaluation/agent-evaluation?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s4_2026&utm_content=day04):** Reference guide for grading tool selection, execution trajectories, and multi-turn agent runs.

## Resources & Links

- **[Try the AI Harness interactive labs](https://g.dev/ai/ai-harness)**

## Go deeper: 27m roadmap & agent harness series

- **[How Google Engineers Build AI Agents in Production (27m)](https://www.youtube.com/watch?v=BKVDdL1InsA)** — Google Cloud Tech · 27m (YouTube · Google DevRel)
- **[Harness Engineering Explained: Antigravity, Claude Code & Cursor](https://www.youtube.com/watch?v=F8EZJAm9iO8)** — Ryan Lopopolo & Tilde Thurium · 31m (YouTube · Google DevRel)
- **[Build a "Software Factory" That Doesn’t Produce AI Slop](https://www.youtube.com/watch?v=EFejzwBLAVo)** — Rody Davis · Antigravity · 10m (YouTube · Google DevRel)
- **[AI Agent Design Patterns with ADK](https://www.youtube.com/watch?v=GDm_uH6VxPY)** — Annie Wang · Crash Course · 8m (YouTube · Google DevRel)
- **[3 Advanced AI Agent Design Patterns (Loop, Coordinator & Tool)](https://www.youtube.com/watch?v=89KKm_a4M7A)** — Annie Wang · Crash Course · 8m (YouTube · Google DevRel)
- **[How to Evaluate Agents in Practice (3-Tier Testing Pyramid)](https://www.youtube.com/watch?v=vuBvf7ZRKTA)** — Annie Wang · Crash Course · 11m (YouTube · Google DevRel)

## Completion Badge

Watch on the [interactive Day 4 page](https://adventofagents.com/2026/12/04?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s4_2026&utm_content=day04) to unlock your Google Developer Profile badge.
