| 开发者 | rafacarvalhido |
|---|---|
| 更新时间 | 2026年8月4日 09:14 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
cursor provider.
This is an unofficial, third-party connector. It is not affiliated with, endorsed by, or sponsored by Cursor or Anysphere. "Cursor" is a trademark of Anysphere, Inc.
Features:
cursor provider with the WordPress AI ClientGET /v1/modelsCURSOR_API_KEY)/wp-content/plugins/ai-provider-for-cursor/On Settings → Connectors. For production, prefer defining CURSOR_API_KEY in wp-config.php (see Configuration). Cursor-specific poll and model options are on Settings → AI Provider for Cursor.
Open wp-config.php in the root of your WordPress install and add this line above /* That's all, stop editing! */:
define( 'CURSOR_API_KEY', 'your-cursor-api-key-here' );
Replace the placeholder with your real Cursor API key. Reload Settings → Connectors — WordPress should detect the constant as the key source.
When the Cursor provider is used, WordPress sends your API key and the prompt text for that request (including system instructions and any content included by the calling feature) to https://api.cursor.com. See External services for endpoints, timing, and links to Cursor's terms and privacy policy.
Yes. The WordPress AI Client and Connectors API shipped in WordPress 7.0.
Cursor Cloud Agents run asynchronously. This plugin creates an agent, polls the run until it finishes, then returns the final result text. Increase the poll timeout if your host allows longer PHP execution times.
The maximum number of seconds WordPress will wait for a Cursor Cloud Agent run to finish. If Cursor has not finished by then, the request fails with a timeout error. Default is 120 seconds. Increase it if answers often fail with timeout; lower it only if you want failures to surface faster.
How many seconds to wait between each status check while a Cloud Agent is still running. For example, with interval 2, WordPress asks Cursor roughly every 2 seconds whether the run is finished. The default (2) is a good balance for most sites: lower values check more often (slightly more API traffic); higher values check less often (slightly slower to notice completion). Most users can leave this at the default.
Each text generation creates a Cloud Agent on Cursor's side. When this option is enabled (the default), the plugin asks Cursor to archive that agent after a successful reply, so finished agents do not pile up in your Cursor dashboard. Turn it off only if you want to keep those agents visible in Cursor for inspection or follow-up. Archiving is best-effort: if the archive call fails, your generated text is still returned.
For most sites: poll timeout 120, poll interval 2, and keep Archive agent after run enabled. Change them only if you hit timeouts, want fewer status checks, or need to keep agents listed in Cursor.
After configuring the API key on Settings → Connectors (or via CURSOR_API_KEY):
AiClient::prompt( 'Write a short product description.' )->usingProvider( 'cursor' )->generateTextResult();
You can also select a model with usingModel( 'cursor-grok-4.5-high-fast' ) (exact IDs come from your Cursor account via GET /v1/models).
No. It is a community / third-party WordPress plugin that uses Cursor's public Cloud Agents API. It is not affiliated with, endorsed by, or sponsored by Cursor or Anysphere.
No. Only features and code that explicitly use the WordPress AI Client with usingProvider( 'cursor' ) (or select Cursor where supported) will call Cursor. Other plugins that hard-code their own provider list may ignore the Cursor provider even when it shows as connected under Settings → Connectors.
load_plugin_textdomain() and Domain Path header for translationsresult, so summaries are not emptydefault/auto so Cursor resolves the account defaultapi_key Connectors auth method so the WordPress AI plugin detects credentialsconnectors_ai_cursor_api_key optionwpai_has_ai_credentials and wpai_is_cursor_connector_configured