gtgt / symfony-ai-cursor-platform
Symfony AI Platform bridge for Cursor (Cloud Agents API and local CLI agent)
Package info
github.com/gtgt/symfony-ai-cursor-platform
Type:symfony-bundle
pkg:composer/gtgt/symfony-ai-cursor-platform
Requires
- php: >=8.2
- symfony/ai-platform: ^0.9
- symfony/config: ^7.4|^8.0
- symfony/dependency-injection: ^7.4|^8.0
- symfony/http-client: ^7.4|^8.0
- symfony/http-kernel: ^7.4|^8.0
- symfony/process: ^7.4|^8.0
This package is auto-updated.
Last update: 2026-05-25 21:02:14 UTC
README
Platform bridge for Cursor in the Symfony AI stack.
- Symfony AI Bundle — YAML configuration, agents, console commands
- Symfony AI Agent component —
AgentInterface, messages, tools
Pick one backend:
- CLI — local
agentcommand (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
- AI Bundle —
ai.platform,ai.agent, model options,ai:agent:call - Agent component — programmatic usage, processors, toolbox
- Symfony AI overview
License
LGPL-3.0-or-later — see LICENSE.