<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl" -->

---
title: Power agent hubs or custom harnesses with the...
description: Google Cloud walks through building a custom multi-agent control plane using the Antigravity SDK, the same runtime that powers Antigravity 2.0 and the...
canonical: https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Power agent hubs or custom harnesses with the Antigravity SDK | daily.dev
og:description: Google Cloud walks through building a custom multi-agent control plane using the Antigravity SDK, the same runtime that powers Antigravity 2.0 and the...
og:url: https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl
og:image: https://api.daily.dev/og/posts/YE2WxWEsl.png
og:image:alt: Power agent hubs or custom harnesses with the Antigravity SDK
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Power agent hubs or custom harnesses with the Antigravity SDK

**[Google Cloud](https://daily.dev/sources/gcp)** · 6 min read · 0 upvotes · 0 comments

## Summary

Google Cloud walks through building a custom multi-agent control plane using the Antigravity SDK, the same runtime that powers Antigravity 2.0 and the Antigravity CLI. It covers four core building blocks: modular Skills loaded from SKILL.md filesystem bundles, sandboxed built-in tools scoped to workspaces via declarative policies, session persistence through save_dir and conversation_id, and real-time telemetry via lifecycle hooks that stream tool calls and status updates over WebSockets. Code examples show configuring agents with models like gemini-3.8-flash, intercepting tool calls for human-in-the-loop approval, and broadcasting agent state to a dashboard.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://cloud.google.com/blog/topics/developers-practitioners/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk>

## Questions this post answers

### How do I persist multi-turn agent conversation state with the Antigravity SDK?

State persistence is managed declaratively by setting save_dir and conversation_id on LocalAgentConfig, rather than using an external database. Setting save_dir establishes a root directory, and full turn trajectories, tool receipts, and artifacts get stored under traj-<conversation_id>. Supplying an existing conversation_id reattaches to that session; omitting it lets the SDK mint a new ID on the first turn.

_daily.dev surfaces practical patterns like this for developers wiring up stateful agent sessions._

### How do I restrict an AI agent's file tools to a specific workspace directory in Antigravity SDK?

Set the workspaces parameter to the allowed directory paths and add policy.workspace_only() to the policies list on LocalAgentConfig. Built-in tools such as list_directory, find_file, search_directory, view_file, create_file, and edit_file then execute strictly within those configured workspace directories, and operations outside them are blocked.

_Developers sandboxing agent file access can find similar configuration walkthroughs on daily.dev._

### How do lifecycle hooks work for monitoring AI agent tool calls in real time?

Lifecycle hooks are decorated async functions such as on_session_start, pre_tool_call_decide, post_tool_call, and on_session_end that intercept agent transitions and can broadcast telemetry over WebSockets to a dashboard. The pre_tool_call_decide hook can inspect a tool_call's name and args and return a HookResult with allow=True or False to approve or block execution before it runs.

_Teams building observability into agent workflows track hook-based patterns like this on daily.dev._

## Similar posts on daily.dev

- [I/O ‘26 news for agent developers on Google Cloud](https://daily.dev/posts/i-o-26-news-for-agent-developers-on-google-cloud-u3bqgzjm5) · Google Cloud · 0 upvotes · 0 comments
- [At Google I/O 2026, Antigravity gets a new job description](https://daily.dev/posts/at-google-i-o-2026-antigravity-gets-a-new-job-description-576oh3gxp) · The New Stack · 0 upvotes · 0 comments

---

Tags: [#gcp](https://daily.dev/tags/gcp), [#observability](https://daily.dev/tags/observability), [#google-gemini](https://daily.dev/tags/google-gemini), [#agentic-ai](https://daily.dev/tags/agentic-ai)

[View this post on daily.dev](https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Power agent hubs or custom harnesses with the Antigravity SDK","url":"https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl"},"datePublished":"2026-09-08T16:12:21.207Z","dateModified":"2026-09-08T16:12:44.977Z","description":"Google Cloud walks through building a custom multi-agent control plane using the Antigravity SDK, the same runtime that powers Antigravity 2.0 and the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9ba55b56c09dccade114dda7002e7fcc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9ba55b56c09dccade114dda7002e7fcc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Google Cloud","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Google Cloud","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/gcp","url":"https://daily.dev/sources/gcp"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"gcp,observability,google-gemini,agentic-ai","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Google Cloud","item":"https://daily.dev/sources/gcp"},{"@type":"ListItem","position":3,"name":"Power agent hubs or custom harnesses with the Antigravity SDK"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/power-agent-hubs-or-custom-harnesses-with-the-antigravity-sdk-ye2wxwesl#faq","mainEntity":[{"@type":"Question","name":"How do I persist multi-turn agent conversation state with the Antigravity SDK?","acceptedAnswer":{"@type":"Answer","text":"State persistence is managed declaratively by setting save_dir and conversation_id on LocalAgentConfig, rather than using an external database. Setting save_dir establishes a root directory, and full turn trajectories, tool receipts, and artifacts get stored under traj-\u003cconversation_id\u003e. Supplying an existing conversation_id reattaches to that session; omitting it lets the SDK mint a new ID on the first turn. daily.dev surfaces practical patterns like this for developers wiring up stateful agent sessions."}},{"@type":"Question","name":"How do I restrict an AI agent's file tools to a specific workspace directory in Antigravity SDK?","acceptedAnswer":{"@type":"Answer","text":"Set the workspaces parameter to the allowed directory paths and add policy.workspace_only() to the policies list on LocalAgentConfig. Built-in tools such as list_directory, find_file, search_directory, view_file, create_file, and edit_file then execute strictly within those configured workspace directories, and operations outside them are blocked. Developers sandboxing agent file access can find similar configuration walkthroughs on daily.dev."}},{"@type":"Question","name":"How do lifecycle hooks work for monitoring AI agent tool calls in real time?","acceptedAnswer":{"@type":"Answer","text":"Lifecycle hooks are decorated async functions such as on_session_start, pre_tool_call_decide, post_tool_call, and on_session_end that intercept agent transitions and can broadcast telemetry over WebSockets to a dashboard. The pre_tool_call_decide hook can inspect a tool_call's name and args and return a HookResult with allow=True or False to approve or block execution before it runs. Teams building observability into agent workflows track hook-based patterns like this on daily.dev."}}]}
```

