research-loop

research-loop is an agent for Claude Code from Oshayr/LLM-Wiki. It costs 28 tokens per session (547 once invoked), scanned A, original, MIT.

An automated research loop that repeatedly forms questions, searches for answers, adds useful results to a wiki, and evaluates what changed. It runs for up to three iterations by default.

In plain words
What is it for?
Use it to investigate a research program, ingest relevant sources into wiki pages, measure unanswered questions and contradictions, and keep or discard each round's changes.
Why use it?
It provides a repeatable way to expand a wiki while checking whether each round actually improves the answers.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the llm-wiki plugin — 5 skills, 10 agents shipped together

Good fit Use it to investigate a research program, ingest relevant sources into wiki pages, measure unanswered questions and contradictions, and keep or discard each round's changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/oshayr/llm-wiki/research-loop
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.

Clone the repo
git clone --depth 1 https://github.com/Oshayr/LLM-Wiki

Made for: Claude Code.

Or install llm-wiki, the plugin that ships this one along with the rest of its 5 skills, 10 agents.

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 research-loop

README.md
[![agentmods](https://agentmods.dev/badge/agents/oshayr/llm-wiki/research-loop/github.svg)](https://agentmods.dev/agents/oshayr/llm-wiki/research-loop)
Your own site
<a href="https://agentmods.dev/agents/oshayr/llm-wiki/research-loop"><img src="https://agentmods.dev/badge/agents/oshayr/llm-wiki/research-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for research-loop

Your own site · 80×15
<a href="https://agentmods.dev/agents/oshayr/llm-wiki/research-loop"><img src="https://agentmods.dev/badge/agents/oshayr/llm-wiki/research-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 547 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00028 $0.00547
Opus 5.5 $0.00011 $0.00219
Sonnet 5.5 $0.00006 $0.00109
Haiku 4.5 $0.00003 $0.00055

Measured 1mo ago against content hash e727bac0a340, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

research-loop 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 1mo 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.

agents/research-loop.md · 60 lines

How it starts

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

Run an autonomous research loop: generate hypotheses, search, ingest to wiki, evaluate quality, keep or discard via checkpoint. Max 3 iterations by default. Stops on metric plateau or question saturation.

Setup

Resolve .wiki/ from plugin install scope. Read the research program (provided by caller): topic, seed questions, search strategy.

Iteration Loop

1. Checkpoint Baseline

Create a checkpoint of current .wiki/ state as a rollback point.

2. Generate Hypotheses

From the program's seed questions and any remaining open questions from .wiki/overview.md:

  • Pick the 2-3 most promising questions for this iteration
  • Generate search queries targeting these specific questions

3. Search

Launch search-orchestrator with the queries. Receive ranked, deduplicated results.

4. Ingest

For each top result: launch wiki-writer (mode: ingest) to compile into wiki pages.

5. Evaluate

After ingestion, assess:

  • Questions answered: how many of the iteration's questions got substantive answers?
  • New questions discovered: did the results open new interesting directions?
  • Confidence changes: did any pages get upgraded/downgraded?
  • Contradiction count: any new contradictions flagged?

6. Keep or Discard

  • If quality metrics improved (questions answered > 0, net confidence up): keep (commit changes)
  • If no meaningful progress or quality degraded: discard (rollback to baseline)
  • If metric plateau (same scores as last iteration): stop — further iterations won't help

7. Continue or Stop

  • If iteration < max (3): continue to next iteration with updated questions
  • If question saturation (all seed questions answered): stop early
  • If metric plateau: stop early

Output

After the loop completes:

  • Write a deep-dive summary page to .wiki/pages/<topic>-deep-dive.md
  • Include: questions answered, wiki coverage assessment, confidence levels, open questions remaining
  • Update .wiki/log.md with iteration summary

Read the full file on GitHub · 60 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. 1mo ago First seen · 60 lines · 28 tokens per session scan A e727bac0a340

Subscribe to this mod's changes

research-loop is an agent published in the GitHub repository Oshayr/LLM-Wiki (50 stars, last pushed 5mo ago), licensed MIT. It adds 28 tokens to every session and 547 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other agents, from other repositories

ia-database-guardian

Reviews database schema, constraints, and migration code for safety. Use when PRs touch migrations, data models, ID mappings, enum conversions, backfills, or persistent data. Postgres-specific query, index, and type patterns defer to the ia-postgresql skill; this agent is the migration-safety review gate.

iliaal/whetstone · 69 tokens

ia-best-practices-researcher

Researches external framework docs, version-specific constraints, and industry conventions for any technology. Use when you need authoritative external documentation.

iliaal/whetstone · 34 tokens

code-explorer

Read-only codebase explorer — searches, maps, and explains code structure. Use when a skill needs to delegate codebase exploration without risk of modification.

harnessprotocol/harness-kit · 34 tokens

reviewer-opus

Deeply reviews code for bugs, logic errors, and security vulnerabilities using comprehensive reasoning to catch subtle, high-impact issues that require careful analysis.

Joncik91/ucai · 32 tokens

ingest-release

Record a single release tag as a git-release document in an AKB vault — release notes from the matching GitHub Release (annotated tag message fallback), commits bucketed by convtype. Requires range commits pre-ingested.

dnotitia/akb · 49 tokens

aw-analyst

Deep analysis agent for GitHub Agentic Workflow (gh-aw) files. Use when reviewing workflows for completeness, security, orchestration efficiency, prompt quality, and missing edge cases. Triggers on workflow review, analysis, or audit requests. Examples: Context: User wants a thorough review of a workflow file. user…

zircote-plugins/github-agentic-workflows · 207 tokens