DEV Community

Hemant Govekar
Hemant Govekar

Posted on • Edited on

Google ADK

Folder-wise ADK Python project structure to build your AI agent assistant for Azure DevOps integration. It includes all prompts, scripts, and test data needed to simulate and evaluate the agent’s capabilities.


πŸ—‚οΈ Folder Structure Overview

azure_sprint_assistant/
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ planner_agent.py
β”‚   β”œβ”€β”€ retrospective_agent.py
β”‚   β”œβ”€β”€ ceremony_evaluator_agent.py
β”‚   └── notifier_agent.py
β”œβ”€β”€ workflows/
β”‚   └── sprint_workflow.py
β”œβ”€β”€ prompts/
β”‚   β”œβ”€β”€ planner_prompts.yaml
β”‚   β”œβ”€β”€ retrospective_prompts.yaml
β”‚   β”œβ”€β”€ ceremony_prompts.yaml
β”‚   └── notification_prompts.yaml
β”œβ”€β”€ connectors/
β”‚   β”œβ”€β”€ azure_devops.py
β”‚   β”œβ”€β”€ confluence_api.py
β”‚   └── teams_webhook.py
β”œβ”€β”€ data/
β”‚   └── test_data.json
β”œβ”€β”€ utils/
β”‚   └── security.py
β”œβ”€β”€ main.py
└── README.md
Enter fullscreen mode Exit fullscreen mode

🧠 agents/

planner_agent.py

from adk import LlmAgent
from prompts.planner_prompts import PROMPTS
from connectors.azure_devops import get_sprint_data, get_team_availability

class PlannerAgent(LlmAgent):
    def run(self, context):
        sprint_data = sanitize_input(get_sprint_data())
        availability = sanitize_input(get_team_availability())
        prompt = PROMPTS["capacity_prediction"].format(data=sprint_data, availability=availability)
        return self.llm(prompt)
Enter fullscreen mode Exit fullscreen mode

retrospective_agent.py

from adk import LlmAgent
from prompts.retrospective_prompts import PROMPTS
from connectors.confluence_api import get_retrospective_notes

class RetrospectiveAgent(LlmAgent):
    def run(self, context):
        notes = sanitize_input(get_retrospective_notes())
        prompt = PROMPTS["summary"].format(notes=notes)
        return self.llm(prompt)
Enter fullscreen mode Exit fullscreen mode

ceremony_evaluator_agent.py

from adk import LlmAgent
from prompts.ceremony_prompts import PROMPTS
from connectors.azure_devops import get_scrum_event_records

class CeremonyEvaluatorAgent(LlmAgent):
    def run(self, context):
        records = sanitize_input(get_scrum_event_records())
        prompt = PROMPTS["evaluate"].format(records=records)
        return self.llm(prompt)
Enter fullscreen mode Exit fullscreen mode

notifier_agent.py

from adk import LlmAgent
from prompts.notification_prompts import PROMPTS
from connectors.teams_webhook import send_notification

class NotifierAgent(LlmAgent):
    def run(self, context):
        message = PROMPTS["reminder"].format(context=sanitize_input(context))
        send_notification(message)
Enter fullscreen mode Exit fullscreen mode

πŸ” workflows/

sprint_workflow.py

from adk import SequentialWorkflow
from agents.planner_agent import PlannerAgent
from agents.retrospective_agent import RetrospectiveAgent
from agents.ceremony_evaluator_agent import CeremonyEvaluatorAgent
from agents.notifier_agent import NotifierAgent

workflow = SequentialWorkflow([
    PlannerAgent(),
    RetrospectiveAgent(),
    CeremonyEvaluatorAgent(),
    NotifierAgent()
])
Enter fullscreen mode Exit fullscreen mode

πŸ“ prompts/

planner_prompts.yaml

capacity_prediction: |
  Based on the following sprint history and team availability:
  {data}
  {availability}
  Predict team capacity and recommend optimal story scope.
Enter fullscreen mode Exit fullscreen mode

retrospective_prompts.yaml

summary: |
  Summarize the following retrospective notes and highlight key action items:
  {notes}
Enter fullscreen mode Exit fullscreen mode

ceremony_prompts.yaml

evaluate: |
  Evaluate the effectiveness of the following Scrum ceremonies:
  {records}
  Suggest improvements based on team maturity and feedback.
Enter fullscreen mode Exit fullscreen mode

notification_prompts.yaml

reminder: |
  Reminder: {context}
  Please review and take necessary actions.
Enter fullscreen mode Exit fullscreen mode

πŸ”Œ connectors/

azure_devops.py

def get_sprint_data():
    # Simulated secure API call
    return {"velocity": 45, "story_points": [5, 8, 13], "dependencies": ["API", "UI"]}

def get_team_availability():
    return {"Alice": "80%", "Bob": "60%", "Carol": "100%"}

def get_scrum_event_records():
    return {"planning": "low engagement", "review": "positive feedback", "retro": "mixed"}
Enter fullscreen mode Exit fullscreen mode

confluence_api.py

def get_retrospective_notes():
    return "Team struggled with API integration. Suggested better pre-sprint alignment."
Enter fullscreen mode Exit fullscreen mode

teams_webhook.py

