A comprehensive learning repository for exploring Microsoft's AutoGen framework for building multi-agent conversational AI systems.
This project contains hands-on examples and implementations of AutoGen's multi-agent capabilities, from basic single agents to complex multi-agent teams with human-in-the-loop interactions. The repository is organized into different learning modules to progressively build understanding of AutoGen's features.
AutoGen/
├── README.md
├── requirements.txt
├── first-autogen.ipynb # Initial notebook (placeholder)
│
├── Basic AutoGen/ # Fundamentals
│ ├── basic-autogen.ipynb # Your first AutoGen agent
│ └── models.ipynb # Model configuration examples
│
├── AgentChat Agent/ # Agent communication patterns
│ ├── agent.ipynb # Agent creation and setup
│ ├── messages.ipynb # Message handling
│ ├── running_&_observing.ipynb # Agent execution monitoring
│ ├── structured_output.ipynb # Structured response formatting
│ └── tools.ipynb # Tool integration
│
├── MulitAgent/ # Multi-agent systems
│ ├── multiagent.ipynb # Multi-agent team setup
│ ├── singleagent_team.ipynb # Single agent teams
│ ├── team_operations.ipynb # Team management operations
│ ├── managing_multiAgent_state.ipynb # State management
│ ├── observing_teams.ipynb # Team monitoring
│ ├── load_teamstate.ipynb # State persistence
│ ├── termination.ipynb # Termination conditions
│ └── team_state.json # Saved team state
│
├── Advanced Integrations/ # Advanced features
│ └── human_in_loop.ipynb # Human-in-the-loop workflows
│
├── Aysnc Functionality/ # Asynchronous operations
│ ├── async_function.ipynb # Async function examples
│ └── aysnchronous.py # Python async utilities
│
├── Analyzer GPT/ # Data analysis agent
│ ├── app.py, main.py # Main application and backend
│ ├── agents/, config/, models/, prompts/, teams/, temp/
│
├── DSA Solver Agent/ # Algorithmic problem-solving agent
│ ├── agent_backend.py, app.py, main.py
│ ├── agents/, config/, teams/, temp/, utils/
│
├── Travel Planner Agent/ # Automated travel planning agent
│ ├── main.py
│ ├── agents/, config/, models/, teams/, tests/, utils/
│
├── Autogen Projects/ # Project-level scripts and experiments
│ ├── AI-Interviewer.py # Example project: AI-driven interviewer
│
└── autogen-env/ # Virtual environment
├── Include/
├── Lib/
├── Scripts/
└── share/
An AI-powered digital data analysis agent. Users can upload datasets and request analyses in natural language. The agent executes code securely (using Docker), analyzes data, and streams results (text, charts, images) back to the user. Ideal for data scientists, analysts, and anyone needing automated insights from data.
Features:
- Upload CSVs and request custom analyses
- Secure code execution in isolated containers
- Multi-agent collaboration for analysis and code execution
- Real-time result streaming and visualization
An agent system for solving Data Structures and Algorithms (DSA) problems. Accepts coding problems, selects appropriate algorithms, generates solutions, and explains reasoning. Useful for students, educators, and interview preparation.
Features:
- Accepts and solves coding problems
- Generates code and step-by-step explanations
- Supports various DSA topics and problem types
- Can be extended for custom problem sets
An intelligent agent for automated travel planning. Accepts user preferences, searches for flights/hotels/activities, and generates optimized itineraries. Adapts plans based on feedback and can be extended for additional travel services.
Features:
- Accepts travel preferences and requirements
- Searches and books travel options
- Generates day-by-day itineraries
- Adapts to user feedback and changes
Contains project-level scripts and experiments, such as the AI-Interviewer agent. These serve as templates or inspiration for building new agent-based solutions.
Example:
- AI-Interviewer.py: Simulates interview scenarios, asks questions, evaluates answers, and provides feedback for job seekers or educators.
- Python 3.8 or higher
- Virtual environment (recommended)
- API key for your chosen model provider (Google/Gemini, OpenAI, Azure, etc.)
-
Clone/Download the repository
git clone <your-repo-url> cd AutoGen
-
Set up virtual environment (if not already created)
python -m venv autogen-env .\autogen-env\Scripts\activate # Windows # source autogen-env/bin/activate # Linux/Mac
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the root directory:GOOGLE_API_KEY=your_gemini_api_key_here OPENAI_API_KEY=your_openai_api_key_here # if using OpenAI AZURE_API_KEY=your_azure_api_key_here # if using Azure
Start with the basic examples and progress through the modules:
- Basic AutoGen - Learn fundamental concepts
- AgentChat Agent - Understand agent communication
- MulitAgent - Explore multi-agent systems
- Advanced Integrations - Human-in-the-loop workflows
- Async Functionality - Asynchronous operations
basic-autogen.ipynb: Create your first assistant agent using Geminimodels.ipynb: Configure different model clients
agent.ipynb: Agent creation and configurationmessages.ipynb: Message types and handlingstructured_output.ipynb: Formatting agent responsestools.ipynb: Integrating external tools
multiagent.ipynb: Creating teams of specialized agentsteam_operations.ipynb: Managing team interactionstermination.ipynb: Setting up termination conditionsmanaging_multiAgent_state.ipynb: State management across agents
human_in_loop.ipynb: Interactive workflows with user inputasync_function.ipynb: Asynchronous agent operations
- Single Agent Creation: Basic assistant agents with custom system messages
- Multi-Agent Teams: Collaborative agent systems with role specialization
- Human-in-the-Loop: Interactive workflows requiring user input
- State Management: Persistent team states across sessions
- Termination Conditions: Custom stopping criteria for conversations
- Async Operations: Non-blocking agent operations
- Model Integration: Support for multiple AI providers (Gemini, OpenAI, Azure)
The project uses the following main packages:
autogen-agentchat: Core AutoGen agent chat functionalityautogen-core: AutoGen core componentsautogen_ext[openai,azure,docker]: Extensions for OpenAI and Azure integrationgroq: Groq model integrationpython-dotenv: Environment variable management
Happy Learning with AutoGen! 🤖✨