# pguso/ai-agents-from-scratch

Demystify AI agents by building them yourself. Local LLMs, no black boxes, real understanding of function calling, memory, and ReAct patterns.

Repository: https://github.com/pguso/ai-agents-from-scratch
Canonical: https://ross.abutalabs.com/products/ai-agents-from-scratch
Language: JavaScript
License: MIT
License Family: permissive
Topics: ai-agents, educational, function-calling, llm, llm-agent, node-llama-cpp, react-agent, tutorial
Last push: 2026-07-24T15:40:39+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 35, longevity 22
- inputs: {"age_days": 314, "days_push": 40, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4552, forks 669 (observed 2026-08-28T04:08:53.326588+00:00)

## What it is
An educational repository teaching how to build AI agents from first principles using local LLMs and node-llama-cpp in JavaScript. It provides a progressive series of runnable examples covering LLM basics, system prompts, function calling, memory, and ReAct patterns without frameworks.

## Use cases
- learn how ai agents work under the hood
- build an ai agent without frameworks
- understand function calling with local llms
- implement the react agent pattern from scratch
- run llm agents locally with node-llama-cpp
- tutorial on agent memory and tool use
- understand agent architectures before using langchain

## When to choose
- you want deep conceptual understanding of agent internals rather than a production framework
- you prefer learning by running and modifying small code examples
- you want to use local models for privacy or cost reasons
- you are a JavaScript/Node.js developer new to AI agents

## When to avoid
- you need a production-ready agent framework with batteries included
- you want hosted LLM integrations and managed infrastructure
- you need Python tooling (though a companion Python repo exists)
- you lack the hardware to run local LLMs (8GB+ RAM required)

## Facets
- artifact type: learning-resource
- maturity: active
- function: agent-framework, llm-inference, prompt-engineering, developer-tools
- domain: artificial-intelligence, large-language-models, tutorials, education
- platform: cross-platform
- tags: local-llm, node-llama-cpp, react-pattern, function-calling, hands-on-tutorial, no-framework, ai-agents, nodejs

## Member repositories
- pguso/ai-agents-from-scratch (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:53.326588+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:03.939177+00:00, confidence not recorded.
  - readme: https://github.com/pguso/ai-agents-from-scratch (fetched 2026-08-28T04:08:53.326588+00:00, sha 55343527f7c8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
