Complete AI Training
Sign inGet my AI kit

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI agent for game developers

Memory Leak Hunt Agent

A confirmed memory leak cause, a fix tested by repeat runs, and memory staying flat across a long session

Memory Leak Hunt Agent: what goes in, what the agent does and what you get

What it does

A game or web app runs fine for ten minutes and then crawls after two hours, and the profiler shows a wall of objects. This agent runs a scripted session that repeats the same actions, such as opening and closing a menu or loading and leaving a level, and takes memory snapshots at set intervals. It compares the snapshots to find object types whose counts keep growing, then narrows suspects by tracing what holds on to them, such as an event listener never removed or a cache without a limit. It proposes a likely cause for the developer to test. After each fix it reruns the same session and compares growth, repeating until memory stays flat within the allowance. The developer approves each code change. Edge case: memory that grows for the first 5 minutes and then plateaus is treated as warm-up, not a leak.

How it works

Follow the arrows from top to bottom. The orange dashed arrow is the loop: when a check fails, the agent goes back and tries again.

Start and resultWhat it doesA check on its own workWaits for your OKGoes back and retries
Yes, continueApprovedYes, continueNoNo 1 STARTS WHEN Memory growth reported 2 USES A TOOL Run the scripted session and take snapshots at fixedintervals 3 DOES Skip warm-up and compare snapshots to find steadilygrowing object types 4 CHECKS THE RESULT Does growth continue steadily after warm-up? If not: Lengthen the session or script the leakingaction more heavily and snapshot again. Back to step 2. 5 USES A TOOL Trace what holds on to the growing objects 6 DOES Name the likely cause and propose a code change 7 YOU APPROVE Developer approves the code change 8 USES A TOOL Rerun the same session with the change and takesnapshots 9 CHECKS THE RESULT Is memory growth now below the allowance? If not: Revert, move to the next suspect and traceagain. Back to step 5. 10 RESULT Leak report with cause, fix and before and aftercharts
Read the steps as a list
  1. Memory growth reported
  2. Run the scripted session and take snapshots at fixed intervals
  3. Skip warm-up and compare snapshots to find steadily growing object types
  4. Does growth continue steadily after warm-up?If not: Lengthen the session or script the leaking action more heavily and snapshot again. Back to step 2.
  5. Trace what holds on to the growing objects
  6. Name the likely cause and propose a code change
  7. Developer approves the code changeThe agent waits here for your OK.
  8. Rerun the same session with the change and take snapshots
  9. Is memory growth now below the allowance?If not: Revert, move to the next suspect and trace again. Back to step 5.
  10. Leak report with cause, fix and before and after charts

How it decides

It treats an object type as leaking when its count grows steadily across at least 5 snapshots after warm-up, and it accepts a fix only when growth falls below the allowance in a repeat run.

  • Ignore the first 5 minutes or first 3 snapshots as warm-up
  • Treat growth above 1 MB per 10 minutes as a leak
  • Test one suspect at a time
  • Stop after 4 suspects and ask the developer for direction

Make it yours

Every agent is a starting point. You choose these settings for your own situation.

  • Session script and snapshot interval
  • Growth allowance (default 1 MB per 10 minutes)
  • Warm-up length
  • Profiling tool
  • Maximum suspects to test

What keeps you in control

It always asks you first

  • Developer approves each code change before it is run

Hard limits

  • Never change code without approval
  • Always run tests against the same script for fair comparison

It stops when

  • Done: Repeat runs show memory flat within the allowance
  • Stop: No suspect explains the growth after 4 attempts, so the agent hands the snapshot findings to the developer

Set it up

We guide you through the set-up, step by step

Members get the full set-up guide for this agent. No technical skills needed: you copy, paste and upload.

10 minto set it up in your AI
5 AIsChatGPT, Claude, Copilot, Gemini, Grok
  • One set of instructions to paste into your AI, with the clicks for ChatGPT, Claude, Microsoft 365 Copilot, Gemini and Grok
  • The agent then walks you through connecting your own data, one source at a time
  • A downloadable copy with the flow chart, the rules and the full guide
Get access to this agent

An example run

What happensA 90 minute session grows from 410 to 1,100 MB. Snapshots show 'MenuEntry' objects growing by 1,200 per 10 minutes, held by an event listener on the inventory screen. The agent proposes removing the listener on close. A rerun shows 410 to 452 MB, plateauing. The developer approves the change, and a second run confirms.

More agents for game developers