Skip to main content

๐Ÿถ Agentic AI-Empowered Data Science Notebooks - A revolutionary notebook environment combining Jupyter-style computing with autonomous AI assistance

Project description

๐Ÿถ iPuppy Notebooks ๐Ÿถ

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! ๐ŸŽ‰

โœจ Features

๐Ÿ• 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

๐Ÿš€ Quick Start

How to Run ๐Ÿƒโ€โ™‚๏ธ

The fastest way to get iPuppy Notebooks running:

  1. 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
    
  2. Run with uvx โšก

    uvx ipuppy-notebooks
    

That's it! iPuppy Notebooks will start and be available at http://localhost:8000 ๐Ÿถ

Development Setup ๐Ÿ› ๏ธ

For development or if you prefer to build from source:

Prerequisites ๐Ÿพ

  • Python 3.10+
  • Node.js 16+
  • uv package manager

Installation ๐Ÿ“ฆ

  1. Clone the repository ๐Ÿ•

    git clone <repository-url>
    cd iPuppy-Notebooks
    
  2. 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
    
  3. Frontend Setup โš›๏ธ

    # Install Node dependencies
    npm install
    
    # Build the React frontend
    npm run build
    

Launch ๐Ÿš€

  1. Start the FastAPI server ๐ŸŒ

    python main.py
    
  2. Open your browser ๐ŸŒ Navigate to http://localhost:8000 and start your data science journey! ๐Ÿถ

๐ŸŽฏ Usage Guide

Getting Started ๐Ÿพ

  1. Create a Notebook - Click "create" in the sidebar and give your notebook a name
  2. Add Cells - Use the "add cell" button to create code or markdown cells
  3. Run Code - Press the ๐Ÿš€ run button or use Shift+Enter to execute cells (automatically scrolls to output!)
  4. Chat with Puppy Scientist - Ask questions and watch the AI autonomously control your notebook, write code, and analyze data
  5. Write Math - Use LaTeX in markdown cells: $inline$ or $$display$$ for beautiful mathematical expressions
  6. Rich Outputs - Enjoy Plotly charts, matplotlib plots, LaTeX rendering, images, and more

AI Agent Operations ๐Ÿค–

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 cells
  • delete_cell(cell_index) - Remove cells
  • alter_cell_content(cell_index, content) - Modify cell content
  • execute_cell(cell_index) - Execute cells and wait for results
  • swap_cell_type(cell_index, new_type) - Switch between code/markdown
  • move_cell(cell_index, new_index) - Reorder cells

State Reading (requires active notebook):

  • list_all_cells() - Get complete notebook overview
  • read_cell_input(cell_index) - Read cell source code
  • read_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*

Keyboard Shortcuts โŒจ๏ธ

  • 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

Cell Types ๐Ÿ“

  • 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$$)

๐Ÿ—๏ธ Architecture

๐Ÿถ 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 ๐Ÿ•

๐ŸŽจ Design Philosophy

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

๐Ÿค– AI Agent Integration

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! ๐ŸŽฏ

๐Ÿ›ฃ๏ธ Roadmap

Phase 1: Foundation โœ…

  • Modern React + TypeScript frontend
  • FastAPI backend with WebSocket support
  • Cell management and execution
  • Keyboard shortcuts and navigation
  • Modern UI/UX design

Phase 2: AI Integration โœ…

  • 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

Phase 3: Rich Content โœ…

  • 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

Phase 4: Advanced Features ๐Ÿ”ฎ

  • Collaborative editing
  • Version control integration
  • Plugin system
  • Export to various formats (PDF, HTML, etc.)
  • Custom visualization libraries
  • Advanced data connectors

๐Ÿค Contributing

Want to help make iPuppy Notebooks even better? We'd love your contributions! ๐Ÿ•

  1. Fork the repository
  2. Create a feature branch
  3. Make your improvements
  4. Submit a pull request

๐Ÿ“„ License

MIT License - Feel free to use iPuppy Notebooks for your data science adventures! ๐Ÿพ

๐Ÿ• About the Creator

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! ๐Ÿพ๐Ÿ“Š

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipuppy_notebooks-0.1.13-py3-none-any.whl (438.6 kB view details)

Uploaded Python 3

File details

Details for the file ipuppy_notebooks-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for ipuppy_notebooks-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 7c15b97a9183b4f1023e518b830054e9339284cb9a05c59597b78fc540c9ea8c
MD5 6fba3b0ecffc09c0ae2b0e16c283851b
BLAKE2b-256 be9145d20b09aedae8db4e6dd2a6c151779e29e994c968988aae0902b45ece6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page