import { Agent } from "@cursor/sdk"; const agent = await Agent.create({ apiKey: process.env.CURSOR_API_KEY!, model: { id: "composer-2" }, local: { cwd: process.cwd() }, }); const run = await agent.send("Summarize what this repository does"); for await (const event of run.stream()) { console.log(event); }
Cursor SDK
Creator
Creator
Seonglae ChoCreated
Created
2026 Jun 26 15:18Editor
Editor
Seonglae ChoEdited
Edited
2026 Jun 26 15:19Refs
Refs

