mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
|
|
History
|
|
|---|---|---|
| .. | ||
| src | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| lint-staged.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||
@mastra/cursor
@mastra/cursor connects Mastra to the Cursor Agent SDK. Use it when you want Cursor's coding-agent runtime and repository tools while exposing the agent through Mastra-compatible generate() and stream() methods.
Installation
npm install @mastra/cursor
npm install @cursor/sdk
Usage
Set CURSOR_API_KEY before creating the agent.
import { CursorSDKAgent } from '@mastra/cursor';
import { Mastra } from '@mastra/core/mastra';
export const cursorAgent = new CursorSDKAgent({
id: 'cursor-sdk-agent',
name: 'Cursor SDK Agent',
description: 'Use Cursor Agent SDK through Mastra.',
sdkOptions: {
apiKey: process.env.CURSOR_API_KEY,
model: { id: process.env.CURSOR_MODEL_ID! },
local: {
cwd: process.cwd(),
},
},
});
export const mastra = new Mastra({
agents: { cursorAgent },
});
Documentation
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.