Pixel Agent is a two-part companion for Cursor: a frameless Electron desktop pet and a VS Code/Cursor extension that streams workspace, Git, and task events over a local WebSocket bridge.
pixel-agent/
apps/
desktop/ Electron + React desktop pet
extension/ Cursor / VS Code extension
shared/
types/
events.ts Shared event types and animation mapping
package.json
README.md
- Node.js 18 or newer
- npm 9 or newer
- Cursor or VS Code with the built-in Git extension enabled
From the repository root:
npm install
npm run build -w @pixel-agent/sharedDevelopment mode starts the Vite renderer, compiles the Electron main process, and launches Electron:
npm run dev:desktopThe desktop app listens for extension events on ws://127.0.0.1:47321 by default.
npm run package:desktopInstallers are written to apps/desktop/release/.
- Compile the extension:
npm run dev:extension- Open the
apps/extensionfolder in Cursor or VS Code. - Press
F5to launch an Extension Development Host. - In the host window, run Pixel Agent: Connect if the status bar shows a reconnect loop before the desktop app is running.
The extension activates on startup, connects to the desktop WebSocket server, and begins watching Git state.
The desktop app owns the WebSocket server. The extension is the client.
Default port: 47321
Event shape:
{
"type": "git_push_success",
"source": "cursor-extension",
"timestamp": "2026-05-13T12:00:00.000Z",
"payload": {
"repo": "string",
"branch": "string",
"message": "string"
}
}Supported event types:
cursor_openedworkspace_openedgit_dirtygit_cleangit_commit_createdgit_push_startedgit_push_successgit_push_failedbranch_changedbuild_errortest_failedmerge_conflictunsaved_filesstale_branchlanguage_focusno_commits_todaylong_sessionai_usage_updatewarningcustom_message
The desktop app validates incoming payloads with the shared type guards in shared/types/events.ts, maps each event to an animation, and shows a speech bubble for five seconds.
If the extension cannot connect, it retries every five seconds and shows a short status bar message without crashing the editor host.
- Add the type to
PIXEL_AGENT_EVENT_TYPESinshared/types/events.ts. - Add a default message and animation mapping in the same file.
- Emit the event from the extension or desktop service.
- Rebuild shared types and both apps:
npm run build -w @pixel-agent/shared
npm run build:extension
npm run build:desktopOptional usage polling lives in apps/desktop/src/services/cursorApi.ts.
Configure these fields in the desktop settings panel:
- Cursor API key
- Team ID when your account requires it
- Usage polling interval
The service is structured for usage events, spend tracking, and token usage calls, but endpoint URLs are intentionally left as TODO placeholders until they are confirmed against current Cursor Admin API documentation. Pixel Agent remains fully usable without the Cursor API because Git and extension events drive the character.
- Cursor does not expose every real-time editor event through a public API, so the extension focuses on workspace, Git, task, and lightweight activity signals.
- Push detection is best-effort and is tied to task names that include
push. - Build failures are detected from task names that include
build. - The placeholder character is CSS/SVG-based so sprite sheets can be swapped in later without changing the event pipeline.
Pixel Agent: ConnectPixel Agent: DisconnectPixel Agent: Send Test MessagePixel Agent: Show Current Git StatusPixel Agent: AskPixel Agent: Ping DesktopPixel Agent: Nudge to CommitPixel Agent: Mute for 1 HourPixel Agent: Refresh Usage
- Drag the character to move the window
- Double-click for the status panel (mood, recent events, usage trend)
- Right-click for Settings, Refresh Usage, Nudge Commit, Mute, Hide, Test, Quit
- Use the settings panel for always-on-top, size, theme, mute, startup, API key, team ID, and polling interval