Authorization notice. Agent 2 is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Who it is forA developer who has just inherited or joined a project and needs a quick map of it before changing anything.
The problemReading an unfamiliar repo from scratch is slow, and notes about it go stale or never get written.
The outcomeA .agent2/agent2.md file that describes the project, which the agent reuses in every later prompt.
What you need first
- Python 3.9 or newer
- A free Gemini API key from aistudio.google.com/apikey
- A local project folder you want the agent to work in
- For the security use case: Burp Suite or OWASP ZAP installed, and written permission to test the target
Steps
- Run
git clone https://github.com/aaravshah1311/Agent-2.gitand thencd Agent-2. - Run
python run.pyto create the virtual environment, install dependencies, and enter your Gemini API key. - Run
python run.py --cliand point the agent at the project you want documented. - Type
/initso the agent walks the project and writes .agent2/agent2.md. - Open .agent2/agent2.md and correct anything the agent got wrong before relying on it.
Prompt for your agent
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.
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page