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
π§ 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)
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)
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)
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)
π 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()
])
π 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.
retrospective_prompts.yaml
summary: |
Summarize the following retrospective notes and highlight key action items:
{notes}
ceremony_prompts.yaml
evaluate: |
Evaluate the effectiveness of the following Scrum ceremonies:
{records}
Suggest improvements based on team maturity and feedback.
notification_prompts.yaml
reminder: |
Reminder: {context}
Please review and take necessary actions.
π 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"}
confluence_api.py
def get_retrospective_notes():
return "Team struggled with API integration. Suggested better pre-sprint alignment."
teams_webhook.py
def send_notification(message):
print(f"Sending to Teams: {message}")
π§ͺ 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"]
}
π 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}
π main.py
from workflows.sprint_workflow import workflow
if __name__ == "__main__":
result = workflow.run({})
print(result)
π 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
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.
β 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
π§ 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
)
π οΈ __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
π .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://...
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")
π main.py β Run the Root Agent
from agents import root_agent
if __name__ == "__main__":
result = root_agent.run({})
print(result)
π§© 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)