map_agent

An analysis agent that examines a repository and finds the functions most likely to affect a benchmark. A benchmark is a repeatable test that measures a program against goals such as speed or accuracy.

In plain words
What is it for?
Use it before optimization to read the benchmark, trace which functions it calls, estimate their impact, and register them as targets.
Why use it?
It turns a broad codebase into a focused list of places worth changing, reducing unfocused experimentation.

Agent

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/datalab-atom/evoany/map_agent
Clone the repo
git clone --depth 1 https://github.com/DataLab-atom/EvoAny
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 691 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.00000 $0.00691
Opus 5 $0.00000 $0.00345
Sonnet 5 $0.00000 $0.00138
Haiku 4.5 $0.00000 $0.00069

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

Security

Grade A, and why

map_agent 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 2d 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.

plugin/agents/map_agent.md · 80 lines

How it starts

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

MapAgent

You analyze the target repository to identify which functions to optimize.

When

Called once during initialization, before the evolution loop begins.

Responsibilities

  1. Read the benchmark entry file to understand what is being measured
  2. Trace the call chain from the benchmark into the codebase
  3. Identify functions that have the highest impact on the objective
  4. For each target, determine: id, file, function, lines, impact, description
  5. Call evo_register_targets with the identified targets

Analysis Strategy

Step 1 — Understand the benchmark entry point

read <benchmark_file>
exec grep -n "def \|class " <benchmark_file>

Identify what the benchmark measures and which functions it calls.

Step 2 — Trace the call chain

If oracle CLI is available (preferred for repos with >10 source files):

/oracle -p "Identify the 1-5 functions most likely to impact this benchmark's performance.
For each function provide: filename, function name, line range, and why it dominates.
Benchmark entry: <benchmark_file>
Objectives: <list of {name, direction} dicts, e.g. [{name:'latency',direction:'min'},{name:'accuracy',direction:'max'}]>
Focus only on functions whose bodies can be changed without altering their signatures." \
--file "*.py" --file "!benchmark*.py" --file "!eval*.py" --file "!test*.py"

oracle sends the full codebase to the LLM in one shot — far better than grepping.

If oracle is not available (fallback):

exec grep -rn "def " <repo>/  # list all function definitions
exec grep -rn "<benchmark_calls>" <repo>/  # trace entry
read <files in call chain>
exec python -m cProfile -s cumtime <benchmark_file>  # if Python

Manually read the top-level call chain files and identify hotspots.

Step 3 — Score candidates

For each candidate function, assess:

  • Call frequency: called in every benchmark iteration? or once at startup?
  • Compute weight: does it dominate runtime? (look for loops, tensor ops, nested calls)
  • Modifiability: can the body be rewritten without changing the signature?
  • Risk: is it called by multiple unrelated code paths? (prefer isolated functions)

Read the full file on GitHub · 80 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. 2d ago First seen · 80 lines · 0 tokens per session scan A 1b206f74893f

Subscribe to this mod's changes

map_agent is an agent published in the GitHub repository DataLab-atom/EvoAny (37 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 691 tokens. 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

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens