This file describes the project the agent is actively working on. The agent reads this automatically at session start.
Project name: Betty AI PI / Lab: TBD Group: UPenn PARCC (Advanced Research Computing Center) Betty account: TBD Allocation: TBD
Betty Agent is a general-purpose conversational research assistant for the Betty HPC cluster. It helps Penn researchers accomplish any research computing task on Betty — fine-tune LLMs, serve inference endpoints, run multi-node MPI jobs, process large datasets, set up interactive environments, debug Slurm failures, manage conda environments — without having to hand-write Slurm scripts or memorize cluster quirks.
The agent is not tied to LLMs or any specific workload. It's an orchestrator: it asks what the user wants, picks appropriate resources, generates the right job scripts, submits, and monitors.
Phase 1 focus (current): LLM fine-tuning and inference workflows are fully implemented and battle-tested.
Future phases: The same architecture extends to any research computing scenario — MPI jobs, data pipelines, interactive notebooks, custom scientific software, and more.
TBD — fill in what you're actively building next (e.g. web GUI polish, new agent tool, wiki ingestion flow, specific user workflow)
Betty Agent has two halves plus a knowledge layer:
Python + YAML configs, templates, and helper scripts that the agent uses to reason about the cluster:
models/model_registry.yaml— VRAM/resource database for common LLMsmodels/gpu_calculator.py— resource allocation calculatortemplates/— Slurm, DeepSpeed, training, and conda environment templatesconfigs/betty_cluster.yaml— machine-readable cluster specsconfigs/defaults.yaml— default behaviorsconfigs/team.yaml.example— per-user config templatescripts/— env setup and sanity-check helpers
A Next.js 15 + React 19 chat interface built on @anthropic-ai/claude-agent-sdk:
src/app/api/chat/route.ts— chat API endpointsrc/agent/server.ts— agent server setupsrc/agent/system-prompt.ts— agent persona/instructionssrc/agent/tools/— agent tools:wiki-search,wiki-read,wiki-write,gpu-calculate,cluster-run,cluster-submit,cluster-status,slurm-availability,slurm-check,slurm-diagnose,slurm-recommendsrc/components/— chat UI (AppShell, ChatPane, ChatMessage, QuickStartTiles, StatusBar) plus thedashboard/cards (cluster overview, user stats, scheduling, docs)src/app/api/cluster/— server routes that back the dashboard:overview,quota,cost,jobs
Karpathy-style LLM Wiki pattern:
raw/— immutable source documents (PARCC docs, papers, exploration logs, experiment outputs)wiki/— agent-maintained markdown knowledge base with entities, concepts, models, sources, experimentswiki/SCHEMA.md— rules the agent follows to keep the wiki cleanwiki/index.md— catalog of all pageswiki/log.md— chronological operation log
Personal: /vast/home/j/jvadala
Projects: /vast/projects/<project>
module load anaconda3
source activate /vast/projects/<project>/envs/<env>parcc_quota.py,parcc_du.py— storageparcc_sfree.py,parcc_sqos.py— partitions, QOS limitsparcc_sreport.py --user jvadala— usage/billingparcc_sdebug.py— debug failed jobs or nodes
See CLAUDE.md for the full cluster quick-reference.
| Name | PennKey | Role | Focus |
|---|---|---|---|
| Jeff Vadala | jvadala |
Builder / maintainer | Agent, GUI, wiki system |
Add teammates here as they join.
The agent is general-purpose and architected to handle any research computing workload. Current capabilities by phase:
Phase 1 (fully implemented):
- Fine-tuning LLMs — pick GPUs, generate Slurm + DeepSpeed/LoRA scripts, submit, monitor
- Serving inference — set up vLLM/TGI endpoints, expose to the team
- Environment management — create/activate conda envs in
/vast/projects/... - Debugging — parse Slurm failure logs, diagnose node/partition issues
- Wiki operations — ingest new
raw/docs intowiki/, answer "what do we know about X?" from wiki, run lint passes - Cost estimation — estimate GPU-hours and cluster point (PC) usage before submitting
- Dashboard — a sidebar of read-only cards alongside the chat.
ClusterOverviewCardpolls/api/cluster/overview(parsessinfofor partition idle/total nodes + GPUs and CPU allocation),UserStatsCardcalls/api/cluster/quota(storage quota viaparcc_quota.py),/api/cluster/cost(allocation usage viaparcc_sreport.py), and/api/cluster/jobs(livesqueue -u <user>), andDocsLinksCardsurfaces PARCC documentation links. All routes are read-only over the shared SSH ControlMaster socket and degrade gracefully when SSH or Kerberos is unavailable.- Monitoring tab — A Datadog-style live Slurm health view inside the dashboard (
#monitoringhash). Six cards bound to five Wave 2D parser routes:PendingReasonsCard(squeue Reasons),BackfillCard(sdiag backfill),SchedulerRpcCard(sdiag RPC),NodeHeatmapCard(sinfo -N),JobOutcomeCard(sacct 24h),FairshareCard(sprio -hl). Each card polls at 60s, renders an SVG chart primitive (Sparkline / Donut / StackedBar / Heatmap), and appends to a 24h JSONL ringbuffer atbetty-ai/data/metrics/<endpoint>.jsonl. Verify the contract surface withnpm run monitoring:smokefrombetty-ai-web/— exit 0 means all six cards, five routes, and four chart primitives are green; exit 1 lists the failures. See [[wiki/concepts/monitoring-tab]].
- Monitoring tab — A Datadog-style live Slurm health view inside the dashboard (
Future phases (architecture supports, templates needed):
7. Multi-node / MPI jobs — generate sbatch scripts with srun --mpi=pmix for simulations, modeling, parallel computing
8. Data processing pipelines — Spark, Dask, custom Python/R workflows on CPU or GPU
9. Interactive computing — Jupyter, RStudio servers with resource allocation
10. Batch analysis — domain-specific workloads (bioinformatics, physics, chemistry, climate science)
11. Custom software stacks — compile and deploy specialized research software
12. Workflow orchestration — multi-stage pipelines with dependencies
- TBD — log successful experiments with links to
[[wiki/experiments/...]]pages
- TBD — document failed approaches so the agent doesn't re-suggest them
conda activatedoesn't work on Betty — usesource activateinstead- Home dir is only 50 GB — always set
HF_HOMEto/vast/projects/<project>/hf_cache interacthelper script is broken — usesrundirectly- Login nodes are for editing/syncing/submitting only — never train on login nodes
- Project membership changes in ColdFront can take up to 1 hour to propagate
- ColdFront membership must be confirmed by the PI if login fails
- The local repo's parent directory is literally
BettyAgentwith a trailing space — quote Bash paths accordingly
- Fill in the
_TBD_fields above (PI, allocation, current focus) - Add next concrete milestones here