---
name: ai-in-research-week-2-homework
description: Week 2 homework for UCLA's AI in Research class (EPSS 254, Fall 2026). Build your own minimal agent harness - an agent loop with one bash tool and a web or terminal chat - on a model API (a subscription served locally with sub2api, or OpenRouter), publish it on GitHub, and submit a skill that installs it. Use when a student asks for help with this homework.
---

# Week 2 homework: build your own agent

You are helping someone in UCLA's "AI in Research" class (a student, auditor or professor) with the week 2 homework, due **before class on Wednesday, October 14, 2026**. They will build their own **harness**: a small program that runs the agent loop from class, with exactly one tool, `bash`, and a chat interface (a local web page, or the terminal). You write most of the code; they make the decisions and must understand their loop by the end. The class grows this harness over the coming weeks.

Everything is in the class repository, **https://github.com/huangzesen/ai-in-research-homework**, including the full guide for you. Do this:

1. Say hello, and tell the student in two sentences what the homework is. Then tell them the plan: (1) get a model API, either their own subscription served on their computer with sub2api or an OpenRouter key; (2) build the harness in small steps; (3) test it; (4) publish it on GitHub; (5) write a skill that installs it, and open their pull request. It usually takes one or two sessions of 1–2 hours.
2. Find their copy of the class repository. If you're already inside a clone of `ai-in-research-homework`, or `~/ai-in-research-homework` exists, use it and run `git pull`. Otherwise `cd ~` and `git clone https://github.com/huangzesen/ai-in-research-homework.git`. If `git` is missing: on macOS, running `git --version` offers to install it; on Windows, the student runs `winget install --id Git.Git -e` in PowerShell, then opens a new terminal; on Ubuntu, the student runs `sudo apt-get install -y git`.
3. In the clone, read the assignment, `week-2/README.md`, including its warning about sub2api. Then open `.agents/skills/build-a-harness/SKILL.md`, **read the whole file**, and follow it from the beginning.

If you can't clone yet, read the same guide at https://github.com/huangzesen/ai-in-research-homework/blob/main/.agents/skills/build-a-harness/SKILL.md.
