← Back to Resources
Developer platformsOctober 27, 2026

Cursor Agent SDK: Agents as Code

Cursor has made its Agent SDK generally available. Per the announcement on the Cursor blog and the official docs, the pitch is "agents as code": an agent is a folder of Markdown and TypeScript files, tested with built-in evals, and deployable either on Cursor's hosted runtime or on infrastructure you own. If that sounds like applying ordinary software engineering discipline to agents, that is exactly the point—and it landed in the same October 2026 window as several other moves toward industrializing agent development.

What shipped

The X news cycle on October 26-27, 2026 treated the Agent SDK's general availability as the main event. Three pieces define the release:

  • File-based agents. An agent is a folder. Markdown carries the instructions and domain knowledge; TypeScript carries programmatic logic such as tools and handlers.
  • Built-in evals. Evaluation is part of the workflow, not a separate project—so a change to an agent's instructions can be tested the way a change to a function is tested.
  • Hosted or self-hosted runs. The same agent definition runs on Cursor's infrastructure or yours, which keeps the compliance conversation short.

Note that details like supported models, runtime limits, and pricing live in the official docs and will move—check them rather than secondhand summaries (including this one).

Agents as code: the folder is the agent

Most agent behavior today lives in places that resist engineering hygiene: a system prompt typed into a chat, a config screen in a SaaS product, or a script only one person understands. "Agents as code" moves the definition into the one artifact engineers already know how to govern—the repository.

The Markdown/TypeScript split is a deliberate division of labor. Markdown is what writers and domain experts can edit safely: tone, rules, checklists, escalation policies. TypeScript is what only engineers should touch: API calls, validation, tool wiring. Because both live in the same folder, a pull request shows the whole change to the agent—prompt and code together—and a reviewer can approve or reject the behavioral delta as a unit. An agent stops being a mystery box and becomes a reviewable diff.

How it works, end to end

  • 1. Define. Create the agent folder: Markdown instructions describing role, constraints, and context, plus TypeScript for tools and any deterministic logic.
  • 2. Evaluate. Write evals—input cases paired with what a correct run looks like—and run them against the folder. This is the step most DIY setups skip and the one the SDK makes first-class.
  • 3. Review. Open a pull request. The evals run in CI like any other test suite; the diff shows exactly how the agent's behavior should change.
  • 4. Deploy. On merge, run the agent hosted on Cursor's runtime or self-hosted on your own stack, using the same definition.
  • 5. Iterate. When the agent misbehaves in production, the fix is a commit: tighten the Markdown, adjust the code, add an eval that reproduces the failure.

Why built-in evals are the real story

Anyone can define an agent; the hard part is knowing whether your change made it better. Teams that run agents in production learn this the expensive way—a "small prompt tweak" silently breaks an edge case that no human notices for weeks. Built-in evals make the regression test the default path instead of the mature team's discipline.

It also reframes what an agent codebase looks like as it grows: a folder whose eval suite grows alongside its instructions, so capability additions come with behavioral tests. For teams extending this practice to backend work, our directory tracks adjacent tooling— Kerno tests agent loops against real backend behavior, and Agent Tool Call Guard validates the tool calls evals cannot foresee.

How the three build paths compare

PathStrengthCost
Cursor Agent SDKReviewable file-based agents, evals built in, hosted or self-hostedLives inside Cursor's ecosystem and its opinions
DIY agent loopTotal control over control flow, models, and costYou own retries, context, evals, and ops from scratch
Framework-heavy stacksRich abstractions, graph orchestration, vendor ecosystemsLearning curve and a runtime you cannot fully see

Where the SDK sits in the agent-engineering wave

The SDK's general availability lands in the same fortnight as AWS's Strands Box sandboxes and continued iteration on single-agent loops. The common thread: agents are being pulled from demos into engineering practice—version control, evaluation, sandboxing, and operations. Tooling follows the same pull: Medha is a Rust harness for running agents with production constraints, and the pattern each of these serves is the same one the Agent SDK encodes in folders and evals.

Getting started without rewriting your world

  • Pick one cron-and-prompt workflow you already run and port it into an agent folder before starting anything greenfield.
  • Write evals first for the failure cases you have actually seen, not hypothetical ones—three real cases beat thirty invented ones.
  • Keep the Markdown and TypeScript boundary honest; the moment domain experts can review agents without reading code, you get the collaboration the format exists for.
  • Verify current capabilities against cursor.com/docs/agent-sdk before committing a roadmap to it—GA software still moves.

Cursor Agent SDK FAQ

What is the Cursor Agent SDK?

The Cursor Agent SDK is Cursor's framework for building agents as code—per the Cursor blog announcement and its documentation, agents are defined as folders containing Markdown and TypeScript files, evaluated with built-in evals, and runnable either on Cursor's hosted infrastructure or self-hosted. The SDK reached general availability per the announcement and docs published in the October 26-27, 2026 news cycle.

What does agents as code mean in practice?

It means an agent's identity lives in files you version, review, and diff—not in a chat session or a config UI. A folder holds the agent's Markdown instructions (its role, rules, and context) plus TypeScript for programmatic behavior like tools and handlers. Treat the folder like any other code artifact: pull requests change the agent, CI runs its evals, and a merge deploys it.

Cursor Agent SDK vs a DIY agent loop vs heavier frameworks?

A DIY loop is maximum control and maximum toil—you own retries, context management, and evaluation yourself. Heavy frameworks give you abstractions but a learning curve and runtime you cannot fully see. The Agent SDK's bet is the middle path: a minimal, file-based contract (Markdown plus TypeScript) where the structure is simple enough to read and the evals are built in rather than bolted on. Choose the SDK when you want agents reviewable in version control; choose a raw loop when you need exotic control flow; choose big frameworks when the abstractions map to your domain.

Can I self-host agents built with the SDK?

Yes—per the announcement, agents built with the SDK can run hosted or self-hosted. That is the operational differentiator for teams with compliance or data-residency constraints: the definition stays portable, and the deployment target is a decision you can defer, or revisit, without rewriting the agent.

How do I get started with the Cursor Agent SDK?

Read the announcement on the Cursor blog, then work through the docs at cursor.com/docs/agent-sdk. The fastest first project is porting an existing prompt-and-scripts workflow into a folder: move the instructions into Markdown, wrap the scripted parts in TypeScript, write two or three evals that capture what good output looks like, and run it hosted. Verify current details—pricing, runtime limits, supported models—against the official docs, since they are the source of truth.

AIXList is an independent AI tools directory. This article summarizes the Cursor Agent SDK per Cursor's official blog announcement and documentation as of October 27, 2026; we are not affiliated with Cursor. Features, deployment options, and pricing may change—verify against cursor.com/docs/agent-sdk before building.