autoresearch

autoresearch is a command for coding agents from gettalon/talon-plugins. It costs 40 tokens per session (1,007 once invoked), scanned A, original, MIT.

A command for repeatedly changing a file, running an experiment, measuring a chosen result, and keeping or discarding each change.

In plain words
What is it for?
Use it to improve a measurable target such as model validation results, bundle size, test coverage, compile time, or response time.
Why use it?
It automates an iterative optimization process instead of requiring the developer to run and compare every experiment manually.

Command

Part of the talon plugin — 8 skills, 11 commands shipped together

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 commands/gettalon/talon-plugins/autoresearch
Clone the repo
git clone --depth 1 https://github.com/gettalon/talon-plugins

Or install talon, the plugin that ships this one along with the rest of its 8 skills, 11 commands.

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 autoresearch

README.md
[![agentmods](https://agentmods.dev/badge/commands/gettalon/talon-plugins/autoresearch.svg)](https://agentmods.dev/commands/gettalon/talon-plugins/autoresearch)
Your own site
<a href="https://agentmods.dev/commands/gettalon/talon-plugins/autoresearch"><img src="https://agentmods.dev/badge/commands/gettalon/talon-plugins/autoresearch.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,007 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00040 $0.01007
Opus 5 $0.00020 $0.00504
Sonnet 5 $0.00008 $0.00201
Haiku 4.5 $0.00004 $0.00101

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

Security

Grade A, and why

autoresearch scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/talon/commands/autoresearch.md · 104 lines

How it starts

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

Autoresearch — Autonomous Experiment Loop

Inspired by Karpathy's autoresearch. Iteratively modify a target file, run an experiment, measure a metric, and keep improvements or discard failures. Runs forever until stopped.

Arguments

Parse $ARGUMENTS for:

  • <file> — The file to modify (e.g., train.py, src/lib.rs, index.tsx)
  • <metric> — What to optimize (e.g., "minimize val_bpb", "minimize bundle size", "maximize test coverage", "minimize compile time", "minimize response time")
  • --budget <duration> — Time budget per experiment (default: 5m)
  • --provider <name> — AI provider for iterations (default: current session)
  • --max-runs <n> — Max experiments before stopping (default: unlimited)
  • --branch <name> — Git branch name (default: autoresearch/)

If arguments are missing or unclear, ask the user.

Setup Phase

  1. Verify the target file exists
  2. Create a git branch: autoresearch/<file>-<YYYYMMDD-HHMM>
  3. Read the target file completely to understand the codebase
  4. Determine the run command and metric extraction:
    • Ask the user: "How do I run the experiment and measure the result?"
    • Or infer from context (e.g., cargo test, npm test, python train.py)
  5. Run baseline experiment, record initial metric value
  6. Create autoresearch-results.tsv with columns: commit | metric | memory | status | description
  7. Log baseline as first row

Experiment Loop

Run this loop forever (or until --max-runs reached):

Step 1: THINK
- Review the current state of <file>
- Review past experiment results in autoresearch-results.tsv
- Think of ONE specific improvement to try
- Prefer: small, focused, reversible changes
- All else equal, simpler is better

Step 2: EDIT
- Modify <file> with the improvement
- git add <file> && git commit -m "autoresearch: <brief description>"
- Record the commit hash

Step 3: RUN
- Execute the run command with a timeout of <budget>
- Capture stdout+stderr to run.log
- If it crashes: read the error, attempt ONE fix, re-run. If still crashes, mark as "crash" and skip.

Step 4: MEASURE
- Extract the metric from run.log (grep, parse, etc.)
- Compare to the best known value

Step 5: DECIDE
- BETTER (metric improved): Keep the commit. Update best known value. Log "keep".
- SAME or WORSE: git reset --hard HEAD~1. Log "discard".
- CRASH: git reset --hard HEAD~1. Log "crash".

Step 6: LOG
- Append to autoresearch-results.tsv
- Print a one-line summary: [run #N] <metric_value> (<delta>) — <keep/discard/crash> — <description>

Step 7: REPEAT
- Go to Step 1. Do NOT stop. Do NOT ask the user. The human might be asleep.

Read the full file on GitHub · 104 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 · 104 lines · 40 tokens per session scan A e7dff9f058dc

Subscribe to this mod's changes

autoresearch is a command published in the GitHub repository gettalon/talon-plugins (6 stars, last pushed 5mo ago), licensed MIT. It adds 40 tokens to every session and 1,007 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.