AI Process Manager (AIPM)
v0.5.0Structured Windows state for AI agents: processes, windows, UI trees.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
health_check
Ping the AI Process Manager backend. Returns version, API URL, and whether the local service is reachable. Call this first in a new session.
check_process
Check if a process is running on the user's Windows machine — no screenshot. Filter by executable name fragment (e.g. "python", "ffmpeg") and/or window title (e.g. "RENDER VIDEO 02"). Returns PID, CPU%, RAM, title, command line, start time. Command lines are truncated to 120 chars unless full_command_line=true. Results are capped at 10 matches, windowed processes first.
| Parameter | Type | Description |
|---|---|---|
full_command_line | boolean | true for full command line (default: truncated to 120 chars) |
name_contains | string | Executable name fragment (case-insensitive) |
title_contains | string | Window title fragment (case-insensitive) |
list_processes
List running processes sorted by CPU. Use "top" to limit (default 25, max 200). Prefer check_process when searching for one process. Command lines truncated unless full_command_line=true.
| Parameter | Type | Description |
|---|---|---|
full_command_line | boolean | true for full command lines |
top | number | How many processes to return (default 25) |
list_windows
List open desktop windows: title, process, minimized/maximized state, position, Z-order, and which has focus. Replaces screenshots for "what is open".
get_system_status
Machine snapshot: CPU%, RAM used/total, GPU name and usage, disk free space per drive, network, uptime, active displays.
get_taskbar
Human view of the taskbar: pinned apps and running apps grouped with window titles.
read_window
Read TEXT from inside a window via UI Automation — no screenshot. Works with consoles (cmd, PowerShell, Windows Terminal), editors, and most native apps. Typical use: read render progress from a console ("frame 4812/5000"). Identify the window by title_contains or hwnd from list_windows.
| Parameter | Type | Description |
|---|---|---|
hwnd | number | Exact window handle from list_windows |
max_chars | number | Max characters (default 20000) |
title_contains | string | Window title fragment (case-insensitive) |
get_ui_tree
UI Automation tree of a window (roles, names, states) — the accessibility snapshot of a native Windows app. depth: default 4, max 30. max_nodes: default 200, max 1000 — max_nodes is the cost brake, NOT depth. Win32 apps expose content within 4-6 levels. Chromium/Electron apps (VS Code, Slack, Discord, Claude Desktop, Teams) bury real content under ~10 levels of Pane/Group wrappers: at low depth you get only empty Panes and conclude, wrongly, that the window is empty. Measured on Claude Desktop: depth=8 -> 15 useless nodes; depth=17 -> 115 nodes, 87 of them named (~8 KB) — the tree satura…
| Parameter | Type | Description |
|---|---|---|
depth | number | Max tree depth (default 4, max 30). 4-6 for native Win32; 15-20 for Chromium/Electron apps, whose content sits under ~10 wrapper levels. |
hwnd | number | Exact window handle |
max_nodes | number | Max nodes returned (default 200, max 1000). This is the token-cost brake — raise depth freely and cap cost here. |
title_contains | string | Window title fragment |
wait_for
Long-poll until a condition is met (or timeout). Replaces polling loops. Conditions: process_ended, process_started, file_stable (render/download done), file_exists, window_title_contains. Max 50s per call; if satisfied=false, call again to keep waiting.
| Parameter | Type | Description |
|---|---|---|
file_exists | string | File path that must appear |
file_stable | string | File path that must stop growing |
process_ended | string | Process name fragment that must exit |
process_started | string | Process name fragment that must start |
stable_for | number | For file_stable: seconds unchanged (default 10) |
timeout | number | Max wait seconds (default 50, max 50) |
window_title_contains | string | Window title fragment that must appear |
get_recent_events
Last 24h of PC events: process_started, process_ended (with duration), window_focused, file_changed. Useful for "what happened while I was away" (e.g. when did the render finish?).
| Parameter | Type | Description |
|---|---|---|
limit | number | Max events (default 50, max 1000) |
type | string | Filter by type (process_ended, file_changed, ...) |
check_file
File or folder status: exists, size, last modified, locked?, locking process. Ideal for checking if a render/export finished without opening Explorer.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path, e.g. D:/videos/output.mp4 |
get_app_knowledge
Query what AIPM learned locally about an app: successful (role, name) -> action recipes, plus common_failures (targets that keep failing — do not retry them). Call BEFORE acting in an app. Even with known=false you may get ui_shape: the shape of the app's UI tree (counts, roles, depth) learned passively from earlier reads — useful cold-start map. Pass the process name as shown in task manager (e.g. "notepad.exe", "chrome.exe").
| Parameter | Type | Description |
|---|---|---|
name * | string | App/process name (e.g. notepad.exe) |
get_economy_stats
Local economy metrics: tokens and time saved by structured state vs screenshots, queries served, task/action success rates, top apps, 24h/7d trends. Two independent views of savings — economy_measured_by_api (measured here) and economy_reported_by_agents (self-reported): never add them together. The store block states which local database the totals came from.
get_audit_log
Recent API audit log: which agents called which endpoints and when. Works even when the API is paused. For compliance and debugging agent behavior. Secrets and typed text (api_key=, value=) are masked before being recorded.
| Parameter | Type | Description |
|---|---|---|
limit | number | Max entries (default 50, max 1000) |
ui_find
List interactive UI elements in a window (buttons, fields, menus first; grid cells last). Each item has a stable global element_index plus can_invoke/can_set_value flags. Paginated (total/offset/limit/has_more). Read-only — no action tier required. Pass element_index to ui_invoke/ui_set_value.
| Parameter | Type | Description |
|---|---|---|
hwnd | number | Exact window handle |
limit | number | Page size (default 30, max 200) |
name_contains | string | Filter elements by name |
offset | number | Pagination offset (default 0) |
role | string | Filter by role (Button, Edit, MenuItem, ...) |
title_contains | string | Window title fragment |
ui_invoke
Semantically CLICK a UI element via UI Automation (button, menu item, checkbox). Target by name_contains or element_index from ui_find. REQUIRES user-enabled action tier + app allowlist; otherwise returns action_denied. Confirm with the user before acting.
| Parameter | Type | Description |
|---|---|---|
element_index | number | Stable index from ui_find |
hwnd | number | Exact window handle |
name_contains | string | Element name to click (e.g. "Save") |
title_contains | string | Window title fragment |
ui_set_value
Set text in an editable field via UI Automation (no key simulation). REQUIRES action tier + allowlist. Check can_set_value in ui_find; modern apps (e.g. Win11 Notepad) may not expose fields. Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
value * | string | Text to set |
element_index | number | Stable index from ui_find |
hwnd | number | Exact window handle |
name_contains | string | Field name |
title_contains | string | Window title fragment |
focus_window
Bring a window to the foreground. REQUIRES action tier + app allowlist.
| Parameter | Type | Description |
|---|---|---|
hwnd | number | Exact window handle |
title_contains | string | Window title fragment |
report_task_outcome
Report task outcome to local telemetry (metadata only — never screen content). Call at END of a computer-use task. Feeds get_app_knowledge and get_economy_stats.
| Parameter | Type | Description |
|---|---|---|
app * | string | Primary app (e.g. chrome.exe) |
duration_s | number | Duration in seconds |
notes | string | Short notes (metadata) |
screenshots_avoided | number | Screenshots avoided via structured state |
steps | number | Number of steps/actions |
success | boolean | Task succeeded? |
task | string | Short task description (metadata) |
tokens_estimated | number | Estimated tokens consumed |
report_action_outcome
Report one UI action outcome (invoke/set_value/focus). Feeds per-app recipes in get_app_knowledge. Metadata only — never screen content or typed text. Report FAILURES too (ok=false plus reason): they become common_failures and stop the next agent from repeating the same dead end.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action performed (invoke, set_value, focus) |
app * | string | App where action occurred |
element_name | string | Element name (e.g. "Save") |
element_role | string | Element role (Button, Edit, ...) |
ms | number | Action duration in ms |
ok | boolean | Action succeeded? |
reason | string | Only when ok=false. Closed vocabulary: elemento_nao_encontrado, elemento_nao_suporta_invoke, elemento_nao_suporta_set_value, campo_somente_leitura, janela_nao_encontrada, ui_timeout, acao_bloqueada, e… |