 Command

Pranesh Nikhar's personal site. Vim-style keybinds for navigation; theme + font pickers below.

Theme
 Font Body Code
Reader
Keybinds
Navigation
j / ↓ Next item k / ↑ Previous item g First item in region G Last item in region zz Center focused item h / l Move left/right region ] / [ Next/previous heading } / { Next/previous block d / u Half-page down/up
Layout
<zh> / <zl> Toggle left/right sidebar <zr> Toggle reader view <zj> / <zk> Focus main/navbar <S-h/j/k/l> Focus left/main/navbar/right ⌃H / ⌃L Focus left/right sidebar ⌃J / ⌃K Focus main/navbar ⇧C / ⇧E Collapse / expand all sections
Dialogs
⌃P / : Command palette ⌃X Theme picker / Search ? Show keybinds Esc / ⌃C Close dialog
History
n Next document b Previous document ⌃O History back ⌃I History forward
 Search
about: Pranesh Nikhar about/more: πŸͺͺ More docs/test: Docs Test ideas: πŸ’‘ Ideas more: βž• More now: Now posts: πŸ“¬ Posts projects: πŸ“š Projects webtui: Style posts/agentic-eda: πŸ“Š AgenticEDA β€” Automated Exploratory Data Analysis with LangGraph posts/cap-theorem-outage-story: 🌐 CAP Theorem with a Real Outage Story posts/codepilot: ✈️ CodePilot β€” From Requirements to Deployable FastAPI Backend posts/common-auth-mistakes: πŸ” Common Auth Mistakes Developers Make posts/compiled-vs-jit-vs-interpreted: ⚑ Why Is X Language Fast or Slow? β€” Compiled vs JIT vs Interpreted posts/cs-degree-gaps: πŸŽ“ Things CS Degrees Don't Teach You posts/cve-2025-breach-analysis: πŸ›‘οΈ CVE-2025 Breach Analysis β€” Midnight Blizzard and the 16 Billion Credential Leak posts/fixloop: πŸ”„ FixLoop β€” AI Agent Loop for Self-Correcting Code posts/functional-vs-oop: ⚑ Functional vs OOP β€” Same Problem, Both Ways posts/getman: 🦾 Getman β€” Declarative API Tester for CLI & TUI posts/how-compilers-optimize: βš™οΈ How Compilers Actually Optimize Your Code posts/http3-quic: ⚑ HTTP/3 and QUIC β€” Why They Matter posts/leetcode-vs-engineering: 🧩 LeetCode vs Real Engineering Skills posts/llm-from-scratch: 🧠 LLM from Scratch β€” GPT-Style Transformer in PyTorch posts/lsm-trees-bloom-filters: 🌳 LSM Trees & Bloom Filters β€” Production Deep Dive posts/mcp-workflow-builder: πŸ”§ MCP Workflow Builder β€” Visual DAG for MCP Tools posts/persistent-memory: 🧠 Persistent Memory β€” Long-Term Memory for AI Agents via MCP posts/playcli: 🎬 PlayCLI β€” Terminal Video Player posts/postgres-mvcc: πŸ—„οΈ How PostgreSQL MVCC Works β€” Multi-Version Concurrency Control Deep Dive posts/raft-consensus: β›΅ Raft Consensus Algorithm Explained posts/rust-borrow-checker: πŸ¦€ Rust Borrow Checker β€” Catches Real Bugs posts/titan: πŸ€– Titan β€” Terminal AI Coding Agent posts/what-happens-url: 🌐 What Happens Between Typing a URL and Seeing the Page posts/what-happens-when-you-run-a-program: βš™οΈ What Actually Happens When You Run a Program posts/zero-knowledge-proofs: πŸ” Zero-Knowledge Proofs Explained Simply webtui/components/accordion: Accordion webtui/components/badge: Badge webtui/components/button: Button webtui/components/checkbox: Checkbox webtui/components/dialog: Dialog webtui/components/input: Input webtui/components/popover: Popover webtui/components/pre: Pre webtui/components/progress: Progress webtui/components/radio: Radio webtui/components/range: Range webtui/components/separator: Separator webtui/components/spinner: Spinner webtui/components/switch: Switch webtui/components/table: Table webtui/components/textarea: Textarea webtui/components/tooltip: Popover webtui/components/typography: Typography webtui/components/view: View webtui/contributing/contributing: Contributing webtui/contributing/contributing: ## Local Development webtui/contributing/contributing: ## Issues webtui/contributing/contributing: ## Pull Requests webtui/contributing/style-guide: Style Guide webtui/contributing/style-guide: ## CSS Units webtui/contributing/style-guide: ## Selectors webtui/contributing/style-guide: ## Documentation webtui/installation/astro: Astro webtui/installation/astro: ## Scoping webtui/installation/astro: ### Frontmatter Imports webtui/installation/astro: ### β€Ήstyleβ€Ί tag webtui/installation/astro: ### Full Library Import webtui/installation/nextjs: Next.js webtui/installation/vite: Vite webtui/plugins/plugin-dev: Developing Plugins webtui/plugins/plugin-dev: ### Style Layers webtui/plugins/plugin-nf: Nerd Font Plugin webtui/plugins/theme-catppuccin: Catppuccin Theme webtui/plugins/theme-custom: Custom Theme webtui/plugins/theme-everforest: Everforest Theme webtui/plugins/theme-gruvbox: Gruvbox Theme webtui/plugins/theme-nord: Nord Theme webtui/plugins/theme-vitesse: Vitesse Theme webtui/start/ascii-boxes: ASCII Boxes webtui/start/changelog: Changelog webtui/start/installation: Installation webtui/start/installation: ## Installation webtui/start/installation: ## Using CSS webtui/start/installation: ## Using ESM webtui/start/installation: ## Using a CDN webtui/start/installation: ## Full Library Import webtui/start/installation: ### CSS webtui/start/installation: ### ESM webtui/start/installation: ### CDN webtui/start/intro: Introduction webtui/start/intro: ## Features webtui/start/plugins: Plugins webtui/start/plugins: ## Official Plugins webtui/start/plugins: ### Themes webtui/start/plugins: ## Community Plugins webtui/start/theming: Theming webtui/start/theming: ## CSS Variables webtui/start/theming: ### Font Styles webtui/start/theming: ### Colors webtui/start/theming: ### Light & Dark webtui/start/theming: ## Theme Plugins webtui/start/theming: ### Using Multiple Theme Accents webtui/start/tuis-vs-guis: TUIs vs GUIs webtui/start/tuis-vs-guis: ## Monospace Fonts webtui/start/tuis-vs-guis: ## Character Cells
 Theme Current: Light j/k or ↑/↓ + Enter

πŸ“Š AgenticEDA β€” Automated Exploratory Data Analysis with LangGraph

An automated EDA service powered by a LangGraph agent with local LLM (Ollama). Upload datasets, connect SQL databases, and get comprehensive analysis reports with visualizations.

🎯 What It Does

AgenticEDA is an automated exploratory data analysis service powered by a LangGraph agent with a local LLM (Ollama). Upload a CSV, TSV, Excel, or Parquet dataset (or connect a SQL database), and the agent runs a comprehensive EDA β€” statistics, correlations, outlier detection, visualizations β€” and generates a detailed markdown report.

POST /v1/analyze
{
  "dataset_id": "ds_abc123",
  "description": "Customer churn dataset"
}

β†’ Runs 10 EDA tools via LangGraph agent
β†’ Generates markdown report with plot artifacts
β†’ Returns { run_id, report_path, status }

🧱 Tech Stack

ComponentTechnology
APIFastAPI (uvicorn)
AgentLangGraph (StateGraph)
LLMOllama (default: llama3.1, local only)
DataPandas, matplotlib, seaborn
StorageSQLAlchemy (read-only SQL connections)
FormatsCSV, TSV, Excel (openpyxl), Parquet (pyarrow)

All LLM calls go to a local Ollama instance β€” no external API calls, no data leaves your machine.


πŸ—οΈ Architecture

src/agenticeda/
β”œβ”€β”€ main.py                   # FastAPI app factory
β”œβ”€β”€ api/routes.py             # REST endpoints
β”œβ”€β”€ agent/
β”‚   β”œβ”€β”€ graph.py              # LangGraph StateGraph with 6 nodes
β”‚   └── prompts.py            # SYSTEM_PROMPT, PLAN_PROMPT, SYNTHESIZE_PROMPT
β”œβ”€β”€ tools/eda_tools.py        # 10 StructuredTools for EDA operations
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ loaders.py            # CSV/TSV/Excel/Parquet/SQL loading
β”‚   └── session.py            # In-memory dataset-run session store
β”œβ”€β”€ models/schemas.py         # Pydantic request/response models
β”œβ”€β”€ report/builder.py         # Markdown report generation
└── config.py                 # pydantic-settings config

πŸ€– LangGraph Agent Flow

load_context β†’ plan_eda β†’ agent β†’ tools β†’ collect_results β†’ synthesize β†’ END
                                  ↓ (conditional)
                              FINISH? β†’ YES β†’ END
                              NO β†’ tools (up to 12 steps)

The agent graph has 6 nodes:

  1. load_context: Loads dataset metadata (shape, columns, dtypes) into the agent context
  2. plan_eda: LLM generates an EDA plan based on the dataset description and available tools
  3. agent: LLM decides which tool to call next, or sends FINISH signal
  4. tools: Executes the chosen EDA tool, returns results
  5. collect_results: Aggregates tool outputs into the run context
  6. synthesize: LLM generates the final markdown report from all collected results

The agent uses a 12-step maximum guard to prevent runaway tool calls.


πŸ› οΈ EDA Tools

ToolDescription
get_dataset_overviewShape, columns, dtypes, memory usage
get_missing_valuesNull counts and percentages per column
get_numeric_summaryMean, median, std, min, max, quartiles
get_categorical_summaryValue counts, unique counts, mode
get_correlationsPearson/Spearman correlation matrix
detect_outliersIQR-based outlier detection per column
plot_distributionHistogram with KDE for numeric columns
plot_correlation_heatmapSeaborn heatmap of correlations
plot_scatterScatter plot for specified column pair
run_custom_queryCustom pandas query (read-only, sandboxed)

πŸ”’ Safety and Isolation

  • Read-only SQL connections (no write operations)
  • Sandboxed custom queries: forbidden patterns include @, import, exec, eval, __ (double underscore)
  • matplotlib non-interactive backend (Agg) for server-side rendering
  • Output isolation: each run gets its own directory with plot PNGs
  • Session isolation: separate dataset_id strings for multi-dataset support

🌐 API Endpoints

EndpointMethodDescription
/healthGETHealth check
/v1/uploadPOSTUpload dataset file (multipart)
/v1/connect/sqlPOSTConnect to SQL database (read-only)
/v1/analyzePOSTStart EDA analysis run
/v1/reports/{run_id}GETGet report by run ID

πŸš€ Quick Start

# Install
pip install agentic-eda

# Start Ollama (must have llama3.1 or another model)
ollama pull llama3.1

# Start the service
agentic-eda serve
# β†’ API at http://localhost:8000

# Upload and analyze
curl -X POST -F "file=@data.csv" http://localhost:8000/v1/upload
# β†’ { dataset_id: "ds_abc123" }

curl -X POST -H "Content-Type: application/json" \
  -d '{"dataset_id": "ds_abc123", "description": "Sales data Q1 2026"}' \
  http://localhost:8000/v1/analyze
# β†’ { run_id: "run_def456", status: "running" }

# Get report
curl http://localhost:8000/v1/reports/run_def456
# β†’ Markdown report with embedded plots

πŸ’‘ Why It’s Interesting

AgenticEDA combines three things that rarely appear together: local-only LLM (no data exfiltration), LangGraph agent orchestration, and production-grade FastAPI service design. The LangGraph agent doesn’t just run tools blindly β€” it plans the analysis, executes tools in a meaningful order, and synthesizes everything into a coherent report. The tool implementations are thorough (IQR outlier detection, multiple plot types, correlation analysis), and the session-based architecture supports multiple concurrent datasets and runs. It’s a genuinely useful tool for data scientists who want automated EDA without sending their data to any cloud service.

 praneshnikhar.site / posts / agentic-eda Β· Top 1:1