### **Short Description**
A full-stack, AI-powered Retrieval-Augmented Generation (RAG) application that enables users to intelligently chat with their invoice data. Built with LangChain and Google's Gemini models, the application seamlessly bridges unstructured semantic searches across hundreds of PDF invoices stored in a Pinecone vector database with structured queries against a SQLite database. Presented through a sleek Next.js frontend, the conversational agent dynamically routes user questions to the right tools to deliver accurate, context-aware answers in real-time.

---

### **Key Features**
*   **Conversational AI Interface:** A responsive and intuitive chat UI built with Next.js, allowing users to interact with their financial data using natural language.
*   **Intelligent Autonomous Agent:** Powered by LangChain and Gemini models, the agent understands user intent and autonomously decides which data source or tool is needed to construct the best answer.
*   **Semantic PDF Search (`invoicePdfLookupTool`):** Integrates with Pinecone vector database to perform deep semantic searches across 200+ ingested invoice PDFs, easily retrieving unstructured text context.
*   **Structured Data Querying (`sqlQueryTool`):** Executes SQL queries directly against a local SQLite database, allowing the agent to handle complex data aggregation, exact matches, and structured record retrieval.
*   **Temporal Awareness (`currentTimestampTool`):** Provides the agent with real-time context, enabling it to accurately handle time-sensitive queries, date-based filtering, and relative time questions (e.g., "this month's invoices").
*   **Dynamic Tool Routing:** Intelligently synthesizes insights by routing questions to either unstructured documents or structured tables—and can even combine information from both sources for comprehensive responses.