Homeโ€บBlogโ€บAgentic AI System Designs
Agentic AI System Designs ยท Harness teardown

Gemini CLI, Antigravity & Jules, Taken Apart

Google built both basic shapes of an agent harness: an interactive one that runs in your terminal and an asynchronous one that works alone in a cloud VM and returns a pull request. Both dismantled into eight layers, with the 2026 product move explained.

FL
FrontierAGI Team
โš ๏ธ How to read this (as of 7 Nov 2026)Gemini CLI facts come from its GitHub README (read 7 Nov 2026). Google's blog and the Jules site could not be reached from our build environment, so Jules and Antigravity details are marked โš ๏ธ and their architecture is inferred from documented behaviour. Build times, team sizes and costs are our estimates. Disclosure: Claude, made by Anthropic, helps write this site, and this series covers Anthropic, Google and OpenAI products.

1. Case file

MakerGoogle
CategoryAgent harness, two styles
Gemini CLIApache 2.0, open source
ChangeFree access โ†’ Antigravity CLI, 18 Jun 2026
JulesAsynchronous, cloud VM โš ๏ธ
Context fileGEMINI.md

2. The whole system in one picture

๐Ÿ›๏ธ The whole system, layer by layer, with one task traced

โ” control (who calls whom)โ”… data (what comes back)โ–ญ solid border: runs on your machineโ”… dashed border: runs in the vendor's cloud
Press play to follow one task down through the layers and back, or tap any component.

Same eight-layer reference stack in every article of the series. Components and calls are drawn from the project's documentation and code; where internals are not public the drawing is inferred from documented behaviour. The monospace box shows what actually moves between layers at each step (simplified).

3. Layer by layer

L1๐Ÿ–ฅ๏ธ Interfaces ยท Where people (or other agents) talk to it

What it does
Two front doors for two working styles.
How it is built here
Gemini CLI in the terminal (open source, Apache 2.0); free individual access moved to Antigravity CLI on 18 June 2026; Jules from the browser and GitHub โš ๏ธ.
Design choice
Google separates the interactive and the asynchronous agent into different products.
Without it
One product tries to serve both styles and serves neither well.

L2๐Ÿงญ Sessions & orchestration ยท Who owns a task: sessions, background tasks, subagents

What it does
Who owns the task, and whether you watch.
How it is built here
An interactive session in the CLI; an asynchronous task in Jules โš ๏ธ.
Design choice
The real design split: synchronous (you steer each step) vs asynchronous (you review the result).
Without it
Long tasks hold you at the keyboard, or short tasks wait in a queue.

L3๐Ÿ” Agent loop ยท How it decides the next step

What it does
How the next step is chosen.
How it is built here
The CLI runs a step-by-step tool loop; Jules plans first, then executes โš ๏ธ.
Design choice
Plan-first suits unattended work: the human checks direction once, up front.
Without it
An unattended agent drifts with no checkpoint.

๐Ÿ” How this loop compares with the other four, dial by dial, and its RSI level: Inside the Agent Loop

L4๐Ÿง  Context engine ยท What the model sees on each turn

What it does
Project knowledge.
How it is built here
GEMINI.md context files for the CLI; a cloned repository for Jules โš ๏ธ.
Design choice
Instructions as plain files in the repo.
Without it
The agent misses project conventions.

L5๐Ÿ› ๏ธ Tools ยท What it can do

What it does
Actions and integrations.
How it is built here
Built-in tools plus MCP servers ("use MCP servers to connect new capabilities").
Design choice
MCP as the extension point, shared with other harnesses.
Without it
Every integration needs Google-specific code.

L6๐Ÿ›ก๏ธ Policy & safety ยท What it may do

What it does
What needs your OK.
How it is built here
Action confirmations in the CLI โš ๏ธ; plan approval in Jules โš ๏ธ.
Design choice
Approve actions when you are present; approve the plan when you are not.
Without it
Unattended agents act without any human checkpoint.

L7๐Ÿ“ฆ Execution ยท Where actions actually run

What it does
Where work runs.
How it is built here
The CLI on your machine; Jules in a Google Cloud VM โš ๏ธ.
Design choice
Async work runs off your machine so it can take as long as it needs.
Without it
Async tasks would tie up your laptop.

L8๐Ÿงฌ Model & telemetry ยท Which model, and what gets logged

