Skip to content

okonma01/agents-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agents-101

An introduction to AI agents from first principles, using plain Python and an object-oriented design.

Open in Google Colab

What's inside

File Description
notebook.ipynb Main interactive tutorial - run in Google Colab or locally
TUTORIAL.md Prose version of the tutorial for reference

notebook.ipynb

A step-by-step Jupyter notebook that builds a simple AI agent from scratch:

  1. The Simplest Agent — a base Agent class that reads a file (perception) and writes a response (action).
  2. Giving the Agent ToolsAgentV2 subclass that holds a dictionary of callable tools (get_current_time_tool, list_files_tool) and dispatches to them via a run() method.
  3. Giving the Agent a BrainAgentV3 subclass that adds a think() method simulating an LLM: it parses a natural language instruction and returns the right tool key.

The final cell shows exactly how to swap the mock think() for a real LLM (e.g. Google Gemini) by subclassing AgentV3 and overriding a single method.

Requirements

  • Python 3.9+ (uses zoneinfo from the standard library)
  • Jupyter or VS Code with the Jupyter extension

No external packages are required to run the tutorial. The Gemini upgrade snippet in the conclusion requires google-generativeai.

About

Introduction to AI Agents from First Principles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors