A minimal AI agent built from raw HTTP calls — no LangChain, no SDKs, no frameworks. Supports Anthropic Claude, OpenAI GPT, and Google Gemini through a unified provider interface. Includes a comprehensive evaluation harness with scoring.
| Feature | This Project | Typical Tutorials |
|---|---|---|
| Framework-free | ✅ Raw HTTP calls only | ❌ Uses LangChain/LlamaIndex |
| Multi-provider | ✅ Anthropic + OpenAI + Gemini | ❌ Usually one provider |
| Evaluation harness | ✅ 8+ scenarios with scoring | ❌ No systematic testing |
| Production design | ✅ Clean abstractions, type hints | ❌ Scripts, not software |
| Portfolio-ready | ✅ Tests, docs, CI/CD, structure | ❌ Single-file scripts |
# Clone and setup
git clone https://github.com/YOUR_USERNAME/ai-agent-from-scratch.git
cd ai-agent-from-scratch
# Setup virtual environment
python -m venv .venv
source .venv/bin/activate # Mac/Linux
# .venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Configure API key (get one at console.anthropic.com)
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
# Run the agent
python -m python.main