Build AI Agents from First Principles

Learn the engineering behind AI agents by building from a first LLM call to practical agent workflows in runnable Python tutorials.

Stars
★ 394
Last updated
16d ago
License
MIT
Primary language
Python

At a glance

How it runs
Framework
Works with
Universal · cross-platformOpenAI API · Claude API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python 3.11+uvAnthropic API key and/or OpenAI API keyShell / CLINetwork accessLocal filesystemMCP Server
Typical use
Software engineers who want to implement tool use and an agent loop after starting with a basic API call.
Not a fit if
  • Users who want a ready-to-deploy agent instead of hands-on tutorials
  • Teams unwilling to configure Anthropic or OpenAI API keys
Website
agenticloops.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-05latest release v2026.04.07 (2026-04-07)

What does this agent do, and when should you use it?

This repository is a hands-on tutorial course for engineers, progressing from a single LLM API call to an agent loop. Lessons pair Python scripts with READMEs, first implementing prompts, chat history, tool use, and the loop from scratch, then covering workflow patterns, context, memory, RAG, multimodality, safety, and evaluation. Tutorials run independently and call Anthropic and/or OpenAI APIs; tool results are added to context so the loop can continue until the model can answer. Further modules cover MCP, subagents, framework implementations, and production deployment, with several marked as coming soon. The repository supplies learning material and example code, not a ready-hosted or deployable agent.

A learner copies .env.example to .env, configures Anthropic and/or OpenAI credentials, then runs a tutorial script with uv run --directory <tutorial> python <script>.py. Examples call model APIs, track tokens, maintain message history, execute tool calls, and append tool results to context; the agent loop repeats until the model can answer. Other lessons demonstrate RAG and memory, prompt chaining, routing, parallelization, human review, structured output, streaming, guardrails, and evaluation.

  1. Software engineers who want to implement tool use and an agent loop after starting with a basic API call.
  2. Developers preparing to explain context, inference loops, and tool calls in interviews.
  3. Application teams learning when to use chaining, routing, parallelization, or orchestration patterns.
  4. Developers exploring tutorial examples for context engineering, memory, and RAG.
  5. Engineers learning to test, evaluate, trace, and benchmark non-deterministic agents.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • brew install uv
Config files
.env.example .env
Runtime
Python 3.11+
Install notes cover
macOS

How do you install or deploy this agent?

The documented setup uses Python 3.11+, uv, Git, and an Anthropic and/or OpenAI API key. The README shows installing uv with Homebrew or pipx, cloning the repository, copying the environment file, and running the first example:

brew install uv

git clone https://github.com/agenticloops-ai/agentic-ai-engineering.git
cd agentic-ai-engineering
cp .env.example .env
uv run --directory 01-foundations/01-simple-llm-call python 01_llm_call_anthropic.py

Add the provider credentials needed by the examples to .env. SETUP.md contains the full setup instructions.

How do you use this agent?

Choose a tutorial directory and run one of its Python scripts; each lesson README explains the concepts and learning objectives. The quickstart invocation is:

uv run --directory 01-foundations/01-simple-llm-call python 01_llm_call_anthropic.py

If a module is missing, the FAQ says to run this in the lesson directory:

uv sync

Scripts need credentials for the provider used by the example. The Loop Engineering, Frameworks, and Production modules are marked as coming soon.

What are this agent's strengths and limitations?

Pros
  • Builds the API call, tool executor, and agent loop from scratch before introducing framework abstractions.
  • Provides self-contained Python scripts and READMEs, so lessons can be run independently or followed as a course.
  • Covers evaluation, tracing, red teaming, and benchmarking alongside basic agent construction.
  • Documents examples using both Anthropic and OpenAI APIs for learning across provider paths.
Limitations
  • You supply Anthropic and/or OpenAI API keys, and model usage may incur provider charges.
  • This is a tutorial repository, not a ready-to-deploy agent or hosted service.
  • Running lessons requires Python 3.11+ and uv, plus comfort using a shell.
  • The Loop Engineering, Frameworks, and Production modules are marked as coming soon.

How does this agent compare with similar options?

The README implicitly contrasts this course with starting from an agent framework: it first builds primitives with raw APIs and a loop, while a planned Frameworks module compares multiple frameworks.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Build AI Agents from First Principles This agent 58 · Major gaps FrameworkFree + model costs ★ 394 16d ago Python OpenAI API · Claude API
Hello-Agents 53 · Major gaps Web appFree + model costs ★ 88k 8d ago Python OpenAI API
LangChain & LangGraph Agent Course 43 · Major gaps CLIFree + model costs ★ 1.8k 21d ago — —
Agent Systems Handbook 62 · Some gaps Web appFree ★ 315 1mo ago MDX —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
58/ 100 5-point scale 2.9 / 5
Trust 11/29
Reliability 6/14
Adaptability 14/18
Convention 11/18
Effectiveness 12/13
Verifiability 4/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

The samples show tool calls, conversation history, web search source collection, and a human checkpoint in the content workflow; a test example also demonstrates blocking dangerous commands. Credit is limited because the excerpts do not explain API key protection, consistent confirmation before tool authorization, or rollback of external effects. Dependency ranges are broad, and repository provenance is unverified.

Reliability6 / 14 · 2.1/5