def send_notification(message):
    print(f"Sending to Teams: {message}")
Enter fullscreen mode Exit fullscreen mode

πŸ§ͺ data/

test_data.json

{
  "sprint_history": [{"sprint": "Sprint 1", "velocity": 40}, {"sprint": "Sprint 2", "velocity": 45}],
  "availability": {"Alice": "80%", "Bob": "60%", "Carol": "100%"},
  "story_points": {"estimated": 50, "actual": 45},
  "dependencies": ["API", "UI", "Database"],
  "team_changes": ["Carol joined Sprint 2"],
  "scrum_events": ["planning", "review", "retro"],
  "meeting_transcripts": ["Transcript 1", "Transcript 2"],
  "retrospective_notes": ["Improve API alignment", "Better story breakdown"],
  "planning_goals": ["Deliver login module", "Refactor dashboard"],
  "action_items": ["Assign API lead", "Schedule UI review"],
  "scrum_board": ["Story A", "Story B", "Bug C"]
}
Enter fullscreen mode Exit fullscreen mode

πŸ” utils/

security.py

def sanitize_input(data):
    # Remove PII and sensitive tokens
    return {k: v for k, v in data.items() if "password" not in k and "token" not in k}
Enter fullscreen mode Exit fullscreen mode

πŸš€ main.py

from workflows.sprint_workflow import workflow

if __name__ == "__main__":
    result = workflow.run({})
    print(result)
Enter fullscreen mode Exit fullscreen mode

πŸ“˜ README.md

# Azure Sprint Assistant (ADK)

An AI-powered agent assistant built using Google's Agent Development Kit (ADK) to optimize sprint planning, evaluate Scrum ceremonies, and automate team notifications.

## Features
- Predict team capacity and recommend story scope
- Evaluate and improve Scrum ceremonies
- Summarize retrospectives and planning goals
- Send reminders via Teams

## Setup
Enter fullscreen mode Exit fullscreen mode


bash
pip install google-adk
python main.py


## Security
All inputs are sanitized to prevent exposure of confidential data.

## Test Coverage
Includes simulated test data for all scenarios.
Enter fullscreen mode Exit fullscreen mode

βœ… Updated Folder Structure (with ADK conventions)

azure_sprint_assistant/
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ agent.py          ◀️ Root agent defined here
β”‚   β”œβ”€β”€ planner_agent.py
β”‚   β”œβ”€β”€ retrospective_agent.py
β”‚   β”œβ”€β”€ ceremony_evaluator_agent.py
β”‚   └── notifier_agent.py
β”œβ”€β”€ workflows/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── sprint_workflow.py
β”œβ”€β”€ prompts/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ planner_prompts.yaml
β”‚   β”œβ”€β”€ retrospective_prompts.yaml
β”‚   β”œβ”€β”€ ceremony_prompts.yaml
β”‚   └── notification_prompts.yaml
β”œβ”€β”€ connectors/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ azure_devops.py
β”‚   β”œβ”€β”€ confluence_api.py
β”‚   └── teams_webhook.py
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── security.py
β”œβ”€β”€ data/
β”‚   └── test_data.json
β”œβ”€β”€ .env                  ◀️ Environment variables (tokens, endpoints)
β”œβ”€β”€ main.py               ◀️ Entry point
└── README.md
Enter fullscreen mode Exit fullscreen mode

🧠 agent.py β€” Root Agent Definition

This is where you define the root agent that orchestrates the workflow.

from adk import Agent
from workflows.sprint_workflow import workflow

root_agent = Agent(
    id="azure-sprint-assistant",
    name="Sprint Assistant",
    description="AI agent that predicts sprint capacity, evaluates ceremonies, and automates Scrum workflows.",
    workflow=workflow
)
Enter fullscreen mode Exit fullscreen mode

πŸ› οΈ __init__.py Files

These make each folder a Python package. They can be empty or used to expose key components:

Example: agents/__init__.py

from .agent import root_agent
Enter fullscreen mode Exit fullscreen mode

πŸ” .env β€” Environment Configuration

This file stores secrets and config values securely:

AZURE_DEVOPS_TOKEN=your_token_here
CONFLUENCE_API_KEY=your_key_here
TEAMS_WEBHOOK_URL=https://...
Enter fullscreen mode Exit fullscreen mode

You can load these in your Python code using os.environ or dotenv:

from dotenv import load_dotenv
import os

load_dotenv()
token = os.getenv("AZURE_DEVOPS_TOKEN")
Enter fullscreen mode Exit fullscreen mode

πŸš€ main.py β€” Run the Root Agent

from agents import root_agent

if __name__ == "__main__":
    result = root_agent.run({})
    print(result)
Enter fullscreen mode Exit fullscreen mode

🧩 Summary

File Purpose
agent.py Defines root_agent = Agent(...)
__init__.py Enables package imports
.env Stores secrets securely
main.py Runs the root agent

"Predict our team capacity for next sprint."
β€’ "Recommend stories based on past velocity and dependencies."
β€’ "Summarize last retrospective and suggest improvements."
β€’ "Notify team about planning meeting tomorrow."
β€’ "How engaged was the team in last sprint ceremonies?"
β€’ "Store these notes in Confluence: [meeting transcript]"

Top comments (0)