Expand description
Agent API endpoints.
These endpoints allow AI agents to interact with the running application through structured HTTP requests, without needing native desktop control.
§How it works
- The browser app includes the rdesktop bridge script
- The bridge script periodically sends DOM snapshots to the server
- Agents query the server for DOM/state information
- Agents send actions to the server, which forwards them to the browser
§Design Philosophy
Instead of requiring agents to take screenshots and use vision models to understand the UI, the Agent API provides direct DOM access and structured state information. This is:
- Faster: No screenshot encoding/decoding overhead
- More reliable: Exact element selectors, not pixel coordinates
- More informative: Full DOM tree, computed styles, accessibility info
- Easier to test: Standard HTTP endpoints, can be scripted
Structs§
- Action
Query - Action
Result - Result of an action execution.
- Action
Result Report - Agent
Action - An action that an agent can execute on the UI.
- DomSnapshot
- Response from a DOM query.
- Element
Info - Response from an element query.
- Element
Query - Query parameters for element selection.
- Recording
Complete Request - Recording
Error Request - Recording
Start Request - Optional request body for starting a recording. The server owns the
recording identity; agents may safely send
{}more than once. - Recording
Started Request - Recording
Stop Request - Optional session guard for stopping a recording.
- Screenshot
Query - GET /rdesktop/agent/screenshot
Enums§
- Action
Type - Types of actions agents can execute.
Functions§
- execute_
action - POST /rdesktop/agent/action
- get_dom
- GET /rdesktop/agent/dom
- get_
recording - GET /rdesktop/agent/recording
- get_
state - GET /rdesktop/agent/state
- pending_
actions - GET /rdesktop/agent/action/pending
- poll_
recording - GET /rdesktop/agent/recording/poll
- query_
elements - GET /rdesktop/agent/elements?selector=…
- recording_
chunk - POST /rdesktop/agent/recording/chunk
- recording_
complete - POST /rdesktop/agent/recording/complete
- recording_
error - POST /rdesktop/agent/recording/error
- recording_
file - GET /rdesktop/agent/recording/file
- recording_
started - POST /rdesktop/agent/recording/started
- report_
action_ result - POST /rdesktop/agent/action/result
- send_
ipc - POST /rdesktop/agent/ipc
- start_
recording - POST /rdesktop/agent/recording/start
- stop_
recording - POST /rdesktop/agent/recording/stop
- take_
screenshot - Capture the latest complete native PNG frame.