What it does
The model, and the record.
How it is built here
Gemini models (the CLI README says it is "not optimized for Gemini 4+"); Jules returns PRs with summaries โš ๏ธ.
Design choice
The output of async work is a PR, the unit teams already review.
Without it
Work arrives as chat that someone has to turn into code.

4. Connecting the dots

๐Ÿงฌ Design DNA: the three decisions that define it

Two styles, two productsinteractive CLI and asynchronous Jules
Plan approval for unattended workcheck direction once, up front โš ๏ธ
MCP for extensionshared with other harnesses

๐Ÿ’ธ Where the tokens go in the traced task (our estimate)

Instructions, tool schemas, memory (re-sent each turn)35% ยท ~105k
Tool results (files read, test output)30% ยท ~90k
Subagent work15% ยท ~45k
Model output (reasoning, edits)10% ยท ~30k
Retries and repeated turns10% ยท ~30k

An illustrative split for a ~300k-token task: about $1.20 at an assumed blended $4 per million tokens. Real numbers vary widely with the repo, the model and caching; the shape (context re-sent every turn dominates) is the point.

5. How it evolved

Dec 2024 Jules announced as a Google Labs experiment โš ๏ธ.
May 2025 Jules opened as a public beta โš ๏ธ.
Jun 2025 Gemini CLI released as open source โš ๏ธ.
Aug 2025 Jules generally available โš ๏ธ.
18 Jun 2026 Free individual and AI Pro/Ultra access moved from Gemini CLI to Antigravity CLI (per the README).

6. Where it breaks, and what it does about it

FailureLayerWhat happensWhat this system does about it
Drift while unattendedL3An async agent heads in the wrong direction.Plan approval before work starts โš ๏ธ.
Product churnL1Access and features move between products.Check the README and current product pages before standardising.
Model mismatchL8The CLI is "not optimized for Gemini 4+".Use the product the README points to for newer models.
Environment gapsL7The cloud VM cannot build the project.Clear setup instructions in the repo โš ๏ธ.
Prompt injectionL5Files or MCP results carry instructions.Confirmations; trusted MCP servers only.

7. Security and threat model

๐Ÿงฑ Trust boundaries

Leaves your machineCLI: the context sent to the model; Jules: your repository is cloned into a cloud VM โš ๏ธ
Untrusted inputsrepository content, MCP results, web pages
Powerful actionslocal commands (CLI); commands in the VM and PRs to your repo (Jules)
Controlsconfirmations, plan approval โš ๏ธ, PR review before merge

8. Standards it shares, and benchmarks

9. What people use it for

IndividualTerminal pair programmingAsk, watch, confirm.
IndividualHand off choresAssign a bug to Jules and review the PR later โš ๏ธ.
TeamBacklog of small issuesAsynchronous PRs for well-scoped tasks โš ๏ธ.
TeamDependency bumpsUpgrade and test in a cloud VM โš ๏ธ.
EnterpriseCode Assist usersGemini CLI is now aimed at enterprise Code Assist (per README).
EnterpriseOpen-source baseStudy or extend the Apache-2.0 CLI.
Beyond codeShell automationScripts and file tasks from the terminal (typical uses).

10. How to build one from scratch

mini_gemini_jules.py ยท Python 3, standard library only; scripted stub model
"""mini_gemini_jules.py โ€” one loop, two harness styles (illustrative).

Interactive (Gemini CLI style): every step is shown and the human confirms edits.
Asynchronous (Jules style): the agent writes a plan, works alone on a cloned copy
and returns a pull request. Same loop, different session and execution layers.
The "model" is a scripted stub; standard library only.
"""
import copy
REPO = {"GEMINI.md": "Run: python test_dates.py", "dates.py": "d, m, y = s.split('/')"}
STEPS = [("read", "dates.py"), ("test", None), ("edit", ("dates.py", "y, m, d = s.split('-')")), ("test", None)]

def loop(repo, confirm, log):
    for act, arg in STEPS:
        if act == "edit":
            if not confirm(arg): log.append("edit skipped by user"); continue
            repo[arg[0]] = arg[1]; log.append(f"edit {arg[0]}")
        elif act == "test": log.append("test " + ("pass" if "y, m, d" in repo["dates.py"] else "fail"))
        else: log.append(f"{act} {arg}")

