Answer: Call `Agent.create()` with options, passing either `local` or `cloud` to pick a runtime; it validates options and returns a handle immediately. For example, a local agent uses `local: { cwd: "/path/to/repo" }` and a cloud agent uses `cloud` with `repos` and `autoCreatePR`. Status: Confirmed Entry: tool/cursor/agents-and-automation/create-agent Revision: 1 Digest: sha256:bf4329150523a067 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:12:09Z Last changed: 2026-11-13T03:12:09Z Last verified: 2026-11-20T12:40:53Z Next check: 2026-11-21T12:40:53Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Function signature | function Agent.create(options: AgentOptions): Promise; | [1] | 2026-11-20 Runtime selection | Pass either `local` or `cloud` to pick a runtime. | [1] | 2026-11-20 Local agent example | local: { cwd: "/path/to/repo" } | [1] | 2026-11-20 Cloud agent example | cloud: { repos: [{ url: "https://github.com/your-org/your-repo", startingRef: "main" }], autoCreatePR: true, } | [1] | 2026-11-20 Local agent ID format | agent- | [1] | 2026-11-20 Cloud agent ID format | bc- | [1] | 2026-11-20 Sources: [1] Anysphere. "cursor.com/docs/sdk/typescript.md". https://cursor.com/docs/sdk/typescript.md Role: primary. Accessed: 2026-11-20T12:40:53Z Quote: "function Agent.create(options: AgentOptions): Promise;" (Supports: Function signature) Quote: "Pass either `local` or `cloud` to pick a runtime." (Supports: Runtime selection) Quote: "local: { cwd: "/path/to/repo" }," (Supports: Local agent example) Quote: "cloud: { repos: [{ url: "https://github.com/your-org/your-repo", startingRef: "main" }], autoCreatePR: true, }," (Supports: Cloud agent example) Quote: "Local agents get an `agent-` ID; cloud agents get a `bc-` ID." (Supports: Local agent ID format, Cloud agent ID format) Snapshot SHA-256: c9e134cfe90fbd451316dd97f8a332e7e6c2a1c159e3491a2b03d32790252bf2 (captured 2026-11-13T03:12:08Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:12:09Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:40:53Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:40:53Z Last attempt: 2026-11-20T12:40:53Z Notes and limitations: Extracted automatically from a single official source (section "Creating agents"). Related: https://latestn.com/tool/cursor/agents-and-automation/create-agent-sdk-project-from-goal How do I create a new Cursor Agent SDK project from a goal using a coding agent? https://latestn.com/tool/cursor/agents-and-automation/create-automation How do I create a Cursor automation? https://latestn.com/tool/cursor/agents-and-automation/create-custom-subagent How do I create a custom subagent in Cursor? https://latestn.com/tool/cursor/agents-and-automation/connect-peer-agents How do I connect one Cursor agent to another specialist agent as a peer? https://latestn.com/tool/cursor/agents-and-automation/continuation-token-vs-session-id What is the difference between continuationToken and sessionId in Cursor's Agent SDK? https://latestn.com/tool/cursor/agents-and-automation/continue-peer-session How do I continue a Cursor specialist agent's session after the first ask? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:12:09Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cursor/agents-and-automation/create-agent/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cursor/agents-and-automation/create-agent POST: https://latestn.com/dispute/tool/cursor/agents-and-automation/create-agent with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cursor/agents-and-automation/create-agent?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create an agent with the Cursor TypeScript SDK? Revision 1, last verified 2026-11-20T12:40:53Z. https://latestn.com/tool/cursor/agents-and-automation/create-agent (accessed 2026-11-21T09:56:45Z). @misc{LatestN_tool_cursor_agents_and_automation_create_agent_r1, title = {How do I create an agent with the Cursor TypeScript SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cursor/agents-and-automation/create-agent}}, note = {Revision 1; digest sha256:bf4329150523a067; last verified 2026-11-20T12:40:53Z; accessed 2026-11-21T09:56:45Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cursor/agents-and-automation/create-agent