How talkitdoit/azure-ai-agent-team works
Purpose and entry point
This is a Python 3.11+ batch code-review application. It scans a local input directory, routes each supported source file to a language-specialized Azure AI Foundry agent, and writes a consolidated Markdown report. The executable entry point is agent_team_code_review.py; its primary input/output boundary is code-input/ → code_review_report.md.
Runtime and Azure boundary
The process runs locally under Python, with dependency definitions in requirements.txt and pyproject.toml. It loads environment settings from .env (template: .env_sample), notably PROJECT_ENDPOINT and MODEL_DEPLOYMENT_NAME. Authentication is delegated to Azure Default Credentials, supporting Azure CLI login locally and service-principal environment variables in CI/production. The remote execution boundary is Azure AI Foundry/Azure OpenAI model deployments.
Orchestration layer
agent_team_code_review.py coordinates the review run: initialize Azure connectivity, load agent definitions, discover reviewable files, invoke agents, and produce the final report. It is the control-plane owner for lifecycle sequencing and likely the correct integration point for CLI options, batching, failure policy, or report-level metadata.
Agent-team abstraction
utils/agent_team.py encapsulates creation and use of the multi-agent team. This separates Azure agent/client mechanics from the application workflow and is the key boundary for changing agent execution models, polling/thread behavior, prompt submission, or result collection. Team-specific behavior is configured by utils/agent_team_config.yaml.
Language routing and specialist agents
language_agents.yaml defines the architecture’s routing table: source-file extensions map to language identifiers, which map to named expert agents and their review instructions. The orchestrator uses this configuration to select an appropriate reviewer per file rather than applying one generic prompt. Adding language support should primarily be a configuration change here, subject to supported agent-team behavior in utils/agent_team.py.
Review data flow
1. Source files are discovered under code-input/.
2. File extensions are resolved through language_agents.yaml.
3. Supported files and their contents are sent to a corresponding Azure-hosted language agent.
4. Agent responses are aggregated by the orchestrator.
5. The combined review is persisted as code_review_report.md.
Current example inputs span C# and Python: code-input/AzureResourceService.cs and code-input/cloud_resources.py. Unsupported or absent input files are an explicit operational boundary.
Observability and output
The application supports OpenTelemetry-based Azure AI tracing, with tracing guidance in README_TRACING.md. When Azure AI Foundry/Application Insights is configured, agent execution and model interactions can be inspected remotely; content capture is governed by AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED. The durable local product is the generated Markdown report at code_review_report.md, while console output provides run-progress feedback.
Main entry points: agent_team_code_review.py Review orchestrator · agent_team.py Agent team adapter · AzureResourceService.cs C# example source · cloud_resources.py Python example source
Components 17
Local batch runtime
- Review orchestrator · Coordinates discovery, routing, agent calls, and report generation.
agent_team_code_review.py - Source input directory · Supported files are discovered recursively for review.
- C# example source
code-input/AzureResourceService.cs - Python example source
code-input/cloud_resources.py - Markdown review report · Consolidated review output.
code_review_report.md - Console progress
- Agent team adapter · Encapsulates agent creation, invocation, polling, and result collection.
utils/agent_team.py
Configuration
- Language routing table · Maps file extensions to specialist agents and review instructions.
language_agents.yaml - Agent team configuration
utils/agent_team_config.yaml - Environment settings · Supplies endpoint and model deployment settings.
- Environment template
.env_sample - Python dependencies
requirements.txt - Python project metadata
pyproject.toml
Azure services
- Azure Default Credentials · Uses Azure CLI locally or service-principal variables in CI.
- Azure AI Foundry agents · Hosts language-specialized agents and model execution.
- Azure OpenAI deployment
- Azure AI tracing · Optional OpenTelemetry traces can be inspected in Foundry or Application Insights.
README_TRACING.md
Connections 18
- C# example source → Source input directory: contained in
- Python example source → Source input directory: contained in
- Source input directory → Review orchestrator: discover files
- Language routing table → Review orchestrator: resolve reviewer
- Environment settings → Review orchestrator: load settings
- Environment template → Environment settings: template
- Python dependencies → Review orchestrator: runtime dependencies
- Python project metadata → Review orchestrator: Python 3.11+ project
- Review orchestrator → Agent team adapter: invoke per supported file
- Agent team configuration → Agent team adapter: configure team
- Agent team adapter → Azure Default Credentials: authenticate
- Azure Default Credentials → Azure AI Foundry agents: authorize access
- Agent team adapter → Azure AI Foundry agents: submit prompts and collect results
- Environment settings → Azure OpenAI deployment: select deployment
- Azure AI Foundry agents → Azure OpenAI deployment: execute reviews
- Review orchestrator → Markdown review report: aggregate and write Markdown
- Review orchestrator → Console progress: emit progress
- Agent team adapter → Azure AI tracing: emit OpenTelemetry traces