A TypeScript project for managing and interacting with AI agents using Cursor's agent system. This project demonstrates how to spawn and communicate with cursor agents programmatically.
- Agent Management: Spawn and control cursor agents from TypeScript
- Model Selection: Choose from different AI models (e.g., cheetah)
- Async Communication: Handle agent responses asynchronously
- TypeScript Support: Full type safety and IntelliSense support
Install dependencies using Bun:
bun installimport { spawn } from "bun";
const child = Bun.spawn([
"cursor-agent",
"--model", "cheetah",
"--print", "Your message here"
]);
const result = await child.stdout.text();
console.log(result);Execute the main example:
bun run index.tsOr run directly:
bun index.tscursor-agents/
├── index.ts # Main entry point with agent example
├── package.json # Project configuration and dependencies
├── tsconfig.json # TypeScript configuration
├── README.md # This file
└── node_modules/ # Dependencies (auto-generated)
This project uses:
- Bun: Fast JavaScript runtime and package manager
- TypeScript: Type-safe JavaScript development
- Cursor Agents: AI agent integration
- Bun v1.3.0 or later
- TypeScript ^5
- Cursor IDE with agent support
- Fork the repository
- Create a feature branch
- Make your changes
- Test with
bun test - Submit a pull request
This project is private and proprietary.
Built with ❤️ using Bun - the fast all-in-one JavaScript runtime.