Brown CS 0190 builds agents from scratch, teaches injection
TL;DR
- Brown's CSCI 0190 Fall 2026 lab has students build an LLM agent from scratch in Pyret, using Ollama to run a local model.
- The lab specifies Message, Tool, and Decision data types, and progresses from a shout tool to file access and a full agentic loop.
- Students finish by demonstrating indirect prompt injection, framed as a central unsolved security problem in deployed agents.
Brown University's CSCI 0190 is making first-year CS students write an LLM agent from scratch. The Fall 2026 lab, titled "In the Loop", walks students through building the agent loop in Pyret against a local model served by Ollama. Students define a Message type carrying system, user, assistant, and tool roles, a Tool type that is a function paired with a name and description, and a Decision type that is either a final answer or a tool call.
The materials don't soft-pedal what students are building. "An agent gives an LLM access to your computer," the lab warns. "It can do harmful things: upload all your data to an evil site; delete all your data; download and install incriminating data to your computer." The final exercise has students mount indirect prompt injection, with instructions hidden inside files the agent reads, which the lab frames as "a central unsolved security problem in deployed agents."
Two names in our Who's Who directory circulated the page.
Shared on Bluesky by 2 AI experts
-
For the tiny number of people who've wondered "what is the essence of an agentic AI system", my intro class lab this week has students build one from scratch (around an open-weight LLM), with scaffolding. Thanks to @hadl…
View on Bluesky →
Originally reported by cs.brown.edu
Read the original article →Original headline: In the Loop