techwithtim/PythonAIAgentFromScratch — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a simple Python AI agent from scratch that I can run from the command line. I want to type a question or task, have the agent think through what it needs, use a few helper tools when useful, and then give me a clear final answer.

Please keep it easy to understand and organized, with one main file to run the agent and a separate place for the tools it can use. Include a sample environment file for any API keys or settings, plus a requirements file so I can install everything quickly.

Make the chat loop feel natural, handle errors without crashing, and print enough detail that I can see what the agent is doing when it chooses a tool. Keep the code beginner friendly and commented, since I want to learn how the pieces fit together. Look up current docs online if you need to.

Want more depth? Deep Reverse