experiment-worker

experiment-worker is an agent for Claude Code from Pavel-Tk/auto-data-scientist. It costs 55 tokens per session (3,939 once invoked), scanned A, original, MIT.

An isolated worker that runs machine-learning experiments from a supplied hypothesis. A hypothesis describes choices such as the model, features, settings, data, and task type.

In plain words
What is it for?
It helps write and execute self-contained Python training scripts locally or in Kaggle notebooks, reuse shared feature-loading code, retry failures up to three times, and return structured results.
Why use it?
It handles experiment implementation and debugging without making strategic research decisions for the supervising agent.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/pavel-tk/auto-data-scientist/experiment-worker
Clone the repo
git clone --depth 1 https://github.com/Pavel-Tk/auto-data-scientist

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for experiment-worker

README.md
[![agentmods](https://agentmods.dev/badge/agents/pavel-tk/auto-data-scientist/experiment-worker.svg)](https://agentmods.dev/agents/pavel-tk/auto-data-scientist/experiment-worker)
Your own site
<a href="https://agentmods.dev/agents/pavel-tk/auto-data-scientist/experiment-worker"><img src="https://agentmods.dev/badge/agents/pavel-tk/auto-data-scientist/experiment-worker.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,939 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.03939
Opus 5 $0.00028 $0.01969
Sonnet 5 $0.00011 $0.00788
Haiku 4.5 $0.00006 $0.00394

Measured 3d ago against content hash 065df77f15ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

experiment-worker scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(['python', '-m', 'kaggle', 'competitions', 'download', '-c', COMPETITION_SLUG, '-p', COMP_DIR],
.claude/agents/experiment-worker.md · 366 lines

How it starts

The opening of the file, as written. The whole thing — 366 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an ML Experiment Execution Worker. Your job is to take a hypothesis from the Master Agent, implement it as a self-contained Python script (or Kaggle notebook), execute it, and return structured results. You operate in complete isolation — you make NO strategic decisions, only execute faithfully.

Execution Mode

The Master Agent will specify execution_target: local or execution_target: kaggle:

  • local → follow the standard local Python script routine (Steps 1-7 below)
  • kaggle → follow the Kaggle Notebook routine (Steps K1-K6 below)

You will be told which mode to use. Execute the appropriate routine exactly.

Your Routine (Local Execution)

  1. Parse the hypothesis you received (model type, feature strategy, hyperparameters, data paths, output directory, task type)
  2. Check for feature_template.py in the working directory. If it exists, read it — your script should import and use its load_and_preprocess() function for data loading and base feature engineering. Add hypothesis-specific features on top.
  3. Write a complete Python script to {output_dir}/code.py
    • If feature_template.py exists: import from it, then add hypothesis-specific logic
    • If it does not exist: write a fully self-contained script (all imports, data loading, preprocessing, training, evaluation)
  4. Execute the script with a timeout: timeout {worker_timeout_seconds} python {output_dir}/code.py (default timeout: 1800 seconds / 30 minutes). If the hypothesis specifies a different timeout, use that.
  5. If it fails: read the traceback, diagnose the root cause, fix code.py, and re-execute. You get up to 3 fix attempts. Each attempt should address the specific error — do not rewrite from scratch unless the approach is fundamentally broken.
  6. If it succeeds: validate outputs and return the structured summary below
  7. If 3 attempts all fail: return a terminal_failure status with error summary

Kaggle Notebook Routine

Follow these steps when execution_target: kaggle is specified.

Read the full file on GitHub · 366 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 366 lines · 55 tokens per session scan A 065df77f15ae

Subscribe to this mod's changes

experiment-worker is an agent published in the GitHub repository Pavel-Tk/auto-data-scientist (6 stars, last pushed 5mo ago), licensed MIT. It adds 55 tokens to every session and 3,939 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

algorithm-expert

RL algorithm expert. Fire when working on GRPO/PPO/DAPO/GSPO/SAPO algorithms, reward functions, advantage normalization, loss computation, or training loop implementation.

redai-infra/Relax · 37 tokens

by-campaign

Plan design campaigns. Analyze research, select modality, choose scaffolds, estimate costs, create campaign state, and present structured plan for user approval.

001TMF/blatant-why · 33 tokens

mathodology-problem-analyst

Use for contest problem decomposition, scoring criteria, constraints, variables, assumptions, and deliverable mapping.

sweetcornna/mathodology · 29 tokens

validator

Validate molecular identifiers (SMILES strings, nucleotide sequences, amino acid sequences, CAS numbers) found in epistract extraction results. Uses RDKit for chemistry and Biopython for sequences. Domain-aware: skips validation if the current domain has no validation-scripts.

usathyan/epistract · 53 tokens

gpd-plan-checker

Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality for physics research. Spawned by the plan-phase and verify-work workflows.

psi-oss/get-physics-done · 38 tokens

data-cruncher

Run heavy quantitative analysis in isolation — fit many model variants, run cross-validation, simulate power, perform sensitivity analyses, profile slow scripts. Use when the parent conversation needs numerical results but should not be polluted with raw output, large dataframes, or long-running compute. Returns a…

Marazii/research-co-pilot · 82 tokens