# AI use cases for Agent 2 (aaravshah1311/Agent-2)

Repo: [aaravshah1311/Agent-2](https://github.com/aaravshah1311/Agent-2) | Use cases: 4 | Page: https://dedupedai.com/use-cases/aaravshah1311-agent-2/

Agent-2 is a Python agent harness that runs on your machine with your own Gemini API keys and can write code, run terminal commands, manage files, and coordinate tools.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Document an unfamiliar codebase in one pass: https://dedupedai.com/use-cases/aaravshah1311-agent-2/document-unknown-codebase/
- Fix a bug with a diff review before each write: https://dedupedai.com/use-cases/aaravshah1311-agent-2/fix-bug-with-reviewed-diffs/
- Drive Burp or ZAP scans from the agent: https://dedupedai.com/use-cases/aaravshah1311-agent-2/authorized-web-security-scan/
- Run the agent in a browser with live tool calls: https://dedupedai.com/use-cases/aaravshah1311-agent-2/watch-agent-work-in-browser/

## How to document an unfamiliar codebase in one pass with Agent 2

Repo: [aaravshah1311/Agent-2](https://github.com/aaravshah1311/Agent-2) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Generate a project doc that every later agent prompt reads back as fact.

**Who it is for:** A developer who has just inherited or joined a project and needs a quick map of it before changing anything.

**The problem:** Reading an unfamiliar repo from scratch is slow, and notes about it go stale or never get written.

**The outcome:** A .agent2/agent2.md file that describes the project, which the agent reuses in every later prompt.

### Steps

1. Run `git clone https://github.com/aaravshah1311/Agent-2.git` and then `cd Agent-2`.
2. Run `python run.py` to create the virtual environment, install dependencies, and enter your Gemini API key.
3. Run `python run.py --cli` and point the agent at the project you want documented.
4. Type `/init` so the agent walks the project and writes .agent2/agent2.md.
5. Open .agent2/agent2.md and correct anything the agent got wrong before relying on it.

### Prompt to paste into your agent

```text
Use the Agent-2 repo at <path-to-agent2> to run /init on the project at <path-to-project>. Expected output: a generated .agent2/agent2.md inside the project. Verify that the file names the real entry points and build steps of the project.
```

### Caveat

The project doc is only as accurate as what the agent reads from the code and its comments, so review it before trusting it.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aaravshah1311-agent-2/document-unknown-codebase/

## How to fix a bug with a diff review before each write with Agent 2

Repo: [aaravshah1311/Agent-2](https://github.com/aaravshah1311/Agent-2) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Have the agent debug code while you see every change computed before it is written.

**Who it is for:** A developer with a failing test or broken feature who wants the agent to make the fix but wants to inspect each edit.

**The problem:** Letting an agent edit files directly is risky when you cannot see what it is about to change.

**The outcome:** A bug fix in your project, with each file change shown as a diff before it is written.

### Steps

1. Run `python run.py --cli` from the Agent 2 folder.
2. Describe the bug and the command that reproduces it, and ask the agent to find the cause.
3. Watch the inline diffs; they are computed before each write, so review them as they appear.
4. Press Ctrl+B to open the full-screen diff viewer and check the whole session's changes.
5. Run your test command again yourself to confirm the fix.

### Prompt to paste into your agent

```text
Use the Agent-2 repo at <path-to-agent2> in CLI mode to fix the failing test in <path-to-project>. Expected output: the minimal code change and a list of files edited. Verify by rerunning the failing test command yourself and confirming it passes.
```

### Caveat

Agent 2 can run commands and write files in your project, so keep the project under version control so you can revert any change.

Risk, remote script: The agent can run shell commands on your machine, so check each command it proposes that touches your project or system.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aaravshah1311-agent-2/fix-bug-with-reviewed-diffs/

## How to drive Burp or ZAP scans from the agent with Agent 2

Repo: [aaravshah1311/Agent-2](https://github.com/aaravshah1311/Agent-2) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Let the agent work through Burp Suite or OWASP ZAP on a target you are allowed to test.

**Who it is for:** A security tester with written authorization for a web application who wants help triaging proxy and scanner output.

**The problem:** Running a proxy scanner by hand and summarizing its findings takes a lot of repetitive clicking and note taking.

**The outcome:** A short list of findings from Burp or ZAP, gathered and summarized by the agent during an authorized test.

### Steps

1. Install and open Burp Suite or OWASP ZAP on the same machine (inferred).
2. Connect the matching MCP bridge: Burp Suite on :9876 over SSE, or OWASP ZAP on :8282 over streamable HTTP. Both bridges auto-connect off, so connect them yourself (inferred: exact connect steps).
3. Run `python run.py --cli` or `python run.py --web` from the Agent 2 folder.
4. Ask the agent to run its Burp or ZAP tools against the in-scope target and list findings by severity.
5. Check each finding in the scanner's own interface before reporting it.

### Prompt to paste into your agent

```text
Use the Agent-2 repo at <path-to-agent2> with the Burp Suite MCP bridge to review <authorized-target-url> for issues. Expected output: a list of findings with severity and the request that produced each one. Verify that every finding is reproducible in Burp before you report it.
```

### Caveat

The README names Burp and ZAP bridges but does not document the setup steps, so confirm the bridge is connected before trusting any agent result.

Risk, remote script: The agent can run commands and send traffic through your scanners, so only test systems you have written authorization to test.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aaravshah1311-agent-2/authorized-web-security-scan/

## How to run the agent in a browser with live tool calls with Agent 2

Repo: [aaravshah1311/Agent-2](https://github.com/aaravshah1311/Agent-2) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Watch streaming tool calls and multi-tab terminals in a web UI on localhost.

**Who it is for:** A developer who prefers a browser view to a terminal and wants to see every tool call as it happens.

**The problem:** A terminal session makes it hard to keep track of several running commands and the agent's memory and rules at once.

**The outcome:** A browser tab at localhost where you can follow the agent's tool calls and manage memory, rules, keys, and MCP panels.

### Steps

1. Run `python run.py --web` from the Agent 2 folder.
2. Open http://localhost:1311 in your browser.
3. Give the agent a coding task and follow the streaming tool calls as they appear.
4. Open the memory and rules panels to check what the agent is carrying into each prompt.
5. Run `python run.py --dual` instead if you want the browser and the CLI on the same database at once.

### Prompt to paste into your agent

```text
Start the Agent-2 web server from <path-to-agent2> with `python run.py --web` and use it to add a unit test to <path-to-project>. Expected output: the new test file and a streamed log of tool calls. Verify that the test runs and passes when you run it yourself.
```

### Caveat

The web UI runs locally at localhost:1311, and the README describes it as a local tool rather than a hosted service.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aaravshah1311-agent-2/watch-agent-work-in-browser/