The code includes an iteration cap, rate limit retries, and a message when the cap is reached; the README also lays out a progressive course path. However, its CI description conflicts with the supplied workflow: the workflow searches under lessons/, while the README lists numbered course directories. That weakens consistency. The excerpts do not establish ongoing availability of dependencies across lessons.

Adaptability14 / 18 · 3.9/5

The README identifies learners with Python basics and no AI/ML background, progresses from foundations through patterns and evaluation, and describes standalone lessons plus local and Codespaces use. Boundaries are only partly clear: several later modules are marked coming soon while their descriptions cover production and security topics. The primary use and triggers are course learning and running examples.

Convention11 / 18 · 3.1/5

The module navigation, course structure, quickstart, setup link, and FAQ are clear, and an MIT license is supplied. Deductions reflect a root configuration that excludes lessons from package discovery while CI searches under lessons/, and the absence in the packet of a changelog, stated limitations, or clear maintenance responsibility. A version is present in pyproject.toml.

Effectiveness12 / 13 · 4.6/5

The course progresses from a single API call to tool loops, evaluation, safety, and architecture patterns, with runnable scripts, examples, and capstone projects. Running examples requires Python and Anthropic and/or OpenAI API keys, which may incur API costs. The supplied material does not quantify cost or establish completion across all lessons, so cost-benefit is not fully supported.

Verifiability4 / 8 · 2.5/5

The README maps course topics to directories and setup instructions, and the supplied source shows concrete iteration, retry, and tool-result handling. The test excerpt adds behavioral contracts, but there is not enough cross-course source or result evidence to verify the full set of promotional claims. The assessment distinguishes visible implementation from unverified course coverage and production capability.

Risks and how to mitigate them
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • Configure the required API keys as described in SETUP.md before running examples; external model calls may incur costs.
  • The README's CI description and the supplied workflow use different course directory paths, so the excerpts do not establish that every lesson is automatically checked.
  • The supplied files are a repository sample; unseen lessons, dependencies, and safeguards remain unknown.
Evidence confidence: Low Reviewed Nov 11, 2026 Reviewed revision 7fa90c39c561
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/agentic-ai-engineering.svg)](https://followagents.com/en/agents/agentic-ai-engineering)
<a href="https://followagents.com/en/agents/agentic-ai-engineering"><img src="https://followagents.com/badge/agentic-ai-engineering.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v2026.04.07 v2026.04.07 — Testing & Evaluation Module
    Release notes excerpt
    Testing & Evaluation Module New module covering the full eval lifecycle for AI agents — from unit testing to production eval harnesses. Tutorials | # | Tutorial | What It Covers | |---|----------|----------------| | 1 | Unit Testing Agents | Mock LLMs, tool isolation, behavioral contracts | | 2 | Evals | Golden datasets, LLM-as-judge, pass@k/pass^k metrics | | 3 | Tracing & Debugging | Span-based traces, execution replay, failure analysis | | 4 | Red Teaming & Safety | Prompt injection, guardrail verification, ASR measurement | …
    View on GitHub ↗
  2. v2026.02.18
    Release notes excerpt
    First public release of Agentic AI Engineering — a hands-on tutorial series for building AI agents from scratch. What's Included 🎓 Module 01 — Foundations Build everything from scratch to understand what's really happening under the hood: 1. [Simple LLM Call](https://github.com/agenticloops-ai/agentic-ai-engineering/tree/main/01-foundations/01-simple-llm-call) — API basics, token tracking 2. [Prompt Engineering](https://github.com/agenticloops-ai/agentic-ai-engineering/tree/main/01-foundations/02-prompt-engineering) — System messages, few-shot learning, structured output …
    View on GitHub ↗

FAQ

Will running the tutorials cost money?
The repository is MIT licensed, but examples require Anthropic and/or OpenAI API keys; any model charges depend on the provider.
Can I run only one lesson?
Yes. The README describes each tutorial as self-contained and idempotent, so you can start at any lesson and run its script.
What environment do I need?
Lessons use Python 3.11+ scripts and uv to run them. You also need credentials for whichever API provider the example uses.
Does this provide an agent I can deploy to production?
No. It provides construction tutorials and example code; production deployment is listed as a coming-soon module.
Is Build AI Agents from First Principles open source?
Yes. The source code is on GitHub (agenticloops-ai/agentic-ai-engineering) under the MIT licence.
Is Build AI Agents from First Principles safe to use?
FollowAgents' FARS review (Nov 11, 2026) scored Build AI Agents from First Principles 11/29 on trust and safety. The review did not find these safety controls in the source: rollback or recovery path. Before giving it real accounts or data: Back up first, or work on a git branch or snapshot, so its changes can be undone.
Is Build AI Agents from First Principles still maintained?
Yes. The latest commit on GitHub is from 2026-11-05, within the last 30 days. The latest release is v2026.04.07 (2026-04-07).
Who makes Build AI Agents from First Principles?
Build AI Agents from First Principles is published on GitHub by the account agenticloops-ai. FollowAgents has not verified which person or company is behind that account.
What is Build AI Agents from First Principles's official website?
The project's GitHub repository lists http://agenticloops.ai as its website. That link is set by the repository owner; the source code itself is on GitHub (agenticloops-ai/agentic-ai-engineering).
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts