Feb 22, 2026

TiempoLens AI by team Tiempo Legends

datascience datadict hackfest2 tiempolegends profiling natural language to sql ds star langgraph agentic ai
# ๐Ÿ” TiempoLens AI

**Intelligent Data Dictionary Agent**

Automatically generate comprehensive, AI-enhanced data dictionaries from enterprise databases.
---

## ๐ŸŽฏ Problem Statement

Enterprise organizations struggle with **tribal knowledge**, **stale documentation**, and **disconnected metadata** across their data estates. Data engineers waste hours manually documenting schemas, analysts can't find what data means, and data quality issues go undetected until they cause downstream failures.

**TiempoLens AI** solves this by connecting to your databases and automatically generating rich, AI-enhanced data dictionaries with quality profiling, lineage visualization, and an interactive chat interface for querying metadata in natural language.

---

## โœจ Key Features

Feature

Description

๐Ÿ”Œ **Multi-Database Connectivity**

PostgreSQL, MySQL, SQL Server, Snowflake, MongoDB

๐Ÿ“Š **Auto Schema Extraction**

Tables, columns, indexes, constraints, relationships

๐Ÿค– **DS-STAR AI Agents**

Planner โ†’ Coder โ†’ Verifier โ†’ Router pipeline for intelligent analysis

๐Ÿ“ˆ **Data Quality Profiling**

Completeness, freshness, uniqueness, validity scoring with alerts

๐Ÿ”ฎ **Time Series Forecasting**

Prophet-powered trend analysis on quality metrics

๐Ÿ’ฌ **Interactive AI Chat**

Natural language queries with streaming responses & voice I/O

๐Ÿ”— **Data Lineage**

Visual table & column-level lineage graphs

๐Ÿ“„ **Doc Generation**

Markdown & JSON data dictionary export

๐Ÿง  **RAG Pipeline**

pgvector-powered semantic search over schema metadata

๐ŸŽจ **Professional UI**

Dark/light themes, responsive layout, real-time updates

---
 

## ๐Ÿ—๏ธ Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚   Next.js    โ”‚     โ”‚              FastAPI Backend                 โ”‚โ”‚   Frontend   โ”‚โ”€โ”€โ”€โ”€>โ”‚                                              โ”‚โ”‚  (React 18)  โ”‚     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚  โ”‚  REST   โ”‚  โ”‚ WebSocketโ”‚  โ”‚  Celery   โ”‚    โ”‚       โ”‚             โ”‚  โ”‚  API    โ”‚  โ”‚ Streamingโ”‚  โ”‚  Workers  โ”‚    โ”‚       โ”‚             โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚       โ”‚             โ”‚       โ”‚             โ”‚             โ”‚          โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”        โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”    โ”‚  โ”‚  Nginx  โ”‚        โ”‚  โ”‚           Service Layer              โ”‚    โ”‚  โ”‚ Reverse โ”‚        โ”‚  โ”‚  Connection โ”‚ Schema โ”‚ Quality โ”‚ RAG โ”‚    โ”‚  โ”‚  Proxy  โ”‚        โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚                   โ”‚                          โ”‚                     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚                     โ”‚  โ”‚         DS-STAR Agent Layer         โ”‚     โ”‚                     โ”‚  โ”‚  Planner โ†’ Coder โ†’ Verifier โ†’ Routerโ”‚     โ”‚                     โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                         โ”‚                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”‚      PostgreSQL   โ”‚     Redis            โ”‚                     โ”‚   + pgvector      โ”‚   Cache / PubSub     โ”‚                     โ”‚   (Metadata DB)   โ”‚   (Celery Broker)    โ”‚                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

### DS-STAR Agent Pattern

Based on the research paper *"Data Science with LLM and Agents"*, our multi-agent system follows the DS-STAR architecture:

1.  **Router** โ€” Classifies incoming queries and routes to the right agent
2.  **Planner** โ€” Decomposes complex questions into executable steps
3.  **Coder** โ€” Generates SQL, Python code, or analytical answers
4.  **Verifier** โ€” Validates outputs for correctness and completeness
5.  **Analyzer** โ€” Specialized metadata analysis with business-friendly explanations

---

## ๐Ÿ› ๏ธ Tech Stack

### Backend

-   **Python 3.12** + **FastAPI** (async, HATEOAS REST)
-   **SQLAlchemy 2.0** (async ORM with AsyncAdaptedQueuePool)
-   **LangChain / LangGraph** (agent orchestration)
-   **pgvector** (vector similarity search for RAG)
-   **Celery** + **Redis** (background task processing)
-   **Prophet** (time series forecasting)

### Frontend

-   **Next.js 14** + **React 18** + **TypeScript** (strict mode)
-   **Shadcn UI** + **Tailwind CSS** (component library)
-   **Zustand** (state management)
-   **ECharts** / **React Flow** (visualizations)
-   **Web Speech API** (voice input/output)

### Infrastructure

-   **Docker Compose** (7 services)
-   **Nginx** (reverse proxy, rate limiting, WebSocket)
-   **PostgreSQL 16** + pgvector (metadata & vector store)
-   **Redis 7** (cache, pub/sub, Celery broker)

---

