diff --git a/docs/CustomizingAzdParameters.md b/docs/CustomizingAzdParameters.md index 7c25507df..c2cb77eaa 100644 --- a/docs/CustomizingAzdParameters.md +++ b/docs/CustomizingAzdParameters.md @@ -8,6 +8,7 @@ By default this template will use the environment name as the prefix to prevent | Name | Type | Default Value | Purpose | | ------------------------------- | ------ | ----------------- | --------------------------------------------------------------------------------------------------- | +| `AZURE_ENV_DEPLOYMENT_FLAVOR` | string | `bicep` | Used for different deployment flavor, accepted values `bicep`, `avm`, `avm-waf` | | `AZURE_ENV_NAME` | string | `macae` | Used as a prefix for all resource names to ensure uniqueness across environments. | | `AZURE_LOCATION` | string | `` | Location of the Azure resources. Controls where the infrastructure will be deployed. | | `AZURE_ENV_AI_SERVICE_LOCATION` | string | `` | Specifies the region for OpenAI resource deployment. | @@ -18,8 +19,7 @@ By default this template will use the environment name as the prefix to prevent | `AZURE_ENV_MODEL_5_4_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). | | `AZURE_ENV_MODEL_5_4_NAME` | string | `gpt-5.4` | Specifies the name of the GPT model to be deployed. | | `AZURE_ENV_MODEL_5_4_VERSION` | string | `2026-03-05` | Version of the GPT model to be used for deployment. | -| `AZURE_ENV_MODEL_5_4_CAPACITY` | int | `150` | Sets the GPT model capacity. | -| `AZURE_ENV_IMAGE_TAG` | string | `latest_v5` | Docker image tag used for container deployments. | +| `AZURE_ENV_MODEL_5_4_CAPACITY` | int | `150` | Sets the GPT model capacity. | | | `AZURE_ENV_ENABLE_TELEMETRY` | bool | `true` | Enables telemetry for monitoring and diagnostics. | | `AZURE_EXISTING_AIPROJECT_RESOURCE_ID` | string | `` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. | | `AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID` | string | Guide to get your [Existing Workspace ID](re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. | diff --git a/docs/ManualAzureDeployment.md b/docs/ManualAzureDeployment.md deleted file mode 100644 index f70bfc220..000000000 --- a/docs/ManualAzureDeployment.md +++ /dev/null @@ -1,114 +0,0 @@ -# Manual Azure Deployment - -Manual Deployment differs from the ‘Quick Deploy’ option in that it will install an Azure Container Registry (ACR) service, and relies on the installer to build and push the necessary containers to this ACR. This allows you to build and push your own code changes and provides a sample solution you can customize based on your requirements. - -## Prerequisites - -- Current Azure CLI installed - You can update to the latest version using `az upgrade` -- Azure account with appropriate permissions -- Docker installed - -## Deploy the Azure Services - -All of the necessary Azure services can be deployed using the /deploy/macae.bicep script. This script will require the following parameters: - -``` -az login -az account set --subscription -az group create --name --location -``` - -To deploy the script you can use the Azure CLI. - -``` -az deployment group create \ - --resource-group \ - --template-file \ - --name -``` - -Note: if you are using windows with PowerShell, the continuation character (currently ‘\’) should change to the tick mark (‘`’). - -The template will require you fill in locations for Cosmos and OpenAI services. This is to avoid the possibility of regional quota errors for either of these resources. - -## Create the Containers - -- Get admin credentials from ACR - -Retrieve the admin credentials for your Azure Container Registry (ACR): - -```sh -az acr credential show \ ---name \ ---resource-group -``` - -## Login to ACR - -Login to your Azure Container Registry: - -```sh -az acr login --name -``` - -## Build and push the image - -Build the frontend and backend Docker images and push them to your Azure Container Registry. Run the following from the src/backend and the src/App directory contexts: - -```sh -az acr build \ ---registry \ ---resource-group \ ---image . -``` - -## Add images to the Container APP and Web App services - -To add your newly created backend image: - -- Navigate to the Container App Service in the Azure portal -- Click on Application/Containers in the left pane -- Click on the "Edit and deploy" button in the upper left of the containers pane -- In the "Create and deploy new revision" page, click on your container image 'backend'. This will give you the option of reconfiguring the container image, and also has an Environment variables tab -- Change the properties page to - - point to your Azure Container registry with a private image type and your image name (e.g. backendmacae:latest) - - under "Authentication type" select "Managed Identity" and choose the 'mace-containerapp-pull'... identity setup in the bicep template -- In the environment variables section add the following (each with a 'Manual entry' source): - - name: 'COSMOSDB_ENDPOINT' - value: \ - - name: 'COSMOSDB_DATABASE' - value: 'macae' - Note: To change the default, you will need to create the database in Cosmos - - name: 'COSMOSDB_CONTAINER' - value: 'memory' - - name: 'AZURE_OPENAI_ENDPOINT' - value: - - name: 'AZURE_OPENAI_DEPLOYMENT_NAME' - value: 'gpt-5.4-mini' - - name: 'AZURE_OPENAI_API_VERSION' - value: '2024-08-01-preview' - Note: Version should be updated based on latest available - - name: 'FRONTEND_SITE_NAME' - value: 'https://.azurewebsites.net' - - name: 'APPLICATIONINSIGHTS_CONNECTION_STRING' - value: - -- Click 'Save' and deploy your new revision - -To add the new container to your website run the following: - -``` -az webapp config container set --resource-group \ ---name \ ---container-image-name \ ---container-registry-url -``` diff --git a/docs/feature-changelog.md b/docs/feature-changelog.md deleted file mode 100644 index d3b8f63a5..000000000 --- a/docs/feature-changelog.md +++ /dev/null @@ -1,114 +0,0 @@ -# Feature Changelog — feature/TAS27 - -High-level feature list for this release. Tracks new capabilities at the user/architecture level -(not individual commits). - -## Feature Status Legend - -| Status | Meaning | -|--------|---------| -| ✅ Done | Implemented and validated | -| 🔧 In Progress | Partially complete or needs finishing | -| 📋 Planned | Designed but not yet started | - ---- - -## Features - -### 1. Agent V2 Implementation (MAF 1.0 Stable) - -**Status:** ✅ Done - -Replaced `AzureAIAgentClient` / server-side agent pattern with MAF 1.0 stable: -- Get-or-create portal agents (`project_client.agents.get_agent`) -- `FoundryChatClient` for runtime (in-process state ownership) -- Single code path — `FoundryAgent` server-side pattern eliminated -- Portal edits (model, instructions) persist across restarts -- Flattened `v4/` directory structure - -### 2. Foundry IQ Knowledge Base Integration - -**Status:** ✅ Done - -Migrated from `AzureAISearchTool` (server-side, serialization issues) to -`AzureAISearchContextProvider` (client-side, `mode="agentic"`): -- Per-agent knowledge bases (`macae-{domain}-kb` naming) -- Portal MCPTool sync — stale-KB detection and auto-update -- Retail, Contract Compliance, and RFP teams fully migrated -- Content Generation team defined (pending index creation in env) -- `seed_knowledge_bases.py` provisions KBs from index definitions - -### 3. Toolboxes for MCP Assets - -**Status:** ✅ Done - -Per-agent Toolboxes created on first load (get-or-create pattern): -- Non-destructive — portal edits preserved across restarts -- MCP tools, Code Interpreter, and KB references stored as first-class Toolbox members -- `project_connection_id` for auth resolved server-side by Responses API - -### 4. MCP Tool Filtering - -**Status:** 📋 Planned - -Filter MCP tools exposed to each agent based on team JSON configuration: -- Agents should only see tools relevant to their domain -- Reduces token overhead and prevents cross-domain tool hallucination -- Filtering criteria TBD (allowlist per agent, category tags, or regex patterns) - -### 5. Prompt–Agent Sync - -**Status:** ✅ Done - -Agent system prompts defined in team JSON are synced to portal definitions: -- On agent load, compares local prompt vs portal `instructions` -- Updates portal if local definition has changed -- Portal remains editable for quick iteration (next restart re-syncs from JSON) - -### 6. Magentic Orchestration (New) - -**Status:** ✅ Done - -Replaced custom orchestration with `MagenticBuilder` from agent-framework: -- `StatelessMagenticManager` — `session=None` prevents history confusion -- Progress ledger prompt with premature satisfaction guard -- Blocked-agent detection routes to ProxyAgent for human input -- Intermediate streaming outputs surfaced per-agent - -### 7. Built-in Plan Approval - -**Status:** ✅ Done - -Native plan review via `MagenticBuilder(enable_plan_review=True)`: -- `MagenticPlanReviewRequest` events emitted to frontend via WebSocket -- Human approve/reject/edit flow with `wait_for_plan_approval()` gate -- Plan converted to structured `MPlan` for frontend display - -### 8. Clarification Implementation (New) - -**Status:** ✅ Done - -ProxyAgent-based human-in-the-loop clarification: -- Agents report missing info → orchestrator routes to ProxyAgent -- ProxyAgent sends `UserClarificationRequest` via WebSocket -- Human responds → answer injected back into workflow -- Three-layer routing fix: StatelessMagenticManager + prompt guards + agent instructions - -### 9. GitHub Copilot Customization Agent - -**Status:** 📋 Planned - -Custom `.agent.md` / instructions for using MACAE with GitHub Copilot: -- Agent definitions for common workflows (team creation, debugging, deployment) -- Skill files for domain-specific knowledge -- Integration with VS Code Copilot Chat for assisted development - ---- - -## Deployment Lifecycle (Reference) - -| Phase | What gets created | -|-------|-------------------| -| 1. Bicep deploy (`azd up`) | AI Search service, Storage, Cosmos, Foundry project, MCP server, index names defined | -| 2. Post-deploy script | Data uploaded, indexes created + populated, **KBs created** (pending integration), teams seeded to Cosmos | -| 3. Agent creation (runtime) | KBs linked as context providers, toolboxes created in Foundry | diff --git a/infra/scripts/post-provision/upload_team_config.py b/infra/scripts/post-provision/upload_team_config.py index 92129bb87..9d4b85952 100644 --- a/infra/scripts/post-provision/upload_team_config.py +++ b/infra/scripts/post-provision/upload_team_config.py @@ -2,7 +2,6 @@ import os import time import requests -import json HTTP_TIMEOUT = 120 # seconds per request MAX_RETRIES = 5 diff --git a/src/tests/backend/common/utils/test_team_utils.py b/src/tests/backend/common/utils/test_team_utils.py index 4a0eecb8a..c03785508 100644 --- a/src/tests/backend/common/utils/test_team_utils.py +++ b/src/tests/backend/common/utils/test_team_utils.py @@ -1,10 +1,8 @@ """Unit tests for team_utils module.""" -import logging import os import sys -import uuid -from unittest.mock import AsyncMock, MagicMock, Mock, patch +from unittest.mock import AsyncMock, Mock, patch import pytest