#4599 standardized framework to define agoal and request an agent team with orchestration
#4599 standardized framework to define agoal and request an agent team with orchestration
#4599 Which Google AI-assisted coding tool(s) would be best for creating a configurable/customizable AI agent team?
If you are looking to build, configure, and orchestrate a custom, multi-agent AI team, Google offers two primary AI-assisted coding and development tools tailored for this exact "agent-first" paradigm: Google Antigravity and Jules (via Jules Tools).
Depending on your workflow—whether you prefer a local, deeply integrated development environment with a visual dashboard, or a cloud-hosted, scriptable CLI pipeline—here is how these tools align with your goal.
1. Google Antigravity (The Control Center)
Best for: Local orchestration, interactive management, and visual debugging of multiple parallel agents.
Google Antigravity is a dedicated agentic development platform designed specifically to launch, monitor, and orchestrate autonomous AI activities.
The Standalone App & Manager View: Antigravity 2.0 serves as a central command center.
If you are building a custom agent team, this platform allows you to run, manage, and coordinate multiple local agents operating in parallel across different workspaces. The Antigravity IDE: A heavily modified, agent-first fork of VS Code.
It gives your workspace-specific agents direct access to the editor, terminal, and integrated debugging tools. Artifact-Driven Transparency: Instead of hiding complex multi-agent execution behind raw terminal logs, Antigravity agents generate verifiable "Artifacts" (such as task lists, state changes, system diagrams, and step-by-step implementation plans).
This makes it highly effective for verifying how your custom agents are interacting with one another. Extensibility with MCP: Antigravity and its underlying Gemini Code Assist agent mode natively support the Model Context Protocol (MCP).
This allows you to easily plug your custom agents into external data sources (like local databases, markdown vaults, or GitHub) to provide them with specialized tools.
2. Jules & Jules Tools (The Async Pipeline)
Best for: Background automation, remote VM sandboxing, and scriptable terminal pipelines.
If you want to construct a configurable team of agents that work asynchronously in isolated, secure cloud environments without blocking your local machine, Jules is the ideal engine.
Asynchronous VM Sandboxing: When you delegate a task, Jules spins up an isolated Google Cloud VM, clones the relevant repository, installs dependencies, and runs its plans.
It is ideal for "fire-and-forget" agentic tasks. Jules Tools (CLI & TUI): Available via
npm install -g @google/jules, this command-line companion makes Jules highly programmable. You can easily script multi-agent coordination by piping outputs from one CLI utility into Jules.For example, you can write a script that analyzes issues, generates structured handovers, and spins up parallel Jules VMs to tackle different parts of a system architecture. Configurable Context via
AGENTS.md: Jules natively reads a file namedAGENTS.mdat the root of your repository. You can use this file to explicitly define the roles, boundaries, behaviors, and communication schemas of your codebase's custom agents—giving Jules a direct map of how your agent team is supposed to interact.
Which should you choose?
| Feature / Need | Google Antigravity | Jules / Jules Tools |
| Primary Interface | Local Standalone App & Agentic IDE | CLI, TUI, and GitHub-native web UI |
| Execution Environment | Local machine (parallel workspaces) | Isolated Google Cloud VMs |
| Collaboration Style | Interactive, real-time feedback & plan approvals | Asynchronous, task-and-wait (creates Pull Requests) |
| Custom Agent Mapping | Multi-agent manager UI & MCP integrations | Structured AGENTS.md configurations & terminal scripting |
If you want to design, test, and visually monitor your agent team's step-by-step logic and tool use locally, start with Google Antigravity.
Would you like to explore a script template for orchestrating multiple tasks via the Jules CLI, or do you want to look at configuring an MCP server to extend an agent's toolkit in Antigravity?
I want to develop a standardized framework that lets me define the goal and request an agent team with orchestration.
To build a standardized framework where you define a global goal and programmatically provision a structured team of agents with automated orchestration, you can combine a declarative configuration pattern with the Jules or Antigravity toolchains.
Because you want this framework to be standardized and repeatable, the cleanest approach is to use a Declarative Manifest Design Pattern mapped directly to the local file system or repository root. Here is how to structure it.
The Blueprint: orchestration-manifest.json
Instead of hardcoding agent behaviors inside your logic scripts, define a standardized JSON framework that acts as the blueprint. This schema establishes the overall Goal, spins up independent Agents, defines their tool limits, and mandates an Orchestration Topology (e.g., Hierarchical Supervisor, Sequential Pipeline, or Peer-to-Peer Mesh).
{
"manifest_version": "1.0.0",
"global_goal": "Ingest multi-domain systems engineering specs, construct a Neo4j knowledge graph, and execute safety verification queries.",
"orchestration": {
"topology": "hierarchical",
"supervisor": "ArchitectAgent",
"max_routing_loops": 5
},
"team": [
{
"agent_id": "ArchitectAgent",
"role": "Supervisor & Task Router",
"system_instruction": "Deconstruct the global goal into isolated technical tasks. Route data payloads to GraphBuilder and CodeReviewer. Aggregate final safety reports.",
"tools": ["workspace_file_router"]
},
{
"agent_id": "GraphBuilder",
"role": "Cypher Generation & Neo4j Ingestion",
"system_instruction": "Receive relational system data payloads. Convert structural components into optimized Cypher scripts. Execute updates against the active Neo4j endpoint.",
"tools": ["neo4j_mcp_client", "file_writer"]
},
{
"agent_id": "CodeReviewer",
"role": "Static Analysis & Hazard Verification",
"system_instruction": "Intercept generated scripts. Audit the logic for compliance flags, safety violations, or orphaned nodes. Return an approval or rejection token to the ArchitectAgent.",
"tools": ["workspace_linter"]
}
]
}
Implementation Pathway 1: The Asynchronous AGENTS.md Engine (Jules CLI)
If you want to run this framework as a headless, asynchronous execution pipeline that you can invoke from a local terminal or Jupyter Notebook, you can leverage the Jules Tools CLI engine.
Jules natively reads structured configurations at your repository root to provision secure cloud-based sandboxes.
The Implementation Steps:
Write a local initialization script (Python/Node) that consumes your
orchestration-manifest.jsonand parses it into a standardAGENTS.mdfile.In your script, leverage
jules-toolsvia the terminal to trigger the orchestration framework:jules run --goal "$(cat goal.txt)" --config orchestration-manifest.jsonExecution Behavior: Jules interprets the global goal, spins up an isolated background VM container, assigns sub-tasks to the roles defined in your manifest, runs the execution loop autonomously, and surfaces the final execution state as an Artifact or a unified Git Pull Request.
Implementation Pathway 2: Interactive Orchestration (Antigravity & MCP)
If you prefer a framework where the agent team runs locally on your machine, can interact directly with your file workspace, and provides an active interface for real-time verification, build it inside Google Antigravity.
Antigravity natively manages parallel, isolated workspaces managed by different agent personas.
The Implementation Steps:
Tooling via MCP (Model Context Protocol): To let your agent team manipulate your local tools (such as talking to a Neo4j instance or reading local markdown files), expose those interfaces as local MCP servers.
Orchestration Loop: Utilize Python to build a clean state-machine wrapper around the Gemini API. The supervisor agent reads the
orchestration-manifest.json, tracks the state of sub-agents, and invokes their individual system instructions via separate model calls.Transparency UI: As the agents coordinate, you can open the Antigravity Manager View to visually watch the execution stream, approve tasks in the generated plan Artifacts, and ensure the orchestration logic stays within the boundaries defined by your framework.
Recommended Next Step
To get this standardized framework running, do you want to build the Python orchestration harness that parses this JSON manifest and runs the multi-agent loop via the Gemini API, or would you prefer to draft the shell scripts to coordinate tasks using the Jules CLI?
Python orchestration harness applying multi-agent loop via the Gemini API
To orchestrate a custom multi-agent team via the Google Gen AI Python SDK (google-genai), you can build a programmatic state-machine harness. This harness parses your declarative JSON manifest, initializes separate system contexts for each agent persona, and uses structured model outputs to control task routing.
Here is a complete, production-grade Python orchestration harness implementing a Hierarchical Supervisor Loop.
Prerequisites
Ensure you have the modern Google Gen AI SDK installed and your API key exported:
pip install google-genai pydantic
export GEMINI_API_KEY="your-api-key-here"
The Python Orchestration Harness (orchestrator.py)
import os
import json
from typing import List, Dict, Any, Optional
from pydantic import BaseModel, Field
from google import genai
from google.genai import types
# ---------------------------------------------------------------------------
# 1. Define Structured Output Schemas for Orchestration Routing
# ---------------------------------------------------------------------------
class AgentTaskAssignment(BaseModel):
target_agent_id: str = Field(
..., description="The ID of the sub-agent to invoke next."
)
task_payload: str = Field(
..., description="The specific data and task context to send to the target agent."
)
class SupervisorDecision(BaseModel):
action: str = Field(
..., description="Choose either 'DELEGATE' to route a sub-task or 'FINALIZE' if the global goal is achieved."
)
routing: Optional[AgentTaskAssignment] = Field(
None, description="Required if action is DELEGATE. Dictates the next agent step."
)
final_summary: Optional[str] = Field(
None, description="Required if action is FINALIZE. The consolidated output matching the global goal."
)
# ---------------------------------------------------------------------------
# 2. Core Orchestrator Class
# ---------------------------------------------------------------------------
class MultiAgentOrchestrator:
def __init__(self, manifest_path: str):
# Initialize the standard Google Gen AI client
self.client = genai.Client()
self.model_id = "gemini-2.5-flash" # Optimized for speed, context, and structural routing
# Load Framework Manifest
with open(manifest_path, 'r') as f:
self.manifest = json.load(f)
self.global_goal = self.manifest["global_goal"]
self.orchestration_cfg = self.manifest["orchestration"]
self.supervisor_id = self.orchestration_cfg["supervisor"]
self.max_loops = self.orchestration_cfg.get("max_routing_loops", 5)
# Build registry of agents from manifest
self.agent_registry = {agent["agent_id"]: agent for agent in self.manifest["team"]}
# Task execution whiteboard/shared state memory
self.shared_memory: List[Dict[str, Any]] = []
def _execute_sub_agent(self, agent_id: str, payload: str) -> str:
"""Invokes an isolated sub-agent persona to complete a specific sub-task."""
agent_meta = self.agent_registry[agent_id]
print(f"🤖 [{agent_id}] Processing Task...")
prompt = (
f"You are operating within a multi-agent team context.\n"
f"Your Assigned Sub-Task: {payload}\n\n"
f"Perform your task thoroughly and return only your factual results or output tokens."
)
response = self.client.models.generate_content(
model=self.model_id,
contents=prompt,
config=types.GenerateContentConfig(
system_instruction=agent_meta["system_instruction"],
temperature=0.2
)
)
return response.text
def run(self):
"""Runs the main supervisor routing loop."""
print(f"🚀 Initializing Multi-Agent Framework...")
print(f"🎯 Global Goal: {self.global_goal}\n" + "-"*60)
supervisor_meta = self.agent_registry[self.supervisor_id]
current_loop = 0
while current_loop < self.max_loops:
current_loop += 1
print(f"\n🔄 Orchestration Loop [{current_loop}/{self.max_loops}]")
# Construct the supervisor's dynamic reasoning context
supervisor_context = (
f"Global Goal to achieve: {self.global_goal}\n\n"
f"Available Team Members:\n"
f"{json.dumps([{k: v['role']} for k, v in self.agent_registry.items() if k != self.supervisor_id], indent=2)}\n\n"
f"Shared Memory / Task Execution History So Far:\n"
f"{json.dumps(self.shared_memory, indent=2)}\n\n"
f"Analyze the history. If more work is required, DELEGATE the next step. If the goal is met, FINALIZE."
)
# Request structured routing decision from the Supervisor
response = self.client.models.generate_content(
model=self.model_id,
contents=supervisor_context,
config=types.GenerateContentConfig(
system_instruction=supervisor_meta["system_instruction"],
response_mime_type="application/json",
response_schema=SupervisorDecision,
temperature=0.1
)
)
# Parse the structured framework decision
decision = SupervisorDecision.model_validate_json(response.text)
if decision.action == "FINALIZE":
print(f"\n✅ [Framework Finalized] Goal Achieved in {current_loop} steps.")
print(f"\n=== Final Aggregated Report ===\n{decision.final_summary}")
return decision.final_summary
elif decision.action == "DELEGATE" and decision.routing:
target = decision.routing.target_agent_id
payload = decision.routing.task_payload
if target not in self.agent_registry:
error_msg = f"Supervisor attempted to route to invalid agent target: {target}"
self.shared_memory.append({"error": error_msg})
continue
# Execute worker agent execution step
agent_output = self._execute_sub_agent(target, payload)
# Log execution to global framework context memory
self.shared_memory.append({
"step": current_loop,
"agent_id": target,
"assigned_task": payload,
"output_results": agent_output
})
print(f"⚠️ Orchestration hit max execution loop threshold ({self.max_loops}) without explicit finalization.")
# ---------------------------------------------------------------------------
# 3. Execution Execution Target
# ---------------------------------------------------------------------------
if __name__ == "__main__":
# Create an inline file mock of your configuration format
manifest_data = {
"manifest_version": "1.0.0",
"global_goal": "Parse data payload of 3 systems, map them to Cypher scripts, and perform static safety analysis.",
"orchestration": {
"topology": "hierarchical",
"supervisor": "ArchitectAgent",
"max_routing_loops": 5
},
"team": [
{
"agent_id": "ArchitectAgent",
"role": "Supervisor & Task Router",
"system_instruction": "You are the project master planner. Review execution state history. Break down the overarching target and sequentially assign work to components. Combine final safety logs."
},
{
"agent_id": "GraphBuilder",
"role": "Cypher Generation",
"system_instruction": "Convert system text descriptions into valid, production-ready Neo4j Cypher statements (`MERGE (s:System {id:...})`). Output only pure Cypher code block strings."
},
{
"agent_id": "CodeReviewer",
"role": "Safety Compliance Check",
"system_instruction": "Inspect submitted Cypher queries. Scan explicitly for compliance risks, broken entity linkages, or insecure syntax loops. Return either 'PASSED' or 'FAILED' with rationale."
}
]
}
with open("orchestration-manifest.json", "w") as m:
json.dump(manifest_data, m, indent=2)
# Instantiate and trigger the multi-agent loop execution engine
orchestrator = MultiAgentOrchestrator("orchestration-manifest.json")
orchestrator.run()
Key Architectural Highlights of this Harness
Structured JSON Schema Enforcement: Using Pydantic configurations directly within
response_schemaguarantees the supervisor agent cannot return unstructured prose for its routing loop. It is forced to emit predictableDELEGATEorFINALIZEtokens.Separation of Concerns: Each sub-agent call is executed in a sterile sandbox environment. The sub-agents do not see the raw code, prompts, or structural footprints of other agents; they only see their direct task context provided by the
ArchitectAgent.State Management Transparency: The
shared_memorypipeline acts as a linear, append-only whiteboard. Every single transformation task, code output, and critique is captured and fed back to the supervisor in the subsequent execution cycle, preventing hallucination loops.
From <https://gemini.google.com/app/> Google Gemini (3.5 Flash)
Comments
Post a Comment