Skip to content

datasciencemonkey/coding-agents-databricks-apps

Repository files navigation

Coding Agents on Databricks Apps

Deploy to Databricks Agents Skills

Run Claude Code, Codex, Gemini CLI, and OpenCode in your browser β€” zero setup, wired to your Databricks workspace.


What's Inside

🟠 Claude Code β€” Anthropic's coding agent with 39 Databricks skills + 2 MCP servers

🟣 Codex β€” OpenAI's coding agent, pre-configured for Databricks

πŸ”΅ Gemini CLI β€” Google's coding agent with shared skills

🟒 OpenCode β€” Open-source agent with multi-provider support

Every agent starts pre-wired to your Databricks AI Gateway β€” models, auth tokens, and base URLs are all configured at boot. No API keys to manage.


Terminal Features

🎨 8 Themes Dracula, Nord, Solarized, Monokai, GitHub Dark, and more
βœ‚οΈ Split Panes Run two sessions side by side with a draggable divider
πŸ” Search Find anything in your terminal history (Ctrl+Shift+F)
🎀 Voice Input Dictate commands with your mic (Option+V)
⌨️ Customizable Fonts, font sizes, themes β€” all persisted across sessions
🐍 Loading Screen Play snake while 6 setup steps run in parallel
πŸ”„ Workspace Sync Every git commit auto-syncs to /Workspace/Users/{you}/projects/
✏️ Micro Editor Modern terminal editor, pre-installed
βš™οΈ Databricks CLI Pre-configured with your PAT, ready to go

Quick Start

Deploy to Databricks Apps

  1. Go to Databricks β†’ Apps β†’ Create App
  2. Choose Custom App and connect this Git repo:
    https://github.com/datasciencemonkey/coding-agents-in-databricks.git
    
  3. Add your PAT as the DATABRICKS_TOKEN secret in App Resources
  4. Deploy

That's it. Open the app URL and start coding.

β†’ Full deployment guide β€” environment variables, gateway config, and advanced options.

Run locally

git clone https://github.com/datasciencemonkey/coding-agents-in-databricks.git
cd coding-agents-in-databricks
uv run python app.py

Open http://localhost:8000 β€” type claude, codex, gemini, or opencode to start coding.


Why This Exists

On Jan 26, 2026, Andrej Karpathy made this viral tweet about the future of coding. Boris Cherny, the creator of Claude Code, responded:

Boris Cherny's response

This app template opens that vision up for every Databricks user β€” no IDE setup, no local installs. Just open the browser and start coding with AI.


🧠 All 39 Skills

Databricks Skills (25) β€” ai-dev-kit

Category Skills
AI & Agents agent-bricks, genie, mlflow-eval, model-serving
Analytics aibi-dashboards, unity-catalog, metric-views
Data Engineering declarative-pipelines, jobs, structured-streaming, synthetic-data, zerobus-ingest
Development asset-bundles, app-apx, app-python, python-sdk, config, spark-python-data-source
Storage lakebase-autoscale, lakebase-provisioned, vector-search
Reference docs, dbsql, pdf-generation
Meta refresh-databricks-skills

Superpowers Skills (14) β€” obra/superpowers

Category Skills
Build brainstorming, writing-plans, executing-plans
Code test-driven-dev, subagent-driven-dev
Debug systematic-debugging, verification
Review requesting-review, receiving-review
Ship finishing-branch, git-worktrees
Meta dispatching-agents, writing-skills, using-superpowers
πŸ”Œ 2 MCP Servers
Server What it does
DeepWiki Ask questions about any GitHub repo β€” gets AI-powered answers from the codebase
Exa Web search and code context retrieval for up-to-date information
πŸ—οΈ Architecture
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     HTTP      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Browser Client    │◄────────────►│   Gunicorn + Flask   β”‚
β”‚   (xterm.js)        β”‚   Polling     β”‚   (PTY Manager)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                                     β”‚
         β”‚ on first load                       β”‚ on startup
         β–Ό                                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Loading Screen    β”‚               β”‚   Background Setup  β”‚
β”‚   (snake game)      β”‚               β”‚   (6 parallel steps)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                               β”‚
                                               β–Ό
                                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                      β”‚   Shell Process     β”‚
                                      β”‚   (/bin/bash)       β”‚
                                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Startup Flow

  1. Gunicorn starts, calls initialize_app() via post_worker_init hook
  2. App immediately serves the loading screen (snake game)
  3. Background thread runs setup: git config, micro editor, Claude CLI, Codex CLI, OpenCode, Gemini CLI, Databricks CLI
  4. /api/setup-status endpoint reports progress to the loading screen
  5. Once complete, the loading screen transitions to the terminal UI

API Endpoints

Endpoint Method Description
/ GET Loading screen (during setup) or terminal UI
/health GET Health check with session count and setup status
/api/setup-status GET Setup progress for loading screen
/api/session POST Create new terminal session
/api/input POST Send input to terminal
/api/output POST Poll for terminal output
/api/resize POST Resize terminal dimensions
/api/session/close POST Close terminal session
βš™οΈ Configuration

Environment Variables

Variable Required Description
DATABRICKS_TOKEN Yes Your Personal Access Token (secret)
HOME Yes Set to /app/python/source_code in app.yaml
ANTHROPIC_MODEL No Claude model name (default: databricks-claude-opus-4-6)
CODEX_MODEL No Codex model name (default: databricks-gpt-5-2)
GEMINI_MODEL No Gemini model name (default: databricks-gemini-3-1-pro)
DATABRICKS_GATEWAY_HOST No AI Gateway URL (recommended)

Security Model

Single-user app β€” each user deploys their own instance with their own PAT. Only the token owner can access the terminal. Everyone else sees 403.

Gunicorn

Production uses workers=1 (PTY state is process-local), threads=8 (concurrent polling), gthread worker class.

πŸ“ Project Structure
coding-agents-in-databricks/
β”œβ”€β”€ app.py                   # Flask backend + PTY management + setup orchestration
β”œβ”€β”€ app.yaml.template        # Databricks Apps deployment config template
β”œβ”€β”€ gunicorn.conf.py         # Gunicorn production server config
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ setup_claude.py          # Claude Code CLI + MCP configuration
β”œβ”€β”€ setup_codex.py           # Codex CLI configuration
β”œβ”€β”€ setup_gemini.py          # Gemini CLI configuration
β”œβ”€β”€ setup_opencode.py        # OpenCode configuration
β”œβ”€β”€ setup_databricks.py      # Databricks CLI configuration
β”œβ”€β”€ sync_to_workspace.py     # Post-commit hook: sync to Workspace
β”œβ”€β”€ install_micro.sh         # Micro editor installer
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ index.html           # Terminal UI (xterm.js + split panes)
β”‚   β”œβ”€β”€ loading.html         # Loading screen with snake game
β”‚   └── lib/                 # xterm.js library files
β”œβ”€β”€ .claude/
β”‚   └── skills/              # 39 pre-installed skills
└── docs/
    β”œβ”€β”€ deployment.md        # Full Databricks Apps deployment guide
    └── plans/               # Design documentation

Technologies

Flask Β· Gunicorn Β· xterm.js Β· Python PTY Β· Databricks SDK Β· Databricks AI Gateway

About

Run coding agents on Databricks Apps πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages