Skip to lesson
Exit
SDK Quickstart in TypeScript and Python1 / 2

2 min lesson

Local process, hosted model, billed to the key owner

Connect "Install @cursor/sdk yourself, export CURSOR_API_KEY, and stream one local Agent.send against a throwaway folder" to the decision you would make.

Step 1 of 2

The job: you can create the first SDK run and explain the credential boundary. Start with this check: Credentials are loaded securely. Keep it small enough to check the result yourself instead of taking the summary on trust.

First local @cursor/sdk run

0:28 · narrated
Read this demo as text
  1. npm install at-cursor slash sdk, then one local Agent.create. The key stays in the environment — length only in the log. Agent.send streams status, a tool call, and a finished answer. Local is your process and files; the model is still hosted, and usage bills to whoever owns that key.
Install @cursor/sdk, load CURSOR_API_KEY from the environment, then Agent.create + send — local process, hosted model, billed to the key owner.

Practice next: Install @cursor/sdk yourself, export CURSOR_API_KEY, and stream one local Agent.send against a throwaway folder.

Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.