How mftnakrsu/travel_ai_agent_autogen works
Project Type & Purpose
• Full-stack Python application with a Streamlit-based UI (frontend) and a modular multi-agent orchestration layer (backend).
Key File-Structure Clues
• main3.py / main4.py: Streamlit entrypoints + Autogen orchestration
• agents/: Individual agent modules (User_Proxy, Destination_Expert, Itinerary_Creator, Budget_Analyst, Report_Writer)
• chat/: GroupChat orchestration (group.py, manager.py)
• tools/: External-tool integration (tavily_search.py)
• config/: LLM configuration (llm_config.py)
• Dockerfile / .env: containerization + API-key management
Main Components
A. Frontend UI
• Streamlit app (main3.py)
• User input forms & result views (pie chart, download link)
B. Orchestrator Layer
• chat/Manager and chat/Group: builds and manages the multi-agent conversation
1. User_Proxy_Agent
2. Destination_Expert
3. Itinerary_Creator
4. Budget_Analyst
5. Report_Writer
D. Tools Module
• TavilySearch tool (tools/tavily_search.py)
• Matplotlib (for budget pie chart)
E. Configuration
• LLM settings (config/llm_config.py)
• Environment variables (.env)
F. External Services
• OpenAI API
• Tavily (or Bing/SerpAPI)
Relationships & Data Flow
1. User → Streamlit UI
2. UI invokes Orchestrator (chat.Manager)
3. Manager instantiates GroupChat, sequences:
User_Proxy → Destination_Expert → Itinerary_Creator → Budget_Analyst → Report_Writer
4. Each agent may call:
• LLM via config
• TavilySearch tool
5. Budget_Analyst generates pie chart (Matplotlib)
6. Report_Writer compiles .txt report
7. Final result → UI for display/download
Architectural Patterns & Principles
• Modular “pipeline” pattern: sequence of single-responsibility agents
• Dependency-inversion: agents call abstracted LLM and tool interfaces from config/ tools modules
• Separation of concerns: UI vs orchestration vs business-logic agents vs external integrations
Essential Elements
• Component labels + source file paths