Free. Open. Powerful. Chat with your data using AI - entirely in your browser.
Live Demo โข Quick Start โข Features โข Examples
Live Demo: https://open-data-chat.vercel.app/
Want to try it immediately without any setup? Use our free API key:
- Visit the Live Demo
- Click the ๐ key icon in the top right corner
- Enter this free API key:
cr_940a0e6d7951390ea8399f7d2fe3cd5f3f5595414bda865ea91080c068b1befa - Click "Save" and start analyzing data!
Note: This is a shared demo key with rate limits. For production use, please get your own API key from console.anthropic.com.
Imagine having a data scientist at your fingertips, ready to analyze any dataset you throw at it - all running entirely in your browser. No Python installation. No cloud credits. No privacy concerns.
OpenDataChat is an open-source project that combines the power of AI agents with browser-based Python execution to create the ultimate data analysis companion:
- ๐ค AI-Powered Analysis: Natural language interface powered by Claude Sonnet 4.5
- ๐ Runs Anywhere: Pure browser-based Python execution with Pyodide
- ๐ Full Python Stack: NumPy, Pandas, Matplotlib - all in the browser
- ๐ฌ Chat Interface: Just ask questions in plain English
- ๐ Privacy First: Your data never leaves your browser
- ๐ฅ Smart File Handling: Drag & drop or download from URLs
- โจ Real-time Streaming: Watch analysis unfold as the agent thinks
- Natural Language Queries: "Show me the correlation between age and salary" - just ask!
- Automatic Code Generation: Agent writes and executes Python code for you
- Intelligent Tool Use: Automatically downloads files, runs analysis, creates visualizations
- Streaming Responses: See the agent's thought process in real-time
- Interactive Visualizations: Matplotlib charts rendered inline
- File Management: Upload CSV/Excel or provide URLs for automatic download
- Conversation Memory: Context-aware across multiple queries
- Powered by Mastra Agent Framework: Robust AI agent orchestration
- Pyodide Integration: Full Python 3.12 runtime in WebAssembly
- Modern React UI: Built with Next.js 15 and TypeScript
- Tailwind CSS: Beautiful, responsive design
- Zero Backend: Fully client-side (except AI API calls)
- Easy Deployment: Deploy to Vercel in seconds
- Node.js 18+
- An Anthropic API key (get one here)
# Clone the repository
git clone https://github.com/chenwenxiaolive/OpenDataChat.git
cd OpenDataChat
# Install dependencies
npm install
# Set up environment variables
# Create .env.local file and add your Anthropic API key:
echo "ANTHROPIC_AUTH_TOKEN=your_api_key_here" > .env.local
# Start the development server
npm run devVisit http://localhost:54891 and start analyzing!
Want to try it right away? Use these sample datasets:
https://raw.githubusercontent.com/peetck/IMDB-Top1000-Movies/master/IMDB-Movie-Data.csv
Try asking:
- "Download the IMDB dataset and show me the top 10 highest-rated movies"
- "What's the relationship between movie rating and revenue?"
- "Show me the distribution of movies by genre"
https://raw.githubusercontent.com/pouyasattari/HR-Dataset-Analysis/main/HRDataset_v14.csv
Try asking:
- "Download the HR dataset and analyze employee satisfaction by department"
- "What factors correlate with employee performance scores?"
- "Show me the distribution of salaries across different positions"
Simply paste the URL in your question and the agent will automatically download and analyze it!
You: "I have a CSV file with employee data. Can you show me the distribution of salaries by department?"
Agent: I'll analyze the salary distribution by department for you.
[Automatically loads data, generates Python code, creates visualization]
You: "Download https://example.com/sales-data.csv and show me the top 5 products"
Agent: I'll download the file and analyze the top products.
[Downloads file, processes data, shows results]
You: "Find correlations between employee satisfaction and performance scores, then create a heatmap"
Agent: Let me analyze the correlations and create a visualization.
[Runs statistical analysis, generates heatmap]
You: "Plot the monthly sales trend for the last year with a moving average"
Agent: I'll create a trend analysis with moving averages.
[Processes time series data, creates multi-line plot]
Download datasets directly from URLs and analyze them instantly.
Create beautiful charts and visualizations with automatic code generation.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Next.js Frontend โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Mastra Agent (Claude Sonnet 4.5) โ โ โ
โ โ โ - Natural Language Understanding โ โ โ
โ โ โ - Code Generation โ โ โ
โ โ โ - Tool Orchestration โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Pyodide (Python 3.12 in WebAssembly) โ โ โ
โ โ โ - NumPy, Pandas, Matplotlib โ โ โ
โ โ โ - Virtual File System โ โ โ
โ โ โ - Code Execution โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Frontend: Next.js 15, React 19, TypeScript
- AI Agent: Mastra Framework, Claude Sonnet 4.5
- Python Runtime: Pyodide 0.26 (Python 3.12)
- Styling: Tailwind CSS
- Scientific Libraries: NumPy, Pandas, Matplotlib
- Deployment: Vercel (recommended)
OpenDataChat/
โโโ app/
โ โโโ page.tsx # Main page
โ โโโ api/
โ โ โโโ mastra-agent/
โ โ โโโ route.ts # AI agent API endpoint
โ โโโ globals.css # Global styles
โโโ components/
โ โโโ DataAgent.tsx # Main chat interface
โโโ lib/
โ โโโ mastra/
โ โ โโโ agents/
โ โ โ โโโ dataAnalyst.ts # AI agent configuration
โ โ โโโ tools/
โ โ โโโ pythonExecutor.ts # Python execution tool
โ โ โโโ displayImage.ts # Image display tool
โ โ โโโ fileDownloader.ts # File download tool
โ โโโ mastraDataAgent.ts # Agent orchestration logic
โโโ next.config.ts # Next.js configuration
โโโ package.json
- Data Exploration: Quickly understand new datasets
- Business Analytics: Analyze sales, marketing, HR data
- Research: Statistical analysis and visualization
- Education: Learn data science interactively
- Prototyping: Test analysis ideas without setup
- Presentations: Live data analysis demos
- Data Privacy: All data processing happens in your browser
- No Server Storage: Files are never uploaded to any server
- API Security: Only AI requests are sent to Anthropic's API
- Open Source: Full code transparency
- โ Chrome 90+
- โ Firefox 88+
- โ Safari 15+
- โ Edge 90+
Requires WebAssembly support
# Install additional packages
import micropip
await micropip.install('scikit-learn')
from sklearn.linear_model import LinearRegression
# Use as normalThe agent can download files directly from URLs:
"Download this dataset: https://example.com/large-dataset.csv and show me summary statistics"
"Create a 2x2 subplot showing: 1) age distribution, 2) salary by department, 3) correlation heatmap, 4) tenure histogram"
Or manually:
# Build for production
npm run build
# Deploy to Vercel
vercel --prodCreate a .env.local file:
ANTHROPIC_AUTH_TOKEN=your_api_key_hereContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Pyodide - Amazing Python in the browser
- Mastra - Powerful agent framework
- Anthropic - Claude AI
- Next.js - The React framework
- Issues: GitHub Issues
- Discussions: GitHub Discussions
If you find this project useful, please consider giving it a star!
Built with โค๏ธ using AI agents and modern web technologies

