Skip to content

Add Home Assistant multi-agent system demo using Google ADK#3

Draft
danielstegeman with Copilot wants to merge 7 commits into
mainfrom
copilot/setup-project-skeleton
Draft

Add Home Assistant multi-agent system demo using Google ADK#3
danielstegeman with Copilot wants to merge 7 commits into
mainfrom
copilot/setup-project-skeleton

Conversation

Copilot AI commented Mar 12, 2026

Copy link
Copy Markdown

Multi-agent home automation demo in google-agent-kit/home_assistant/ using Google ADK's sub-agent orchestration pattern. All external calls are mocked -- no API keys or real integrations required.

Architecture

  • Orchestrator (agents/orchestrator_agent.py) -- routes by intent keywords to specialist sub-agents via ADK's sub_agents pattern
  • Devices Agent -- get_device_state / set_device_state for lights, locks, thermostat
  • Schedule Agent -- get_calendar_events / create_calendar_event
  • Info Agent -- get_weather / get_shopping_list / add_to_shopping_list

Components

  • tools/ -- 7 deterministic mock tools returning hardcoded dicts. set_device_state persists to in-memory DB for read-after-write consistency.
  • state/store.py -- module-level dict shared across agents, pre-populated with household defaults (who_is_home, preferred_movie_brightness, etc.)
  • agent.py -- exports root_agent (the orchestrator) for ADK discovery
  • main.py -- async entry point using InMemoryRunner with interactive console mode

Tests

36 unit tests covering state store CRUD, all mock tool return shapes + persistence, and agent wiring (tool bindings, sub-agent registration, routing keywords in instructions).

# Agent wiring is verified without LLM calls
def test_has_all_sub_agents(self):
    sub_names = {a.name for a in orchestrator_agent.sub_agents}
    assert sub_names == {"devices_agent", "schedule_agent", "info_agent"}

def test_does_not_have_tools(self):
    assert orchestrator_agent.tools == []

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI and others added 2 commits March 12, 2026 18:23
…, and tests

Co-authored-by: danielstegeman <22636692+danielstegeman@users.noreply.github.com>
Co-authored-by: danielstegeman <22636692+danielstegeman@users.noreply.github.com>
Copilot AI changed the title [WIP] Add project setup for multi-agent system Add Home Assistant multi-agent system demo using Google ADK Mar 12, 2026
Copilot AI requested a review from danielstegeman March 12, 2026 18:26
@danielstegeman

Copy link
Copy Markdown
Owner

@copilot review this pr

Copilot AI commented Mar 12, 2026

Copy link
Copy Markdown
Author

@copilot review this pr

Code Review Summary

This PR implements a Home Assistant multi-agent system using Google ADK. Here are the key findings:

Architecture (Good):

  • Clean separation: orchestrator delegates to 3 specialist agents (devices, schedule, info)
  • Each specialist owns its domain tools -- orchestrator has no tools, only sub-agents
  • 7 mock tools with deterministic returns -- no real API calls
  • State store properly isolates mutable state with reset_state() for test isolation

Tests (36 passing):

  • State store: CRUD operations, defaults, isolation
  • Tools: return shapes, persistence, edge cases
  • Agents: wiring verification (tools, sub-agents, routing keywords)

Potential improvements for production:

  1. _DEVICE_DB in device_tools.py is module-level mutable state -- consider moving to the shared state store for consistency
  2. get_shopping_list() initializes default items on first call -- could race with reset_state() in concurrent scenarios
  3. Type hints could be stricter (e.g., Any -> specific types in state store)

Security: CodeQL clean, no dependency advisories for google-adk 1.26.0

Overall, the implementation follows ADK patterns well and meets the spec requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants