[KongchangAI]
· 1 min read· 978 words

Cursor Agent SDK Released: Build Your Own AI Agents with Code

Cursor Agent SDK Released: Build Your Own AI Agents with Code

Cursor opens its Agent SDK for building deployable automation agents as code with Markdown and TypeScript.

Cursor has officially opened up its Agent SDK, the same framework it uses to build its own agents like BackBot. Its core philosophy is Agent-as-Code: instructions in Markdown, tools as TypeScript functions, with every change going through Git review for traceability. Deploy with one `agent sdk deploy` command or self-host as a single Node process. In the demo, a team built a PR review agent with knowledge base citations in about a day, and PGA Tour is already using it. Pricing is still missing and no independent third-party testing exists yet, so small-scale trials in non-critical workflows are advised.

Cursor has officially opened up its Agent SDK — the very same framework it uses to build its own agents like BackBot. According to the official demo, agents can respond to events such as pull requests or incidents, and developers can now use it to build their own automation agents.

Agent-as-Code: Instructions in Markdown, Tools in TypeScript

According to a YouTube channel's breakdown of the SDK, the core design of the Agent SDK is "Agent-as-Code." Developers write instructions in Markdown and define tools as TypeScript functions, and every change to an agent goes through Git review just like ordinary code.

Agent to kod (Agent-as-Code)

The immediate benefit of this design is traceability and reviewability. Agent behavior is no longer arcane logic hidden in some black-box configuration — it's an engineering artifact that can be diffed and code reviewed. For teams that need compliance audits, this matters more than the features themselves.

"Agent-as-Code" borrows from the infrastructure-as-code (IaC) approach: the agent's system prompt, tool definitions, trigger conditions, and more are all brought under version control as text, rather than relying on visual configuration panels or hidden state in a cloud database. The benefit is that every adjustment to the prompt can be diffed to show exactly which sentence changed, and signature changes to tool functions can be challenged by colleagues during code review. For multi-environment deployments, the same code can reproduce identical agent behavior in test and production environments, avoiding the "works locally, fails in production" drift problem.

Deploy with a Single Command

The SDK provides an agent sdk deploy command: it automatically builds the agent, assigns a URL, and hosts it on Cursor's side. If you don't want to depend on a hosted environment, you can also run the agent as a single Node process in a container, making deployment relatively flexible.

Agent SDK deploy builds the agent and assigns a URL

This dual-track approach of "hosted + self-hosted" reduces friction from prototype to production. Teams can quickly validate on Cursor's side first, then migrate to their own infrastructure.

Running the agent as a single Node process means it is essentially a long-running service: listening for events, calling models, executing tools, and returning results. Compared with serverless functions, the single-process model has advantages in cold-start latency and state retention, but you need to handle process supervision, log collection, and horizontal scaling yourself. Containerization lets teams bring agents into their existing Kubernetes or ECS orchestration systems and reuse existing monitoring, alerting, and rolling release processes. The hosted mode saves this operational work at the cost of reduced control over the runtime environment — especially when access to internal systems or sensitive data is required, self-hosting is often a hard compliance requirement.

Real-World Case: A Code Review Bot in One Day

According to the video, a team inside Cursor built a code review agent in about a day: it checks every pull request, gives feedback based on a knowledge base, and cites the source notes it relied on.

The review agent cites knowledge base notes

This points to a pragmatic direction: rather than pursuing general-purpose agents, start with vertical bots tailored to your team's rules. High-frequency, well-defined tasks like code review, alert triage, and PR summaries are exactly where a knowledge base plus a citation mechanism shines. The official announcement also mentions that PGA Tour is already using the Agent SDK.

Knowledge base Q&A with citations (retrieval-augmented generation, RAG) is the technical foundation of this kind of review agent: team documents, standards, and historical discussions are chunked and vectorized into an index; at review time the agent retrieves relevant passages, then has the model generate feedback based on those passages and label the sources. The value of the citation mechanism is verifiability — reviewers can click through the links to confirm whether the basis holds, rather than blindly trusting model output. This also explains why vertical scenarios land faster than general-purpose agents: the knowledge base has clear boundaries, the evaluation criteria are well defined, and model errors are easy for humans to spot and correct.

Information Gaps to Watch For

The video's author also raised two caveats. First, no pricing information was mentioned in the introduction; second, the examples come mainly from Cursor itself, and there has been no independent third-party testing yet.

No independent testing yet

At the selection stage, this means key metrics such as actual stability, event trigger latency, and knowledge base size limits still lack external validation. We recommend trialing it at small scale in non-critical workflows first before deciding whether to connect it to core workflows.

According to the video, the Agent SDK is now open to everyone. For developers who want to move from "using AI" to "building AI tools," the barrier is dropping noticeably — starting with a review bot tailored to your own rules may be the lowest-cost entry point.

One-line Summary

Cursor opens its Agent SDK, letting developers build deployable automation agents as code with Markdown and TypeScript.

Paragraph Summary

Cursor has officially opened up its Agent SDK, the same framework it uses to build its own agents such as BackBot. The SDK's core philosophy is "Agent-as-Code": developers write instructions in Markdown and define tools as TypeScript functions, and every change to an agent goes through Git review like ordinary code, giving it traceable, reviewable engineering properties. For deployment, the agent sdk deploy command handles building and hosting in one step, or you can self-host it as a single Node process in a container. In the official demo, a team built a PR review agent with knowledge base citations in about a day, and PGA Tour is already using it. The video's author also notes that pricing information is missing, examples come mostly from Cursor itself, and there has been no independent third-party testing, so trialing at small scale in non-critical workflows first is advised.

#Cursor Agent SDK#Agent-as-Code#AI agents#TypeScript#Markdown#self-hosted agents#code review bot
Share:

Related articles