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

No packages published

Languages