Skip to content

Fixed broken dependencies and added option to use uv instead of pip and venv - #271

Merged
Nicole Serafino (nicoleserafino) merged 12 commits into
microsoft:mainfrom
tjsullivan1:tjs
Sep 26, 2025
Merged

Fixed broken dependencies and added option to use uv instead of pip and venv#271
Nicole Serafino (nicoleserafino) merged 12 commits into
microsoft:mainfrom
tjsullivan1:tjs

Conversation

@tjsullivan1

Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements to the development environment and setup process for the AI Agentic Workshop project. The main changes include adding devcontainer support for a consistent development experience, introducing Python 3.12 as the required version across both the application and MCP service, providing a comprehensive setup guide for using UV as the Python manager, and defining project dependencies for both the application and MCP service using pyproject.toml. Additionally, a new script is added to streamline launching all services with UV. These updates make onboarding and running the project easier and more reliable.

Development Environment Setup

  • Added .devcontainer/devcontainer.json to enable containerized development with Python 3.12, Azure CLI, and UV, including VS Code customization and port forwarding.
  • Specified Python version 3.12 in .python-version for both agentic_ai/applications and mcp directories to ensure consistency.

Project Dependency Management

  • Created pyproject.toml files for both agentic_ai/applications and mcp to define project metadata and dependencies, ensuring reproducible environments. [1] [2]

Setup Documentation and Scripts

  • Added SETUP_UV.md, a detailed guide for cloning, configuring, and running the project using UV, including environment variable setup, backend/frontend instructions, and best practices.
  • Added run_applications_uv.sh to automate starting the MCP server, backend, and frontend with logging, simplifying multi-service startup.

Configuration Updates

  • Updated .env.sample to clarify local MCP server URI usage (/mcp instead of /sse) for improved developer clarity.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the development setup by introducing UV as an alternative Python package manager and improving developer experience. It standardizes Python 3.12 usage, introduces containerized development support, and provides comprehensive documentation for the new setup workflow.

  • Added UV support with pyproject.toml configurations for dependency management
  • Introduced devcontainer setup for consistent development environments
  • Created comprehensive UV-based setup documentation and automation scripts

Reviewed Changes

Copilot reviewed 8 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
mcp/pyproject.toml Defines MCP service dependencies and Python 3.12 requirement
mcp/.python-version Sets Python 3.12 for MCP service
agentic_ai/applications/pyproject.toml Defines application dependencies and Python 3.12 requirement
agentic_ai/applications/.python-version Sets Python 3.12 for applications
agentic_ai/applications/run_applications_uv.sh Automation script to launch all services with UV
agentic_ai/applications/.env.sample Updated MCP server URI comment for local development
SETUP_UV.md Comprehensive setup guide for UV-based workflow
.devcontainer/devcontainer.json Devcontainer configuration with Python 3.12, Azure CLI, and UV

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread mcp/pyproject.toml
Comment on lines +8 to +9
"autogen-agentchat==0.7.4",
"autogen-ext[mcp]==0.7.4",

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The autogen versions in the MCP service (0.7.4) differ from those in the applications service (0.7.1). This version mismatch could lead to compatibility issues. Consider aligning these versions to ensure consistent behavior across services.

Suggested change
"autogen-agentchat==0.7.4",
"autogen-ext[mcp]==0.7.4",
"autogen-agentchat==0.7.1",
"autogen-ext[mcp]==0.7.1",

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
"fastapi==0.115.12",
"fastmcp==2.7.1",

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FastAPI and fastmcp versions in the applications service differ from those in the MCP service (FastAPI 0.116.1, fastmcp 2.12.0). These version mismatches could cause integration issues between the services. Consider standardizing these dependency versions across both services.

Suggested change
"fastapi==0.115.12",
"fastmcp==2.7.1",
"fastapi==0.116.1",
"fastmcp==2.12.0",

Copilot uses AI. Check for mistakes.
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install -r requirements.txt"

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The postCreateCommand references a requirements.txt file, but this PR introduces pyproject.toml for dependency management with UV. This command should be updated to use UV for dependency installation, such as 'uv sync' or removed if not needed.

Suggested change
"postCreateCommand": "pip3 install -r requirements.txt"
"postCreateCommand": "uv sync"

Copilot uses AI. Check for mistakes.
Comment thread SETUP_UV.md

### 5. Run MCP Server

Navigate to ```agentic_ai/backend_services``` folder, and in terminal window with virtual environment activated, run MCP server

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation references 'agentic_ai/backend_services' folder, but based on the file structure shown in this PR, the MCP service is located in the 'mcp' folder at the project root. This path should be corrected to 'mcp' folder.

Suggested change
Navigate to ```agentic_ai/backend_services``` folder, and in terminal window with virtual environment activated, run MCP server
Navigate to the ```mcp``` folder at the project root, and in a terminal window with virtual environment activated, run the MCP server

Copilot uses AI. Check for mistakes.
Comment thread SETUP_UV.md
### Option 1: Run Both Backend and Frontend Together

```bash
bash run_application.sh

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation references 'run_application.sh' but the actual script created in this PR is named 'run_applications_uv.sh'. The documentation should be updated to reference the correct script name.

Suggested change
bash run_application.sh
bash run_applications_uv.sh

Copilot uses AI. Check for mistakes.
@nicoleserafino
Nicole Serafino (nicoleserafino) merged commit 7b8eecc into microsoft:main Sep 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants