Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ Welcome to the official repository for the Microsoft AI Agentic Workshop! This r
## Key Features

- **[Microsoft Agent Framework](https://github.com/microsoft/agent-framework) Integration** - Single-agent, multi-agent Magentic orchestration, and handoff-based domain routing with MCP tools. [Pattern guide β†’](agentic_ai/agents/agent_framework/README.md)
- **[Workflow Orchestration](agentic_ai/workflow/)** - Pregel-style execution, checkpointing, human-in-the-loop patterns, and real-time observability. [Fraud Detection Demo β†’](agentic_ai/workflow/fraud_detection/)
- **Advanced UI Options** - React frontend with streaming visualization or Streamlit for quick prototyping
- **[Workflow Orchestration](agentic_ai/workflow/)** - Hybrid Workflow + Durable Task architecture with fan-out/fan-in topology, human-in-the-loop, and real-time observability. [Fraud Detection Demo β†’](agentic_ai/workflow/fraud_detection_durable/)
- **[Observability with Application Insights](agentic_ai/observability/)** - Full tracing of agent executions, tool calls, and LLM invocations with pre-built Grafana dashboards. [Setup Guide β†’](agentic_ai/observability/README.md)
- **Advanced UI Options** - React frontend with interactive workflow visualization and step-by-step tool call details
- **[MCP Server Integration](mcp/)** - Model Context Protocol for enhanced agent tool capabilities with advanced features: authentication, RBAC, and APIM integration
- **[Emerging Agentic Scenarios](agentic_ai/scenarios/)** - Long-running workflows, progress updates, and durable agent patterns
- **[Agent Evaluations](agentic_ai/evaluations/)** - Evaluate agent performance with custom metrics and test datasets
- **Agent State & History Persistence** - In-memory or CosmosDB backend for conversation history and agent state
- **[Enterprise-Ready Reference Architecture](infra/README.md)** - Production-grade deployment with VNet integration, private endpoints, managed identity, Terraform/Bicep IaC, and GitHub Actions CI/CD

Expand All @@ -46,7 +47,7 @@ Welcome to the official repository for the Microsoft AI Agentic Workshop! This r
1. Review the [Setup Instructions](./SETUP.md) for environment prerequisites and step-by-step installation.
2. Explore the [Business Scenario and Agent Design](./SCENARIO.md) to understand the workshop challenge.
3. Check out the **[Agent Framework Implementation Patterns](agentic_ai/agents/agent_framework/README.md)** to choose the right multi-agent approach (single-agent, Magentic orchestration, or handoff pattern).
4. Try the **[Fraud Detection Workflow Demo](agentic_ai/workflow/fraud_detection/)** to see enterprise orchestration patterns in action.
4. Try the **[Durable Fraud Detection Workflow](agentic_ai/workflow/fraud_detection_durable/)** to see hybrid Workflow + Durable Task orchestration with human-in-the-loop.
5. Dive into [System Architecture](./ARCHITECTURE.md) before building and customizing your agent solutions.
6. Utilize the [Support Guide](./SUPPORT.md) for troubleshooting and assistance.

Expand Down
17 changes: 17 additions & 0 deletions agentic_ai/applications/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,20 @@ MAGENTIC_MAX_ROUNDS=10
# 0 = no context transfer (domain isolation)
# N = transfer last N turns (1 turn = user message + assistant response)
HANDOFF_CONTEXT_TRANSFER_TURNS=-1

############################################
# Application Insights Observability #
############################################
# Connection string from Azure Portal > Application Insights > Overview > Connection String
# APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=xxx;IngestionEndpoint=https://xxx.in.applicationinsights.azure.com/;LiveEndpoint=https://xxx.livediagnostics.monitor.azure.com/"

# Enable sensitive data in traces (prompts, responses) - DEV ONLY!
# ENABLE_SENSITIVE_DATA=true

# Service name for telemetry (appears in Application Insights and Grafana)
# OTEL_SERVICE_NAME="contoso-agent"

# Grafana Dashboards (after setting up Azure Managed Grafana):
# - Agent Overview: https://aka.ms/amg/dash/af-agent
# - Workflow Overview: https://aka.ms/amg/dash/af-workflow

24 changes: 23 additions & 1 deletion agentic_ai/applications/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from pathlib import Path
from typing import Dict, List, Any, Optional, Set, DefaultDict
from collections import defaultdict

# Add parent directory to path for observability module
sys.path.insert(0, str(Path(__file__).parent.parent))

import httpx
import jwt
Expand All @@ -29,10 +32,29 @@
from dotenv import load_dotenv

# ------------------------------------------------------------------
# Environment
# Environment (load first so observability can read connection string)
# ------------------------------------------------------------------
load_dotenv() # read .env if present

# ------------------------------------------------------------------
# Observability (must be before any agent imports)
# ------------------------------------------------------------------
from observability import setup_observability

# Initialize Application Insights tracing if configured
# All agents (single, reflection, handoff, etc.) are automatically traced
_observability_enabled = setup_observability(
service_name="contoso-agent-backend",
enable_live_metrics=True,
enable_sensitive_data=os.getenv("ENABLE_SENSITIVE_DATA", "false").lower() in ("1", "true", "yes"),
)
if _observability_enabled:
logging.getLogger(__name__).info("βœ… Application Insights observability enabled")

# ------------------------------------------------------------------
# Auth Configuration
# ------------------------------------------------------------------

# Feature flag: disable auth for local dev / demos
DISABLE_AUTH = os.getenv("DISABLE_AUTH", "false").lower() in ("1", "true", "yes")

Expand Down
1 change: 1 addition & 0 deletions agentic_ai/applications/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies = [
"azure-ai-evaluation>=1.14.0",
"azure-ai-projects>=2.0.0b2",
"azure-cosmos==4.9.0",
"azure-monitor-opentelemetry>=1.6.0",
"fastapi==0.115.12",
"flasgger==0.9.7.1",
"flask==3.0.3",
Expand Down
Loading
Loading