The notebook that thinks with you.
In the Loop is an agentic notebook where AI, code, and prose work together in real-time. Never lose your outputs when tabs close. Collaborate with AI that sees your data, not just your code. Built on event-sourced architecture for persistent, collaborative computation.
Status: Working system deployed at https://app.runt.run - stable for experimentation and real usage, actively developed.
As a long-time Jupyter contributor, I've always wanted to solve a core architectural limitation: computation and documentation are artificially coupled.
At Netflix, I watched people hold their laptops open walking to the parking lot, hoping their Spark jobs would finish before they lost their browser session. Your analysis is running on powerful clusters, but the results only "exist" in your specific browser tab.
The core problem: You can't open the same notebook in multiple tabs. Multiple people can't collaborate on the same server without conflicts. Your work is trapped in a single browser session.
Why this happens: Jupyter's architecture wasn't designed for concurrent access. The notebook exists as a file on disk, but the live state (outputs, execution results) only lives in your browser. Close that tab, and you lose the connection to work happening elsewhere.
In the Loop's approach: Persistent outputs that survive browser crashes, tab closures, and device switches. Real-time collaboration without conflicts. AI that sees your actual results. Full Jupyter compatibility through .ipynb import/export. Your computation lives independently of any browser session.
In the Loop is built as a monorepo with four core packages and a unified web client:
@runtimed/schema- Event-sourced schema definitions with full type safety across the ecosystem@runtimed/agent-core- Runtime agent framework with artifact storage and observability@runtimed/ai-core- Multi-provider AI integration (OpenAI, Ollama, Groq) with tool calling@runtimed/pyodide-runtime- In-browser Python runtime with scientific computing stack
Anode supports three execution paradigms:
- External Runtime Agents - Python execution via
@runt/pyodide-runtime-agent(JSR package) - In-Browser HTML Runtime - Direct DOM execution for HTML/CSS/JavaScript
- In-Browser Python Runtime - Pyodide-powered Python with numpy, pandas, matplotlib
All runtimes share the same LiveStore event-sourced backend for consistent state management.
- LiveStore - Event-sourcing library for local-first apps with real-time sync
- Effect - Functional programming library for TypeScript
- React - UI framework with CodeMirror editors
- Cloudflare Workers - Production deployment with D1 (SQLite) and R2 (object storage)
Requirements: Node.js >=23.0.0 (use nvm use to automatically switch)
pnpm install # Install dependencies
# Copy environment configuration files
cp .env.example .env
cp .dev.vars.example .dev.vars
# Start integrated development server (frontend + backend)
pnpm dev # http://localhost:5173
# Start iframe outputs server (separate terminal)
pnpm dev:iframe # http://localhost:8000The example files contain working defaults for local development:
.env.exampleβ.env- Frontend environment variables (Vite).dev.vars.exampleβ.dev.vars- Backend environment variables (Worker)
- Open http://localhost:5173
- Click "New Notebook"
- Start creating cells and editing
Option A: External Runtime Agent
- Create a
RUNT_API_KEYvia your user profile - Click the Runtime button in the notebook header
- Copy the exact
NOTEBOOK_ID=xxx pnpm dev:runtimecommand shown - Run that command in your terminal
Option B: In-Browser HTML Runtime
- Click the Runtime button in the notebook header
- Click Launch HTML Runtime
- Start writing HTML/CSS/JavaScript immediately
Option C: In-Browser Python Runtime
- Click the Runtime button in the notebook header
- Click Launch Python Runtime
- Full Python with scientific stack loads in ~10 seconds
- Add a code cell in the web interface
- Write Python:
import numpy as np; np.random.random(5) - Press Ctrl+Enter or click Run
- See results appear instantly across all connected clients
- Models see both code and execution results (not just source)
- AI can create and modify cells with approval system
- Multi-provider support: OpenAI, Ollama, Groq
- Context-aware responses based on notebook state
- Outputs survive runtime crashes, browser restarts, network drops
- Event-sourced architecture preserves every change
- Work offline, sync when connected
- Rich multimedia outputs: plots, tables, terminal colors, images
- Multiple users editing simultaneously without conflicts
- Live presence indicators and collaborative cursors
- Mobile-responsive design for editing anywhere
- Share notebooks by copying the URL
- External agents for production compute integration
- In-browser HTML for immediate prototyping
- In-browser Python for self-contained data science
- Soft shutdown preserves state across runtime switches
- Integrated dev server (no separate backend process needed)
- Hot reload for UI changes
- Comprehensive testing with integration coverage
- Bundle analysis and performance monitoring
VITE_RUNT_LOG_LEVEL: Control runtime agent verbosityDEBUG: All logs including debug infoINFO: Informational and above (default dev)WARN: Warnings and errors onlyERROR: Errors only (default production)
Example:
# Enable verbose logging for troubleshooting
VITE_RUNT_LOG_LEVEL=DEBUG pnpm dev
# Quiet mode for clean output
VITE_RUNT_LOG_LEVEL=ERROR pnpm devSee .env.example and .dev.vars.example for complete configuration options.
In the Loop runs on Cloudflare Workers with a unified architecture:
- Single Worker serves both frontend assets and backend API
- D1 Database stores LiveStore events for persistence
- R2 Bucket handles artifact storage for large outputs
- Durable Objects manage WebSocket connections for real-time sync
This architecture provides robust collaboration and artifact storage while simplifying deployment.
# Development
pnpm dev # Integrated server (frontend + backend)
pnpm dev:iframe # Iframe outputs server
pnpm dev:runtime # External runtime agent (get command from UI)
# Quality Checks
pnpm check # Type check + lint + format check
pnpm test # Run test suite
pnpm test:integration # Integration tests only
# Building
pnpm build # Build for development
pnpm build:production # Optimized production build| Problem | Solution |
|---|---|
| Schema errors | Restart all services after package changes |
| Runtime not connecting | Check API key creation and copy exact command from UI |
| Dev server crashes | Run pnpm dev again - .env changes don't auto-restart |
| Build failures | Run pnpm type-check to identify TypeScript issues |
| Lost notebooks | Run rm -rf .wrangler |
The monorepo structure allows local development of runtime packages:
# Work on schema changes
cd packages/schema
pnpm type-check
# Test agent-core modifications
cd packages/agent-core
pnpm lint
# All packages use workspace:* dependencies for local developmentSchema changes automatically propagate to all consuming packages through workspace linking.
- β LiveStore event-sourcing architecture
- β Real-time collaboration without conflicts
- β Multi-runtime execution support
- β Rich output rendering system
- β Offline-first operation with sync
- π§ͺ AI model selection and prompt engineering
- π§ͺ Runtime orchestration and health monitoring
- π§ͺ Permissions and sharing workflows
- π§ͺ Performance optimization for large notebooks
- π§ͺ Additional language runtimes
- Manual runtime startup (working toward one-click)
- Single active runtime per notebook
- Limited error recovery guidance
- No runtime resource limits
We're building this in the open and welcome experimentation:
π€ Improve AI Integration
- Test AI tool calling with your workflows
- Experiment with different model providers
- Build custom tool registries
β‘ Runtime Development
- Create runtime agents for new languages
- Improve Python package management
- Build compute backends (BYOC)
π Extend Capabilities
- Add SQL cell support for database workflows
- Build interactive widgets
- Create visualization plugins
π Real-World Usage
Use In the Loop for actual data science work
- Report issues and workflow friction
- Share feedback on collaboration features
Ready to contribute? The system is stable enough for real use while being open to changes.
- Development Context - Complete technical documentation for contributors
- Deployment Guide - Production deployment instructions
- Roadmap - Development priorities and future plans
BSD 3-Clause