Get up and running with AI Agents from Scratch in 10 minutes.
- Python 3.10 or higher
- 8GB+ RAM (for running local models)
- ~5-10GB free disk space (for model files)
pip install llama-cpp-pythonOptional but recommended:
# Create a virtual environment first
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install llama-cpp-pythonYou need a GGUF model file. Here's the easiest way:
- Go to https://huggingface.co/bartowski/Meta-Llama-3-8B-Instruct-GGUF
- Download
Meta-Llama-3-8B-Instruct-Q4_K_M.gguf(~5GB) - Place it in the
models/directory - Rename it to
llama-3-8b-instruct.gguf(optional, for simplicity)
Alternative models:
- Mistral 7B: https://huggingface.co/bartowski/Mistral-7B-Instruct-v0.2-GGUF
- Gemma 7B: https://huggingface.co/bartowski/gemma-7b-it-GGUF
python setup_check.pyThis checks:
- Python version
- Dependencies
- Models directory
- Repository structure
python complete_example.pyThis will run examples from all 10 lessons. You can also open complete_example.py and modify the model path or comment out lessons you want to skip.
Now read the lessons in order:
lessons/01_basic_llm_chat.md- Understanding the basicslessons/02_system_prompt.md- Adding behaviorlessons/03_structured_output.md- Making it reliable- ... and so on through lesson 10
Each lesson builds on the previous one.
pip install llama-cpp-pythonCheck that:
- The model file is in
models/directory - The path in
complete_example.pymatches the actual filename - The file has a
.ggufextension
Try a smaller model or smaller quantization:
- Q4_K_M: ~5GB RAM
- Q5_K_M: ~6GB RAM
- Q8_0: ~8GB RAM
This is normal for CPU inference. Each response takes 10-30 seconds depending on:
- Your CPU speed
- Model size
- Response length
- Read philosophy.md to understand the approach
- Work through lessons one at a time
- Modify the agent to experiment
- Check examples/ for complete code examples
- Check existing GitHub Issues
- Read the lesson markdown files carefully
- Ask questions in GitHub Discussions
- Don't skip lessons - they build on each other
- Run the code - reading isn't enough
- Experiment - modify examples and see what happens
- Be patient - local inference is slow but worth it
- Read comments - the code explains the "why"
Happy learning! 🚀