Skip to main content

Open Cursor Agent

Powered by Swarms Swarms Framework

An open-source autonomous AI agent implementation inspired by Cursor Agent, built on top of 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, 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

# 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

WORKSPACE_DIR=""
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""

Usage

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

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 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.

Metadata

Release files for open-cursor-agent 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for open-cursor-agent 0.1.0
File Size Uploaded Provenance Actions
open_cursor_agent-0.1.0.tar.gz 22.9 kB Without provenance Details for open_cursor_agent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for open-cursor-agent 0.1.0
File Interpreter ABI Platform Actions
open_cursor_agent-0.1.0-py3-none-any.whl Python 3 none any Details for open_cursor_agent-0.1.0-py3-none-any.whl

Total release size: 45.7 kB

Release files / open_cursor_agent-0.1.0.tar.gz

Download URL open_cursor_agent-0.1.0.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aae99950b4c64d22525ae1e2803bc04791e9e2e352597161bb71a1924fb5616b
BLAKE2b-256 checksum
How to use checksums
1a0e4bede3c52109c58cd1f691ce0efb7218c243bbda1248a24c89e06c0fb6d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.3 Darwin/24.5.0

Release files / open_cursor_agent-0.1.0-py3-none-any.whl

Download URL open_cursor_agent-0.1.0-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d782eee5960534a15ec84a1828a1d25a431e0f52356bd55507612a9d92eb99b0
BLAKE2b-256 checksum
How to use checksums
fb0097139ef19d8ea3308cb35eee4c3d50031c5e95f62aadd22f7318c96dfb1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.3 Darwin/24.5.0

Security for open-cursor-agent 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page