Vercel launched a free course on building AI agents from scratch.
Vercel has launched a new course on its educational platform, Vercel Academy — Build Your Own AI Coding Agent Harness. It focuses on creating infrastructure around an AI agent — what developers call a harness — from scratch, using AI SDK, Vercel Sandbox, and just-bash. The course author is Joel Hooks.
The Tech AI
Get the key points in seconds - a short summary from The Tech AI.
Harness — a system centered around an agent that addresses security and context management challenges. In the TeensyCode course, participants use the AI SDK, Vercel Sandbox, and Node.js 20+ to build a system consisting of 11 modules. The practice includes working with tools such as read, bash, grep, delegating tasks to sub-agents, and managing the sandbox lifecycle. The final project involves running the harness on a real project to debug context and select appropriate tools.
What is a harness and why is it needed
A simple loop with several tools works only as a demonstration. Problems arise when agents are attempted to be used for real tasks: a 5000-line file remains in the context forever, an unrestricted bash tool can execute a dangerous command, and instead of performing a module refactoring request, the agent merely explains it. Long tasks fill the context window, causing the agent to lose its own instructions, while a cloud sandbox costs money for every minute of operation and resets on timeout.
A harness is a system around the agent that solves the listed problems. Within the course, participants build such a system called TeensyCode.
What the course consists of
The material is divided into 11 modules, each subsequent one appearing because the previous step broke something. For example, the read tool is added because the chatbot cannot see files, and bash is added because the agent cannot execute commands, but after that, it gains the ability to accidentally delete data.
The course covers:
— the agent loop with read, grep, write, edit, bash, task, and askUser tools
— tool design and a permission system — from a simple allowlist to customizable action confirmation
— a system prompt with Agency, Guardrails, and Handling Ambiguity structure, as well as connecting an AGENTS.md file for customization to a specific project
— sandbox abstraction — a unified Sandbox interface with local, in-memory virtual, and cloud implementations
— context management — trimming old messages, limiting tool output size, and caching
— task delegation to subagents — with division into researcher and executor roles
— sandbox lifecycle, including durable workflows
— user interaction through structured questions
— result planning and verification
— interfaces — command line, terminal interface, and web
— extensibility — an event system, skills, and registration of custom tools.
The first six modules are practical — participants write code, run it, and check the result. The seventh module is conceptual, as the sandbox lifecycle relies on durable workflows, which are difficult to demonstrate safely locally. The remaining modules combine practice with concept analysis.
The course concludes with a capstone — participants run their own harness on a real project and add, for example, rate limiting on authentication routes, observing where the context overflows, where the agent chooses the wrong tool, and where the subagent receives incorrect instructions.
What you need to know before starting
The course is designed for developers familiar with TypeScript and async/await, as well as basic terminal skills. You will need the AI_GATEWAY_API_KEY environment variable and Node.js version 20 or higher, or Bun. Vercel recommends completing the Building Filesystem Agents course beforehand.
Course technologies
AI SDK is used for the tool loop, streaming, and context trimming; AI Gateway for routing between models; Vercel Sandbox as an isolated remote machine with a file system, git, and npm; just-bash as an in-memory virtual file system and simulated bash; Vercel Workflow for durable sandbox lifecycle scenarios; and Zod version 3 for tool input schemas.
How this benefits your career
The topic of AI agents and harness engineering is currently one of the most in-demand areas in development — companies are looking for specialists who understand not only how to call a model but also how to build a secure and manageable system around it. The course provides practical experience in creating such a system from scratch, rather than a superficial acquaintance with a ready-made framework, making the skill rarer and more valuable in the job market.
The Tech on Telegram Follow The Tech on Telegram
Keep up with the latest technology and startup news.