Ai Agents Workshop banner
rahulladumor rahulladumor

Ai Agents Workshop

AI community

Description

2-hour workshop: build an AI agent in under 150 lines of Node.js. Concepts, architecture, failure modes, and live demo code. Anthropic SDK + Claude Haiku 4.5.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Building AI Agents

A working AI agent in under 200 lines of Node.js — with a live browser visualizer that shows the loop executing in real time.

Built as teaching material by [Rahul Ladumor](https://rahulladumor.in). Clone it, run it, read the code. No framework. No LangChain.


What you'll understand after running this

  1. What an AI agent actually is — and how it differs from a chatbot
  2. The one loop every agent ever built is running
  3. How tool calls, tool descriptions, and structured errors shape agent behaviour
  4. Five common ways agents fail in production — and how to defend

The core idea (in one picture)

flowchart TD
    Goal([Goal]) --> LLM[LLM call]
    LLM --> Decide{Tool needed?}
    Decide -- yes --> Execute[Execute tool]
    Execute --> Observe[Observe result]
    Observe --> LLM
    Decide -- no --> Return([Final answer])

**An AI agent is a system that pursues a goal by running a loop in which an LLM decides, at each step, what action to take next.**

Three parts: **Goal. Loop. Decisions at each step.** Miss one — it's not an agent.


Quick start (3 steps)

# 1. Clone
git clone https://github.com/rahulladumor/ai-agents-workshop.git
cd ai-agents-workshop

# 2. Install + add your API key
npm install
cp .env.example .env
# Edit .env and paste your Anthropic API key

# 3. Run
node --env-file=.env agent.js
# → Agent running on http://localhost:3000

Then **open http://localhost:3000 in a browser** — there's a live loop visualizer built in. Type a question, watch each iteration appear: the LLM deciding, tool calls firing with their input and result, the final answer. There's also a **"weaken tool description" toggle** that breaks the agent live so you can see hallucination happen in real time.

Prefer the terminal? The raw endpoint still works:

curl -sX POST http://localhost:3000/ask \
  -H 'Content-Type: application/json' \
  -d '{"question":"How many students in CSE this semester?"}'