Skip to content

dekdee/ai-agent-from-scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 AI Agent From Scratch

This is a simple example of building an AI Agent that can:

  • Perform math calculations
  • Reverse strings
  • Answer simple questions

It runs a local LLM (via Ollama) and uses Python tools to execute tasks.

🚀 Setup

✅ Install Python >=3.8
✅ Install Ollama: https://ollama.com

🔧 Installation

git clone <repo-url> ai-agent-from-scratch
cd ai-agent-from-scratch

# (optional) create virtualenv
python -m venv venv
source venv/bin/activate

pip install -r requirements.txt

Make sure Ollama is running:

ollama serve
ollama pull llama2

🧪 Run

python main.py

You can then type questions like:

  • Calculate 15 plus 7
  • Reverse hello world
  • Who are you?

🧹 Notes

  • The agent always responds in JSON and picks the correct tool.
  • You can add more tools in tools.py.

📜 License

MIT

About

0-1 ai agent from scratch tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages