gtgt/symfony-ai-cursor-platform

Symfony AI Platform bridge for Cursor (Cloud Agents API and local CLI agent)

Maintainers

Package info

github.com/gtgt/symfony-ai-cursor-platform

Type:symfony-bundle

pkg:composer/gtgt/symfony-ai-cursor-platform

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2026-05-25 21:01 UTC

This package is auto-updated.

Last update: 2026-05-25 21:02:14 UTC


README

Platform bridge for Cursor in the Symfony AI stack.

Pick one backend:

  • CLI — local agent command (typical for development)
  • Cloud — Cursor Cloud Agents API (typical for CI / remote runs)

Installation

composer require symfony/ai-bundle symfony/ai-agent gtgt/symfony-ai-cursor-platform:@dev

Quick start (CLI)

config/packages/ai_platform_cursor.yaml:

ai_platform_cursor:
    cli: ~

config/packages/ai.yaml:

ai:
    agent:
        default:
            platform: 'ai.platform.cursor_cli'
            model: 'default'
            tools: false

Use tools: false so Cursor handles its own tooling; Symfony toolbox tools are not passed through.

.env (only if you use an API key with the CLI instead of agent login):

# CURSOR_API_KEY=

Try it

php bin/console ai:agent:call default

Use in PHP

use Symfony\AI\Agent\AgentInterface;
use Symfony\AI\Platform\Message\Message;
use Symfony\AI\Platform\Message\MessageBag;

final readonly class Assistant
{
    public function __construct(
        private AgentInterface $agent, // ai.agent.default
    ) {
    }

    public function ask(string $question): string
    {
        return $this->agent->call(new MessageBag(Message::ofUser($question)));
    }
}

Common CLI settings (optional), still under ai_platform_cursor.cli:

ai_platform_cursor:
    cli:
        workspace: '%kernel.project_dir%'
        trust: true
        force: false

Per-call overrides are passed as agent options, e.g. ['cursor_force' => true].

Alternative: Cloud

Replace the CLI config with:

config/packages/ai_platform_cursor.yaml:

ai_platform_cursor:
    cloud:
        api_key: '%env(CURSOR_API_KEY)%'
        repositories:
            - url: 'https://github.com/your-org/your-repo.git'

config/packages/ai.yaml:

ai:
    agent:
        default:
            platform: 'ai.platform.cursor'
            model: 'default'
            tools: false
CURSOR_API_KEY=your_api_key_here
php bin/console ai:agent:call default

Models

Use default for Cursor’s default model, or any model id supported by your CLI / cloud account.

Symfony documentation

License

LGPL-3.0-or-later — see LICENSE.