""" Demo script to showcase the AI Project Assistant capabilities. """ import os from pathlib import Path from dotenv import load_dotenv from src.rag import ProjectRAG from src.agent import ProjectAgent # Load environment variables load_dotenv() def main(): """Run the demo.""" print("=" * 60) print("AI Project Assistant - Demo") print("=" * 60) # Check for API key if not os.getenv("GOOGLE_API_KEY"): print("\nāš ļø ERROR: GOOGLE_API_KEY not found!") print("Please create a .env file with your Google API key:") print(" GOOGLE_API_KEY=your_key_here") print("\nGet your API key from: https://aistudio.google.com/apikey") return # Initialize RAG system print("\nšŸ“ Initializing RAG system...") data_dir = Path("./data") rag = ProjectRAG(data_dir) rag.load_and_index() if not rag.meetings: print("\nāš ļø No meetings found!") print("Please add meeting notes to the data directory.") return print(f"āœ… Loaded {len(rag.meetings)} meetings") print(f"āœ… Projects: {', '.join(rag.get_all_projects())}") # Initialize agent print("\nšŸ¤– Initializing AI Agent...") agent = ProjectAgent(rag) print("āœ… Agent ready!") # Demo queries demo_queries = [ "What are all the open action items?", "What blockers do we have across all projects?", "What is the status of the AI model training project?", "What should the team focus on next for the mobile app redesign?", ] print("\n" + "=" * 60) print("Running Demo Queries") print("=" * 60) for i, query in enumerate(demo_queries, 1): print(f"\nšŸ“ Query {i}: {query}") print("-" * 60) answer = agent.query(query) print(answer) print() # Interactive mode print("\n" + "=" * 60) print("Interactive Mode - Ask your own questions!") print("(Type 'quit' or 'exit' to end)") print("=" * 60) while True: try: user_query = input("\nšŸ’¬ Your question: ").strip() if user_query.lower() in ['quit', 'exit', 'q']: print("\nšŸ‘‹ Thanks for using AI Project Assistant!") break if not user_query: continue print("\nšŸ¤– Assistant:", end=" ") answer = agent.query(user_query) print(answer) except KeyboardInterrupt: print("\n\nšŸ‘‹ Thanks for using AI Project Assistant!") break except Exception as e: print(f"\nāŒ Error: {e}") if __name__ == "__main__": main()