Cursor-style Coding App
August 17, 2026 ยท View on GitHub
The primary application for the Build a Cursor in 3 Steps HarnessRouter workshop at Harvard.
This demo shows how to turn a purpose-configured HarnessRouter coding agent into a product experience with streamed output, recoverable sessions, follow-up tasks, cancellation, and artifact downloads.
Run it
From the repository root:
-
Install dependencies.
npm install -
Copy
.env.exampleto the repository root as.env, then set both values.HR_API_KEY=your_key_here HR_CURSOR_AGENT_ID=your_coding_agent_id PORT=3000No key yet? Create one from the quickstart. Starting the demo consumes no credits; credits are only used when tasks run.
-
Start the primary demo.
npm run dev:cursor
Open http://localhost:3000.
Architecture
| Layer | Responsibility |
|---|---|
config/agents.json | Declares the coding_assistant feature; HR_CURSOR_AGENT_ID supplies its HarnessRouter agent ID |
server/index.ts | Keeps credentials server-side and proxies runs, sessions, cancellation, previews, and downloads |
src/api.ts | Parses data-only server-sent events |
src/App.tsx | Provides the Cursor-style coding-agent interface and session history |
tests/ | Covers stream parsing and cross-user session ownership |
The demo intentionally does not include a production repository sandbox. Configure the HarnessRouter coding agent with the tools and repository access appropriate to your environment.
Direct workspace commands
npm run test --workspace=@harnessrouter/cursor-coding-app
npm run build --workspace=@harnessrouter/cursor-coding-app
npm run preview:cursor