Admin Cursor SDK Dispatch
The admin automations page can launch Cursor cloud agents for focused repo work without calling OpenClaw or changing Kai workflows.Admin flow
- A verified admin opens
/admin/internal/automations. - The admin chooses a task kind and enters a bounded repo prompt.
- The browser posts to
/api/admin/automations/cursor-agentusing the existing FM session. - The server validates admin access, calls
Agent.prompt(...), and returns the terminal SDK result. - Cursor-created PRs appear in the existing automations PR table when they match one of these conventions:
- branch starts with
cursor-sdk/ - PR title starts with
[Cursor SDK] - PR has a
cursor-sdklabel
- branch starts with
Request contract
POST /api/admin/automations/cursor-agent
Headers:
Content-Type: application/json- existing
fm_sessioncookie orAuthorization: Bearer <fm_session_jwt>
kind must be one of:
smoke-test-fixci-fixtech-debt
branch is optional. When omitted, the server generates cursor-sdk/<kind>-<timestamp>.
Environment
Required:CURSOR_API_KEY
CURSOR_AGENT_REPO_URLoverrides the default Funding Machine GitHub repo URL.CURSOR_AGENT_MODELoverrides the defaultcomposer-2model.
Guardrails
- The SDK runs only on the server. Never expose
CURSOR_API_KEYto the browser. - This feature does not call OpenClaw, does not emit OpenClaw system events, and does not require an OpenClaw token.
Agent.prompt(...)is used because it is a one-shot API that disposes SDK resources automatically.

