Agentic AI-Empowered Data Science for the Modern Era ๐๐
A revolutionary notebook environment that combines the power of Jupyter-style computing with intelligent AI assistance. Built with FastAPI backend and React frontend, iPuppy Notebooks puts the fun back in data science! ๐
๐ Puppy Scientist AI Agent - Fully integrated AI assistant that autonomously controls notebooks, writes code, executes analyses, and provides data science expertise
๐ Modern Dark Theme - Sleek monochromatic design with zinc color palette and JetBrains Mono fonts
โก Real-time Execution - WebSocket-powered code execution with instant feedback and auto-scroll to outputs
๐ Rich Output Support - LaTeX math rendering, Plotly charts, matplotlib/seaborn plots, images, videos, and more
๐งฎ LaTeX in Markdown - Write beautiful mathematical expressions with KaTeX rendering (both inline $x$ and display $$x$$)
๐ฑ Responsive Design - Works beautifully on desktop and mobile
๐ Cell Management - Create, reorder, expand, and manage code/markdown cells with full programmatic control
โจ๏ธ Smart Shortcuts - Shift+Enter to run cells and navigate seamlessly with intelligent tab handling
๐ค Agentic Operations - AI can directly manipulate notebooks: add cells, execute code, read outputs, and more
๐ Python Kernel - Full iPython kernel with autocomplete, rich MIME type support, and matplotlib inline display
๐จ Animated UI - Puppy spinner animations and smooth transitions throughout
The fastest way to get iPuppy Notebooks running:
-
Set up your API keys ๐
export OPENAI_API_KEY="your-openai-api-key" export GEMINI_API_KEY="your-gemini-api-key" export ANTHROPIC_API_KEY="your-anthropic-api-key" # Add any other AI provider keys you want to use
-
Run with uvx โก
uvx ipuppy-notebooks
That's it! iPuppy Notebooks will start and be available at http://localhost:8000 ๐ถ
For development or if you prefer to build from source:
- Python 3.10+
- Node.js 16+
- uv package manager
-
Clone the repository ๐
git clone <repository-url> cd iPuppy-Notebooks
-
Backend Setup ๐
# Install Python dependencies uv pip install -r pyproject.toml # Install code_puppy for AI model management (optional but recommended) # Follow instructions at: https://github.com/anthropics/code_puppy
-
Frontend Setup โ๏ธ
# Install Node dependencies npm install # Build the React frontend npm run build
-
Start the FastAPI server ๐
python main.py
-
Open your browser ๐ Navigate to
http://localhost:8000and start your data science journey! ๐ถ
- Create a Notebook - Click "create" in the sidebar and give your notebook a name
- Add Cells - Use the "add cell" button to create code or markdown cells
- Run Code - Press the ๐ run button or use Shift+Enter to execute cells (automatically scrolls to output!)
- Chat with Puppy Scientist - Ask questions and watch the AI autonomously control your notebook, write code, and analyze data
- Write Math - Use LaTeX in markdown cells:
$inline$or$$display$$for beautiful mathematical expressions - Rich Outputs - Enjoy Plotly charts, matplotlib plots, LaTeX rendering, images, and more
The Puppy Scientist AI Agent can autonomously control your notebook through these operations:
Notebook Manipulation:
add_new_cell(cell_index, cell_type, content)- Add new code/markdown cellsdelete_cell(cell_index)- Remove cellsalter_cell_content(cell_index, content)- Modify cell contentexecute_cell(cell_index)- Execute cells and wait for resultsswap_cell_type(cell_index, new_type)- Switch between code/markdownmove_cell(cell_index, new_index)- Reorder cells
State Reading (requires active notebook):
list_all_cells()- Get complete notebook overviewread_cell_input(cell_index)- Read cell source coderead_cell_output(cell_index)- Read execution outputs
Communication:
share_your_reasoning(reasoning, next_steps)- Explain thought process
The agent uses these tools to autonomously:
- ๐ Analyze your data and create visualizations
- ๐ป Write, execute, and debug Python code
- ๐ Create markdown documentation with LaTeX math
- ๐ Inspect notebook state and outputs
- ๐ Implement complete data science workflows
Example conversation:
You: "Analyze the iris dataset and create some visualizations"
๐ถ: *Creates cells, loads data, performs EDA, generates Plotly charts*
- Shift+Enter - Execute current cell and move to next (with auto-scroll to output)
- Tab - Smart indentation and autocomplete in code cells
- Cell Navigation - Seamlessly move between cells after execution
- Code Cells - Execute Python code with full IPython kernel, rich outputs, and autocomplete
- Markdown Cells - Rich text formatting with LaTeX math support (
$inline$and$$display$$)
๐ถ iPuppy Notebooks Architecture ๐ถ
โโโ ๐ Backend (FastAPI)
โ โโโ main.py # FastAPI server and WebSocket handling
โ โโโ ipuppy_notebooks/ # Core notebook functionality
โ โ โโโ agent/ # AI agent system
โ โ โ โโโ agent.py # DataSciencePuppyAgent main class
โ โ โ โโโ tools.py # Notebook manipulation tools
โ โ โ โโโ prompts.py # System prompts and instructions
โ โ โโโ kernels/ # Jupyter kernel management
โ โ โ โโโ manager.py # Kernel lifecycle and initialization
โ โ โ โโโ executor.py # Code execution handling
โ โ โโโ frontend_operations.py # BackendโFrontend communication
โ โ โโโ socket_handlers.py # WebSocket event handling
โ โโโ notebooks/ # Stored notebook files (.py format)
โโโ โ๏ธ Frontend (React + TypeScript)
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โ โโโ Header.tsx # Top navigation with kernel status
โ โ โ โโโ Sidebar.tsx # Notebooks + Puppy Scientist chat
โ โ โ โโโ NotebookCell.tsx # Individual cell with LaTeX support
โ โ โ โโโ NotebookContainer.tsx # Main notebook view
โ โ โโโ lib/
โ โ โ โโโ tabHandler.ts # Smart tab indentation system
โ โ โโโ App.tsx # Main application logic & WebSocket
โ โ โโโ main.tsx # React entry point
โ โโโ public/
โ โโโ puppy.svg # Custom puppy favicon ๐
iPuppy Notebooks embraces a modern monochromatic aesthetic with:
- ๐จ Zinc color palette (grey variants only)
- ๐ค JetBrains Mono monospace typography
- ๐ Dark theme optimized for long coding sessions
- โจ Subtle animations and clean interfaces
- ๐ Playful puppy branding throughout
The Puppy Scientist ๐โ๐ฆบ is a fully autonomous AI agent powered by pydantic-ai that can:
- ๐ฏ Autonomous Operation - Takes high-level requests and executes complete workflows independently
- ๐ Data Analysis - Loads, cleans, analyzes data and creates professional visualizations
- ๐ป Code Generation - Writes, executes, and debugs Python code in real-time
- ๐งฎ Mathematical Communication - Creates markdown cells with LaTeX equations and explanations
- ๐ Notebook Inspection - Reads existing notebook state and builds upon your work
- ๐ Best Practices - Follows data science methodologies and coding standards
- ๐ Personality - Fun, informal, and pedantic about data science principles (refuses to make pie charts!)
Supported AI Models:
- Claude (Anthropic) - Recommended for best performance
- GPT-4 series (OpenAI)
- QWEN models (Alibaba)
- Any model supported by pydantic-ai
The agent maintains conversation history per notebook and can switch between different models on the fly! ๐ฏ
- Modern React + TypeScript frontend
- FastAPI backend with WebSocket support
- Cell management and execution
- Keyboard shortcuts and navigation
- Modern UI/UX design
- Fully autonomous Puppy Scientist AI agent
- Real-time notebook manipulation by AI
- Multi-model support (Claude, GPT-4, QWEN, etc.)
- Conversation history per notebook
- Intelligent error handling and guidance
- LaTeX math rendering in markdown cells
- Comprehensive MIME type support (images, videos, audio, JSON, CSV)
- Plotly charts with proper timing
- Matplotlib/seaborn inline display
- Auto-scroll to outputs on execution
- Animated puppy spinner and smooth UI transitions
- Collaborative editing
- Version control integration
- Plugin system
- Export to various formats (PDF, HTML, etc.)
- Custom visualization libraries
- Advanced data connectors
Want to help make iPuppy Notebooks even better? We'd love your contributions! ๐
- Fork the repository
- Create a feature branch
- Make your improvements
- Submit a pull request
MIT License - Feel free to use iPuppy Notebooks for your data science adventures! ๐พ
Created with โค๏ธ by Michael Pfaffenberger to revolutionize how we approach data science. iPuppy Notebooks combines the best of Jupyter-style computing with cutting-edge AI assistance - no more bloated IDEs or expensive proprietary tools, just pure, puppy-powered productivity! ๐ถโจ
Why iPuppy Notebooks?
- ๐ค True AI Partnership - The agent doesn't just suggest, it actually does the work
- ๐ Beautiful Math & Viz - LaTeX rendering and rich outputs make presentations ready
- โก Lightning Fast - Modern architecture with real-time updates
- ๐จ Thoughtful Design - Every detail crafted for the data science workflow
- ๐ Pure Joy - Data science should be fun, not frustrating!
Ready to unleash your data science potential? ๐๐
Ask the Puppy Scientist: "Analyze the Titanic dataset and create some visualizations"
Watch as it autonomously loads data, performs EDA, and generates beautiful charts! ๐พ๐