def main():
    log = ["load GEMINI.md: " + REPO["GEMINI.md"]]
    loop(REPO, lambda a: True, log)                               # human approves in the terminal
    print("interactive: " + " -> ".join(log) + f"  ({len(log) - 1} steps shown live, 1 confirmation)")
    REPO["dates.py"] = "d, m, y = s.split('/')"                   # reset for the async run
    vm, alog = copy.deepcopy(REPO), []
    plan = [a for a, _ in STEPS]
    loop(vm, lambda a: True, alog)                                # no human in the loop
    print(f"async: plan {plan} -> worked in cloud copy -> PR with {sum(1 for x in alog if x.startswith('edit'))} file changed, last test: {alog[-1].split()[-1]}")
    print(f"your working copy untouched during async run: {REPO['dates.py'] != vm['dates.py']} (the fix arrives only through the PR)")

if __name__ == "__main__":
    main()
$ python3 mini_gemini_jules.py interactive: load GEMINI.md: Run: python test_dates.py -> read dates.py -> test fail -> edit dates.py -> test pass (4 steps shown live, 1 confirmation) async: plan ['read', 'test', 'edit', 'test'] -> worked in cloud copy -> PR with 1 file changed, last test: pass your working copy untouched during async run: True (the fix arrives only through the PR)
PhaseWhat you buildTime*Team*Cost*
0 ยท PrototypeTerminal loop with file and shell tools1โ€“2 weeks1$15โ€“40k
1 ยท Interactive CLIConfirmations, context files, MCP client2โ€“3 months2โ€“4$200โ€“500k
2 ยท Async agentTask queue, cloud VMs, repo cloning, plan approval4โ€“6 months6โ€“10$1โ€“2.5M
3 ยท GitHub integrationIssue โ†’ task, PR creation, status updates2โ€“3 months4โ€“8$0.5โ€“1M
4 ยท ProductAccounts, quotas, scaling VMs, security review6โ€“12 months20โ€“40+$5โ€“12M+ a year (incl. compute)

*Our estimates, not vendor figures: fully loaded engineer cost assumed at $250k a year (US-style salaries; lower elsewhere), plus model API and infrastructure. Treat as orders of magnitude.

๐Ÿงฎ What would running your own cost a month?

Our model: model cost = tasks ร— tokens ร— price ร— 30 days; people = engineers ร— $250k รท 12; infrastructure (sandboxes, storage, logs) assumed at 15% of model cost. A blended price mixes cached input, fresh input and output; check your provider's current prices.

11. When to choose it

โœ… Choose it when

  • You want an Apache-2.0 terminal agent, or you are an enterprise Code Assist user.
  • You want asynchronous PRs from a cloud agent (Jules).
  • You are already on Google Cloud.

โš ๏ธ Think twice when

  • You need a stable product line: it changed in 2026.
  • You benchmark models with it (the README advises against).

12. How it compares, layer by layer

HarnessL1InterfacesL2Sessions & orchestrationL3Agent loopL4Context engineL5ToolsL6Policy & safetyL7ExecutionL8Model & telemetry
Claude CodeTerminal, IDE, desktop, web, Slack; Agent SDKSessions with resume; subagents; cloud sessions on the webOne general think โ†’ act โ†’ observe loopCLAUDE.md, auto memory, compactionBuilt-in file/shell/search tools, MCP, skillsPermission rules and modes, hooksYour machine (optional sandboxing โš ๏ธ); cloud for web sessionsClaude models; transcripts, cost and usage telemetry
CodexTerminal, IDE, web (chatgpt.com/codex)Parallel cloud tasks; local sessionsAgent loop per taskAGENTS.md, repo contextShell, file edits, MCPApproval modes โš ๏ธOS sandbox locally โš ๏ธ; container per cloud taskOpenAI models; task logs and diffs
Gemini CLI / JulesTerminal (CLI); browser + GitHub (Jules)Interactive session vs asynchronous taskAgent loop (CLI); plan-then-execute (Jules โš ๏ธ)GEMINI.md context filesBuilt-in tools, MCPConfirmations in the CLI; plan approval in Jules โš ๏ธYour machine (CLI); cloud VM (Jules โš ๏ธ)Gemini models (CLI "not optimized for Gemini 4+")
Deep AgentsYour own app (library)LangGraph threads; sub-agentsPlanning loop on LangGraphFilesystem as memory; offloadingYour tools, MCP, skillsHuman-in-the-loop interruptsPluggable backends: local, sandboxed, remoteAny chat model; LangGraph state and tracing
Hermes AgentTerminal + Telegram, Discord, Slack, WhatsApp, Signal, emailGateway, subagents, cron schedulerAgent loop (details on its docs site โš ๏ธ)Curated memory, FTS5 session search, user modelTools, self-written skills (agentskills.io), Python RPC scriptsDepends on backend and configuration โš ๏ธSix backends: local, Docker, SSH, Modal, Daytona, Vercel SandboxModel you configure โš ๏ธ

