Challenge 4: Agent Symphony

Previous Challenge Next Challenge

Introduction

Breaking down complex problems into smaller, manageable sub-problems is a well-established strategy in software development. Multi-agent systems apply this principle to AI, allowing specialized agents to handle specific aspects of a larger task.

In this challenge we’ll introduce the concept of sub-agents and workflow agents which are specialized agents that control the execution flow of its sub-agents.

 Note
Workflow agents (sequential, parallel, loop) can be useful for orchestration in many cases as they’re reliable, well structured and predictable. However, it’s also possible to use LLM based Agents for orchestration if more flexibility is needed. In that case you’ll be defining the order and conditions for running the sub-agents in the agent’s instructions (the prompt).

Description

Create two new agents, resource_monitor_agent which should filter the list of resources found by the resource_scanner_agent, and store that into the session store as idle_resources using the appropriate schema. This agent should return back only the instances that are idle.

Then create a new sequential agent orchestrator_agent that calls the resource_scanner_agent and the resource_monitor_agent in sequence. Once you have created the new agents, update the root_agent to be the orchestrator_agent.

 Note
This is a very basic scenario where we’re looking up basic stats and letting the Agent to decide what’s idle. The power of the LLM based agents is however that they can also detect more advanced patterns based on more complex data (which is beyond the scope of this challenge)

Success Criteria

  • The Agent runs both resource_scanner_agent and resource_monitor_agent in sequence and updates the session store.
  • The session state contains gce-dev-lnx-tomcat-001, gce-dev-lnx-tomcat-002 and gce-sbx-lnx-blob-001 (and their details) for idle_resources using the correct schema when prompted to find the idle resources.
  • The changes have been pushed to the remote Git repository.

Learning Resources

Tips

  • You can use adk web UI to view the agents involved.

Previous Challenge Next Challenge