# Open Cursor Agent
[](https://github.com/kyegomez/swarms)
[](https://docs.swarms.world)
An open-source autonomous AI agent implementation inspired by Cursor Agent, built on top of **[Swarms](https://github.com/kyegomez/swarms)** - the enterprise-grade production-ready multi-agent orchestration framework. This production-grade agent can autonomously plan, execute, and complete complex tasks using a combination of Large Language Model reasoning and tool execution.
> **Built with Swarms Framework** - Leveraging the power of [Swarms](https://github.com/kyegomez/swarms), the leading open-source framework for building production-ready multi-agent systems. Swarms provides the robust infrastructure, agent orchestration, and enterprise-grade reliability that makes this agent possible.
## Overview
Open Cursor Agent is a sophisticated AI agent capable of:
- **Autonomous Task Planning**: Breaking down complex tasks into manageable, sequential subtasks
- **Multi-Tool Execution**: Leveraging various tools including file operations, command execution, and web search
- **Intelligent Reasoning**: Using LLM-powered thinking to analyze situations and decide next actions
- **State Management**: Tracking task progress through well-defined execution states
- **Error Handling**: Robust error detection and recovery mechanisms
## Features
| Feature | Description |
|-----------------------------------------------------|-------------------------------------------------------------|
| File system operations | Read, write, search, and manage files |
| Command execution | Execute commands with timeout and security controls |
| Web search integration | Access real-time information via web search |
| Task dependency management | Manage tasks with priority awareness |
| Execution history tracking and logging | Record and monitor action history and logs |
| Workspace isolation | Ensure security-first approach to isolate workspace |
## Installation
### Prerequisites
- Python 3.8 or higher
- API key for your chosen LLM provider (e.g., OpenAI)
### Setup
```bash
# Clone the repository
git clone https://github.com/kyegomez/Open-Cursor-Agent
cd Open-Cursor-Agent
# Install dependencies
pip install -r requirements.txt
```
## Environment Variables
```txt
WORKSPACE_DIR=""
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""
```
## Usage
```python
from open_cursor.main import OpenCursorAgent
# Initialize the agent
agent = OpenCursorAgent(
model_name="gpt-4o",
workspace_path=".",
)
# Example task
task_description = """
Create a transformer model in pytorch in a file called transformer.py"
"""
result = agent.run(task_description)
print(result)
```
## Architecture
```mermaid
graph LR
A[User Task] --> B[Initialize]
B --> C[Planning]
C --> D[Execution]
D --> E[Thinking]
E --> F{Complete?}
F -->|No| D
F -->|Yes| G[Results]
C -.-> H[LLM]
D -.-> H
E -.-> H
D -.-> I[Tools]
style B fill:#4a90e2,color:#fff
style C fill:#9b59b6,color:#fff
style D fill:#e74c3c,color:#fff
style E fill:#f39c12,color:#fff
style G fill:#27ae60,color:#fff
```
### Execution Flow
The agent operates through a state machine with the following phases:
1. **Initialization**: Task context is created and main task is registered
2. **Planning Phase**: LLM generates a detailed execution plan with subtasks
3. **Execution Phase**: Each subtask is executed using appropriate tools
4. **Thinking Phase**: Results are analyzed and next actions determined
5. **Completion**: All tasks are finalized and results are returned
### Agent States
- `INITIALIZING`: Setting up the task context
- `PLANNING`: Creating a detailed execution plan
- `EXECUTING`: Performing planned actions
- `THINKING`: Analyzing results and determining next steps
- `COMPLETED`: Task successfully finished
- `ERROR`: Error encountered during execution
- `PAUSED`: Execution temporarily halted
## Contributing
Contributions are welcome! Please follow these guidelines:
1. Fork the repository
2. Create a feature branch
3. Make your changes with appropriate tests
4. Submit a pull request with a clear description
## License
This project is licensed under the terms specified in the LICENSE file.
## Acknowledgments
**Special Thanks**: To [Swarms Team](https://twitter.com/swarms_corp) and the entire Swarms community for building the infrastructure that makes advanced AI agents accessible to everyone. This project stands on the shoulders of giants.
Raw data
{
"_id": null,
"home_page": "https://github.com/kyegomez/Open-Cursor-Agent",
"name": "open-cursor-agent",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "artificial intelligence, deep learning, optimizers, Prompt Engineering, swarms, agents, llms, transformers, multi-agent, swarms of agents, Enterprise-Grade Agents, Production-Grade Agents, Agents, Multi-Grade-Agents, Swarms, Transformers, LLMs, Prompt Engineering, Agents, Generative Agents, Generative AI, Agent Marketplace, Agent Store, quant, finance, algorithmic trading, portfolio optimization, risk management, financial modeling, machine learning for finance, natural language processing for finance",
"author": "Kye Gomez",
"author_email": "kye@swarms.world",
"download_url": "https://files.pythonhosted.org/packages/1a/0e/4bede3c52109c58cd1f691ce0efb7218c243bbda1248a24c89e06c0fb6d2/open_cursor_agent-0.1.0.tar.gz",
"platform": null,
"description": "# Open Cursor Agent\n\n[](https://github.com/kyegomez/swarms)\n[](https://docs.swarms.world)\n\nAn open-source autonomous AI agent implementation inspired by Cursor Agent, built on top of **[Swarms](https://github.com/kyegomez/swarms)** - the enterprise-grade production-ready multi-agent orchestration framework. This production-grade agent can autonomously plan, execute, and complete complex tasks using a combination of Large Language Model reasoning and tool execution.\n\n> **Built with Swarms Framework** - Leveraging the power of [Swarms](https://github.com/kyegomez/swarms), the leading open-source framework for building production-ready multi-agent systems. Swarms provides the robust infrastructure, agent orchestration, and enterprise-grade reliability that makes this agent possible.\n\n## Overview\n\nOpen Cursor Agent is a sophisticated AI agent capable of:\n\n- **Autonomous Task Planning**: Breaking down complex tasks into manageable, sequential subtasks\n- **Multi-Tool Execution**: Leveraging various tools including file operations, command execution, and web search\n- **Intelligent Reasoning**: Using LLM-powered thinking to analyze situations and decide next actions\n- **State Management**: Tracking task progress through well-defined execution states\n- **Error Handling**: Robust error detection and recovery mechanisms\n\n## Features\n\n| Feature | Description |\n|-----------------------------------------------------|-------------------------------------------------------------|\n| File system operations | Read, write, search, and manage files |\n| Command execution | Execute commands with timeout and security controls |\n| Web search integration | Access real-time information via web search |\n| Task dependency management | Manage tasks with priority awareness |\n| Execution history tracking and logging | Record and monitor action history and logs |\n| Workspace isolation | Ensure security-first approach to isolate workspace |\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8 or higher\n- API key for your chosen LLM provider (e.g., OpenAI)\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/kyegomez/Open-Cursor-Agent\ncd Open-Cursor-Agent\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n\n## Environment Variables\n\n\n```txt\nWORKSPACE_DIR=\"\"\nOPENAI_API_KEY=\"\"\nANTHROPIC_API_KEY=\"\"\n```\n\n## Usage\n\n```python\nfrom open_cursor.main import OpenCursorAgent\n\n# Initialize the agent\nagent = OpenCursorAgent(\n model_name=\"gpt-4o\",\n workspace_path=\".\",\n)\n\n# Example task\ntask_description = \"\"\"\nCreate a transformer model in pytorch in a file called transformer.py\"\n\"\"\"\n\nresult = agent.run(task_description)\n\nprint(result)\n```\n\n## Architecture\n\n```mermaid\ngraph LR\n A[User Task] --> B[Initialize]\n B --> C[Planning]\n C --> D[Execution]\n D --> E[Thinking]\n E --> F{Complete?}\n F -->|No| D\n F -->|Yes| G[Results]\n \n C -.-> H[LLM]\n D -.-> H\n E -.-> H\n D -.-> I[Tools]\n \n style B fill:#4a90e2,color:#fff\n style C fill:#9b59b6,color:#fff\n style D fill:#e74c3c,color:#fff\n style E fill:#f39c12,color:#fff\n style G fill:#27ae60,color:#fff\n```\n\n### Execution Flow\n\nThe agent operates through a state machine with the following phases:\n\n1. **Initialization**: Task context is created and main task is registered\n2. **Planning Phase**: LLM generates a detailed execution plan with subtasks\n3. **Execution Phase**: Each subtask is executed using appropriate tools\n4. **Thinking Phase**: Results are analyzed and next actions determined\n5. **Completion**: All tasks are finalized and results are returned\n\n### Agent States\n\n- `INITIALIZING`: Setting up the task context\n- `PLANNING`: Creating a detailed execution plan\n- `EXECUTING`: Performing planned actions\n- `THINKING`: Analyzing results and determining next steps\n- `COMPLETED`: Task successfully finished\n- `ERROR`: Error encountered during execution\n- `PAUSED`: Execution temporarily halted\n\n\n## Contributing\n\nContributions are welcome! Please follow these guidelines:\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes with appropriate tests\n4. Submit a pull request with a clear description\n\n## License\n\nThis project is licensed under the terms specified in the LICENSE file.\n\n## Acknowledgments\n\n**Special Thanks**: To [Swarms Team](https://twitter.com/swarms_corp) and the entire Swarms community for building the infrastructure that makes advanced AI agents accessible to everyone. This project stands on the shoulders of giants.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Swarms - TGSC",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://docs.swarms.world",
"Homepage": "https://github.com/kyegomez/Open-Cursor-Agent",
"Repository": "https://github.com/kyegomez/Open-Cursor-Agent"
},
"split_keywords": [
"artificial intelligence",
" deep learning",
" optimizers",
" prompt engineering",
" swarms",
" agents",
" llms",
" transformers",
" multi-agent",
" swarms of agents",
" enterprise-grade agents",
" production-grade agents",
" agents",
" multi-grade-agents",
" swarms",
" transformers",
" llms",
" prompt engineering",
" agents",
" generative agents",
" generative ai",
" agent marketplace",
" agent store",
" quant",
" finance",
" algorithmic trading",
" portfolio optimization",
" risk management",
" financial modeling",
" machine learning for finance",
" natural language processing for finance"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fb0097139ef19d8ea3308cb35eee4c3d50031c5e95f62aadd22f7318c96dfb1f",
"md5": "1a0646c1b3b33cd1f15b5134e738f451",
"sha256": "d782eee5960534a15ec84a1828a1d25a431e0f52356bd55507612a9d92eb99b0"
},
"downloads": -1,
"filename": "open_cursor_agent-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1a0646c1b3b33cd1f15b5134e738f451",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 22770,
"upload_time": "2025-10-24T19:31:29",
"upload_time_iso_8601": "2025-10-24T19:31:29.121358Z",
"url": "https://files.pythonhosted.org/packages/fb/00/97139ef19d8ea3308cb35eee4c3d50031c5e95f62aadd22f7318c96dfb1f/open_cursor_agent-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1a0e4bede3c52109c58cd1f691ce0efb7218c243bbda1248a24c89e06c0fb6d2",
"md5": "5422213c7660ee4557d56811bf01f5af",
"sha256": "aae99950b4c64d22525ae1e2803bc04791e9e2e352597161bb71a1924fb5616b"
},
"downloads": -1,
"filename": "open_cursor_agent-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "5422213c7660ee4557d56811bf01f5af",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 22921,
"upload_time": "2025-10-24T19:31:30",
"upload_time_iso_8601": "2025-10-24T19:31:30.457452Z",
"url": "https://files.pythonhosted.org/packages/1a/0e/4bede3c52109c58cd1f691ce0efb7218c243bbda1248a24c89e06c0fb6d2/open_cursor_agent-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-24 19:31:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kyegomez",
"github_project": "Open-Cursor-Agent",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "python-dotenv",
"specs": []
},
{
"name": "loguru",
"specs": []
},
{
"name": "swarms",
"specs": []
},
{
"name": "swarms-tools",
"specs": []
}
],
"lcname": "open-cursor-agent"
}