-   **Frontend**: [http://localhost:3000](http://localhost:3000)
-   **Backend API**: [http://localhost:8000](http://localhost:8000)
-   **API Docs**: [http://localhost:8000/api/docs](http://localhost:8000/api/docs)

---

## ๐Ÿ“ Project Structure

```
โ”œโ”€โ”€ backend/โ”‚   โ”œโ”€โ”€ app/โ”‚   โ”‚   โ”œโ”€โ”€ agents/           # DS-STAR agent layerโ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ graph.py      # LangGraph state machineโ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ planner.py    # Query decompositionโ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ coder.py      # Code/SQL generationโ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ verifier.py   # Output validationโ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ router_agent.py # State routingโ”‚   โ”‚   โ”‚   โ””โ”€โ”€ analyzer.py   # Metadata analysisโ”‚   โ”‚   โ”œโ”€โ”€ api/v1/           # REST API routesโ”‚   โ”‚   โ”œโ”€โ”€ core/             # Cache, security, middlewareโ”‚   โ”‚   โ”œโ”€โ”€ models/           # SQLAlchemy ORM modelsโ”‚   โ”‚   โ”œโ”€โ”€ schemas/          # Pydantic request/response DTOsโ”‚   โ”‚   โ”œโ”€โ”€ services/         # Business logic layerโ”‚   โ”‚   โ”œโ”€โ”€ workers/          # Celery tasksโ”‚   โ”‚   โ”œโ”€โ”€ config.py         # App configurationโ”‚   โ”‚   โ”œโ”€โ”€ database.py       # Async DB engineโ”‚   โ”‚   โ””โ”€โ”€ main.py           # FastAPI app entry pointโ”‚   โ”œโ”€โ”€ Dockerfileโ”‚   โ””โ”€โ”€ requirements.txtโ”œโ”€โ”€ frontend/โ”‚   โ”œโ”€โ”€ src/โ”‚   โ”‚   โ”œโ”€โ”€ app/              # Next.js app routerโ”‚   โ”‚   โ”œโ”€โ”€ components/โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ layout/       # Sidebar, headerโ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ui/           # Shadcn primitivesโ”‚   โ”‚   โ”‚   โ””โ”€โ”€ views/        # Dashboard, explorer, quality, chat, lineage, settingsโ”‚   โ”‚   โ””โ”€โ”€ lib/              # Store, API client, utilsโ”‚   โ”œโ”€โ”€ Dockerfileโ”‚   โ””โ”€โ”€ package.jsonโ”œโ”€โ”€ nginx/โ”‚   โ””โ”€โ”€ nginx.confโ”œโ”€โ”€ scripts/โ”‚   โ””โ”€โ”€ init-db.sql           # Database schema initializationโ”œโ”€โ”€ docker-compose.ymlโ”œโ”€โ”€ .env.exampleโ””โ”€โ”€ README.md
```

---

## ๐Ÿ“ก API Endpoints

### Connections

Method

Endpoint

Description

GET

`/api/v1/connections`

List all connections

POST

`/api/v1/connections`

Create connection

POST

`/api/v1/connections/test`

Test connection

POST

`/api/v1/connections/{id}/sync`

Sync schema

### Schema

Method

Endpoint

Description

GET

`/api/v1/schemas/{conn_id}/overview`

Schema overview

GET

`/api/v1/schemas/{conn_id}/tables/{table}`

Table detail

GET

`/api/v1/schemas/{conn_id}/relationships`

All relationships

### Data Quality

Method

Endpoint

Description

GET

`/api/v1/quality/{conn_id}/overview`

Quality dashboard

POST

`/api/v1/quality/{conn_id}/profile/{table}`

Profile table

GET

`/api/v1/quality/{conn_id}/alerts`

Quality alerts

POST

`/api/v1/quality/{conn_id}/timeseries`

Time series analysis

### Chat

Method

Endpoint

Description

POST

`/api/v1/chat/sessions`

Create chat session

POST

`/api/v1/chat/sessions/{id}/messages`

Send message

WS

`/api/v1/chat/ws/{session_id}`

Streaming WebSocket

### Export

Method

Endpoint

Description

POST

`/api/v1/export/{conn_id}/dictionary`

Generate data dictionary

POST

`/api/v1/export/{conn_id}/ai-docs`

Generate AI documentation

### Lineage

Method

Endpoint

Description

GET

`/api/v1/lineage/{conn_id}/graph`

Full lineage graph

GET

`/api/v1/lineage/{conn_id}/table/{table}`

Table lineage

---

## ๐Ÿ—„๏ธ Database Schema

Four PostgreSQL schemas organize all metadata:

-   **`metadata`** โ€” connections, schemas, tables, columns, relationships, indexes, constraints
-   **`quality`** โ€” table_profiles, column_profiles, alerts, trend_metrics
-   **`ai`** โ€” embeddings (pgvector), documentation_artifacts, chat_sessions, chat_messages
-   **`audit`** โ€” schema_versions, activity_log

---

## ๐Ÿงช Recommended Test Datasets

Dataset

Source

Tables

Description

**Olist Brazilian E-Commerce**

Kaggle

9

Orders, customers, products, reviews

**Bike Store**

SQLServerTutorial

9

Sales, inventory, staff

**Chinook**

GitHub

11

Digital media store

---

## ๐Ÿ‘ฅ Team Tiempo Legends

Built for **HackFest 2.0** (February 21-22, 2026)

---

This build was uploaded as a hackathon project

Hackathon

HackFest 2.0

View All Projects
Give a star to encourage!Discussion
Start a new conversation!
Login to join the discussion
Updates
  • undefined
    Sunday, Feb 22nd, 2026