One line per layer; our reading of each project's documentation and code as of 7 Nov 2026.

HarnessRuns whereOpen sourceSubagentsPersistent memorySkillsMCPSandboxHuman approvalAsync / cloud tasks
Claude CodeTerminal, IDE, desktop, webโ€”โœ“โœ“โœ“โœ“โ—โœ“โœ“
CodexTerminal, IDE, cloudโœ“ (CLI)โ—โ—โ—โœ“โœ“โœ“โœ“
Gemini CLI / JulesTerminal (CLI), cloud VM (Jules)โœ“ (CLI)โ—โ—โ—โœ“โ—โœ“โœ“
Deep AgentsYour Python / JS appโœ“โœ“โ—โœ“โœ“โ—โœ“โ€”
Hermes AgentTerminal + chat appsโœ“โœ“โœ“โœ“โ—โœ“โ—โœ“

โœ“ built in ยท โ— partial or via add-ons ยท โ€” not a feature. Our reading of each project's documentation as of 7 Nov 2026; check before relying on it.

13. The series

Agentic AI System Designs: four kinds of agent system, one teardown each

Start here๐Ÿงญ Four ways to build an agentHarness๐Ÿงฐ Claude CodeHarness๐Ÿงฐ CodexHarness๐Ÿงฐ Gemini CLI, Antigravity & Jules (this article)Harness๐Ÿงฐ Deep AgentsHarness๐Ÿงฐ Hermes AgentFramework๐Ÿงฑ OpenAI Agents SDK ยท comingFramework๐Ÿงฑ Google ADK ยท comingFramework๐Ÿงฑ LangChain / LangGraph ยท comingFramework๐Ÿงฑ CrewAI ยท comingFramework๐Ÿงฑ Claude Agent SDK & Microsoft Agent Framework ยท comingRuntimeโš™๏ธ Amazon Bedrock AgentCore ยท comingRuntimeโš™๏ธ LangSmith Deployment ยท comingRuntimeโš™๏ธ Temporal ยท comingRuntimeโš™๏ธ Vertex AI Agent Engine & Azure AI Foundry ยท comingBuilder๐Ÿงฉ n8n ยท comingBuilder๐Ÿงฉ Zapier Agents ยท comingBuilder๐Ÿงฉ Microsoft Copilot Studio ยท comingBuilder๐Ÿงฉ Make ยท coming

All of them on one page: Agentic Systems at a Glance.

๐Ÿ“– Glossary: 15 terms used across the series
Agent loop
The repeat cycle: the model picks an action, the harness runs it, the result goes back to the model.
Harness
Everything around the model that turns it into a working agent: loop, tools, context, policy, execution.
Context window
The text the model can see at once. Everything the agent knows on a turn has to fit in it.
Context compaction
Summarising older conversation so a long task keeps fitting in the context window.
Tool schema
A machine-readable description of a tool (name, inputs) that tells the model how to call it.
MCP
Model Context Protocol: an open standard for connecting agents to outside tools and data.
Subagent
A second agent with its own context, used for a side task; only its summary comes back.
Skill
A packaged set of instructions (and sometimes scripts) the agent loads when relevant.
Hook
Your own command that runs automatically before or after an agent action.
Sandbox
A restricted place to run commands so mistakes or attacks cannot reach the rest of the system.
Approval mode
The rule for what the agent may do without asking you first.
Prompt injection
Instructions hidden in data the agent reads (a file, a web page) that try to hijack it.
Trace
The full record of a run: every model call, tool call and result.
AGENTS.md / CLAUDE.md / GEMINI.md
Plain markdown files of project instructions that harnesses read at the start of a session.
Asynchronous agent
An agent you hand a task to and leave; it returns a result (often a pull request) later.

14. Sources