How sourangshupal/trip-planner-using-crewai works
Main Components
• User Interaction Interfaces:
• CLI (cli_app.py) for command-line usage.
• FASTAPI Server (api_app.py) which exposes REST endpoints.
• Streamlit Interface (streamlit_app.py) for a user-friendly web experience.
• Core Logic & Orchestration:
• Trip Agents (trip_agents.py) which manage AI role-playing agents.
• Trip Tasks (trip_tasks.py) that hold task prompts or planning instructions.
• Tools and Utilities Layer:
• Tools directory (tools/) including browser_tools.py, calculator_tools.py, and search_tools.py that provide supporting functionalities required by the agents.
• External Integrations:
• LLM models integration (e.g., GEMINI, Ollama, Serper, OpenAI) shown in the README examples.
• External API integrations such as Browseless. These should be noted as connections to third-party services.
Relationships & Interactions
• User input flows: The user inputs trip details through either CLI, the Streamlit UI, or via REST API calls. Each entry point routes input to the CrewAI framework.
• Agent Orchestration: The input is processed by trip_agents.py together with task details from trip_tasks.py. The agents then invoke specific functionalities from the tools layer.
• Data Flow: After processing, the results (trip itineraries) are returned through the respective interface back to the user.
• Configuration: Include configuration files like .env.example and Streamlit’s config.toml that denote environmental dependencies and secret management.
Architectural Patterns & Design Principles
• Separation of Concerns: Different entry points (CLI, API, UI) are clearly separated in the system.
• Modular Design: The standalone modules (trip_agents, trip_tasks, and the tools submodules) indicate modular components that can be independently tested and maintained.
• Extensibility: The design emphasizes easy switching between LLM models or integration of additional tools, as demonstrated in the README snippet for integrating Ollama.
• Layered Architecture: Clearly delineate user interface layers, business logic/agent orchestration, and external service integrations.
Final Recommendations
• Gradually decompose each block to show internal components and their interactions.
Happy diagramming!