Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building AI Agents — Workshop Starter

A hands-on workshop for building AI agents with Vercel AI SDK and OpenRouter. By the end you'll have a working agent with tools, model swapping, and a mini-eval — all in a single file.

Duration: 90 minutes · Stack: TypeScript, Vercel AI SDK, OpenRouter


Prerequisites


Setup

1. Clone the repository

git clone <repo-url>
cd workshop-ceeia

2. Install dependencies

npm install

This installs:

  • ai — Vercel AI SDK
  • @openrouter/ai-sdk-provider — OpenRouter provider for the AI SDK
  • zod — Schema validation for tool inputs

3. Create the .env file

cp .env.example .env

Add your OpenRouter API key:

OPENROUTER_API_KEY=sk-or-xxxxxxxxxxxxxxxxxxxxxxxx

Tip: Make sure your OpenRouter account has a small credit balance ($2–5 is enough for the workshop).

4. Verify the setup

npm start

You should see the agent call the getWeather tool and return a final answer about Lisbon's weather.


How to run

npm start

This runs index.ts with the environment variables loaded from .env.


Project structure

workshop-ceeia/
├── index.ts           # Agent code (everything happens here)
├── package.json       # Dependencies and scripts
├── .env.example       # Template for environment variables
├── .gitignore         # Excludes .env, node_modules, logs
└── README.md          # This file

What you'll build (agenda)

Step Topic Decision
1 First model call
2 Add a tool + the loop Decision 1: The Harness
3 Swap the model Decision 2: Selecting the Model
4 Mini-eval (PASS/FAIL) Decision 3: Evals
Vercel AI SDK wiring Decision 4: Framework

The full facilitator script is in AI_Agents_Workshop_SCRIPT.md.


The four decisions behind every agent

  1. Harness — The loop, tools, context, and stop conditions around the model
  2. Model — Which brain powers the agent (kept swappable)
  3. Evals — Measurable tests to validate behavior before shipping
  4. Framework — The library that wires it all together (chosen last)

Useful links

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages