Deputy

v0.1.6
io.github.zraisan/deputy Checked 2 days ago Published 1 month ago

Any web page as a typed tool call, run in your own logged-in Chrome.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

browser_capabilities What can the browser do right now?

The full contract of every open tab: each form as a typed tool with its JSON Schema (types, allowed values, min/max, required fields), what those fields currently hold, and every button and link with a ref you can click. This is what you read instead of a screenshot — it is complete, so you should not need to probe. Long pages return a window of their links: the reply always states the true total, and you can narrow with actionQuery or page with actionOffset.

ParameterTypeDescription
actionLimitnumberHow many actions to return (default 25).
actionOffsetnumberSkip this many actions, for paging through a long list.
actionQuerystringOnly return buttons/links whose label contains this text. Use it when you know what you want.

browser_invoke Do something on the page

Call one of the tools browser_capabilities listed, with arguments matching its inputSchema. This acts in the real logged-in browser: it fills and submits the actual form.

ParameterTypeDescription
tool *stringTool name exactly as browser_capabilities reported it.
argsobjectArguments matching the tool inputSchema.
tabIdnumber

browser_fill Fill one field by ref

Set a single field to a value, addressed by the ref browser_capabilities gave it. Use this on pages Deputy could not graft into a typed tool — apps that build a form out of divs, or inputs sitting outside any <form>. For a checkbox pass "true"/"false"; for a <select> pass an option value or its visible text. When a typed tool exists, browser_invoke is better.

ParameterTypeDescription
ref *stringField ref from browser_capabilities actions, e.g. "a13".
value *stringValue to set.
tabIdnumber

browser_click Click a button or link

Click something browser_capabilities listed under "actions", by its ref.

ParameterTypeDescription
ref *stringAction ref, e.g. "a10".
tabIdnumber

browser_read Read a page as text

Return the page as plain text for you to read yourself. Use browser_ask instead when you only need one fact: with Deputy Pro, Deputy reads the page and answers in a sentence. Use this when you genuinely need the content to reason over.

ParameterTypeDescription
maxCharsnumberCap the returned text (default 6000).
tabIdnumber

browser_navigate Open a URL, or go back, forward or reload

Point a tab at a URL and wait for it to load, or move through its history with action "back" / "forward", or "reload" it. Deputy re-reads what the new page can do, so call browser_capabilities afterwards to see the tools that appeared. Without a tabId, the first URL opens a tab of your own and later calls stay in it, so the user's page and other agents' tabs are left alone; other tools act on that tab too. To work on the page the user has open, pass its tabId (browser_capabilities marks it active).

ParameterTypeDescription
actionstringInstead of a URL: move through history, or reload.
tabIdnumber
urlstringAbsolute URL to open.

browser_tabs List, open, switch or close tabs

Work with browser tabs. "list" shows every tab; "open" opens a URL in a new tab and makes it active; "select" makes a tab active (other tools act on the active tab by default); "close" closes one.

ParameterTypeDescription
action *string
tabIdnumberFor "select" and "close".
urlstringFor "open".

browser_wait Wait for the page

Wait until text appears, text disappears, or an element becomes visible — for pages that load content after the fact (search results, spinners, SPAs). With no condition, waits timeoutMs. Fails with a clear message on timeout.

ParameterTypeDescription
selectorstringWait until an element matching this CSS selector is visible.
tabIdnumber
textstringWait until this text is on the page.
textGonestringWait until this text is gone (e.g. "Loading…").
timeoutMsnumberGive up after this long (default 10000, max 60000).

browser_screenshot See the page

Take a screenshot and return the image to you. An image costs you roughly 1,000-1,600 tokens, so use it when you need to SEE something: visual or frontend work, layout and styling, charts, images, canvas. For facts on a page prefer browser_ask or browser_read; to act, prefer browser_capabilities. fullPage stitches the whole scrollable page, including anything off the right edge (costs more). ref or selector captures a single element whole, even one wider or taller than the viewport.

ParameterTypeDescription
formatstringjpeg (default, small) or png (sharper text, much larger).
fullPagebooleanCapture the whole scrollable page, not just the viewport.
maxDimensionnumberLongest edge in pixels (default 1280).
refstringCapture only this element (a ref from browser_capabilities).
selectorstringCapture only the first element matching this CSS selector.
tabIdnumber

browser_find Find elements

Find elements by visible text, role (button, link, textbox, checkbox, combobox, option, heading, tab, menuitem, dialog, img, row, cell) or CSS selector. Returns refs you can pass to browser_act, browser_inspect or browser_screenshot, with label, state and value. Reaches inside forms, open and closed shadow roots, and elements off screen.

ParameterTypeDescription
exactbooleanMatch the whole text exactly.
includeHiddenboolean
limitnumberDefault 20.
rolestring
selectorstring
tabIdnumber
textstringVisible text or accessible name to match (substring, case-insensitive).

browser_act Act on an element

Do one thing to an element: click, double_click, right_click, hover, focus, type (value; replaces unless append), press (keys like "Enter", "Tab", "Escape", "ArrowDown", "Control+a"; without a target, presses on the focused element), check, uncheck, select (value = option label or value, native or custom dropdown), clear, scroll_into_view. Typing is sent key by key so autocompletes react. The result reports any dialog or error the action caused. For whole forms, prefer browser_invoke with the typed tool. With no ref, text names the element as the page shows it (a button's words, a field's labe…

ParameterTypeDescription
acceptDialogbooleanAccept the confirm/prompt dialog this action opens (dialogs are dismissed by default).
actionstring
appendbooleanFor type: add to the existing text instead of replacing it.
dialogTextstringWith acceptDialog: what to type into a prompt.
keysstringFor press: e.g. "Enter" or "Shift+Tab".
refstringElement ref from browser_find or browser_capabilities.
selectorstringCSS selector, if you have no ref.
stepsarraySeveral actions in order, in one call (e.g. open a dropdown, pick an option, press Join). Stops at the first that fails.
tabIdnumber
textstringVisible text or label of the element, if you have no ref.
valuestringText to type, or the option to select.

browser_scroll Scroll

Scroll the page (or an element) down/up, by pixels, or to top/bottom. untilStable keeps scrolling to the bottom while an infinite feed keeps loading, and reports how much it grew. Finds the real scroll container in app layouts where the window itself does not scroll.

ParameterTypeDescription
bynumberPixels (default: most of a screen).
directionstring
maxRoundsnumberFor untilStable (default 10).
refstringElement ref from browser_find or browser_capabilities.
selectorstringCSS selector, if you have no ref.
tabIdnumber
tostring
untilStableboolean

browser_drag Drag and drop

Drag one element onto another (HTML5 drag-and-drop, or pointer-driven libraries such as kanban boards).

ParameterTypeDescription
fromRefstring
fromSelectorstring
tabIdnumber
toRefstring
toSelectorstring

browser_upload Upload files

Attach local files (absolute paths, 25 MB total) to a file input, or drop them onto a drop zone.

ParameterTypeDescription
paths *array
refstringElement ref from browser_find or browser_capabilities.
selectorstringCSS selector, if you have no ref.
tabIdnumber

browser_inspect Inspect layout and CSS

With a ref or selector: the element's box model, position, computed CSS (or the properties you name), flex/grid layout, visibility, text contrast, overflow, and what is covering it. With no target: a layout audit of the whole page — horizontal overflow and its culprits, clipped text, broken images, missing alt text, small tap targets, low-contrast text, layout shift, fonts. Numbers instead of a screenshot, for CSS debugging.

ParameterTypeDescription
propertiesarrayCSS properties to report, e.g. ["gap", "margin-top"].
refstringElement ref from browser_find or browser_capabilities.
selectorstringCSS selector, if you have no ref.
tabIdnumber

browser_extract Extract data

Turn a table, or a repeated list (search results, product cards, feed items), into JSON rows; or list the links. kind "auto" picks the biggest table, else the biggest repeated list. Scope it with a ref or selector. Pair with browser_scroll untilStable for infinite feeds.

ParameterTypeDescription
kindstring
limitnumberRows to return (default 50).
refstringElement ref from browser_find or browser_capabilities.
selectorstringCSS selector, if you have no ref.
tabIdnumber

browser_console Console and errors

Console messages and page errors: uncaught exceptions with stacks, unhandled rejections, failed resources, and console output from when an agent started driving the tab. Filter by levels (error, warn, info, log, debug). Browser-internal messages (CSP, CORS) are not visible without the debugger.

ParameterTypeDescription
clearbooleanEmpty the log after reading.
levelsarray
limitnumber
tabIdnumber

browser_network Network requests

Requests the page made: method, URL, status, time, type, size, for fetch/XHR and every resource (documents, scripts, styles, images). failedOnly shows 4xx/5xx and network errors. includeBodies adds text/JSON response bodies (first 4 KB) captured while an agent drives the tab.

ParameterTypeDescription
clearboolean
failedOnlyboolean
filterstringOnly URLs containing this.
includeBodiesboolean
limitnumber
tabIdnumber

browser_dialog Answer dialogs

Decide how alert/confirm/prompt dialogs are answered on a tab you are driving. By default they are dismissed (a confirm returns false) and reported in the action result. Call this BEFORE the action that opens the dialog: accept for the next dialog, persist to keep answering that way.

ParameterTypeDescription
accept *boolean
persistboolean
tabIdnumber
textstringWhat to type into a prompt.

browser_resize Resize the viewport

Set the page viewport to a width and height in CSS pixels, e.g. 375×812 to check a mobile layout. This resizes the user's real window: call with reset: true when done to put it back.

ParameterTypeDescription
heightinteger
resetbooleanPut the window back to its size before Deputy first resized it.
tabIdnumber
widthinteger

browser_eval Run JavaScript in the page

Run JavaScript in the page and return its JSON-serialisable result. An expression returns its value; for statements, use return. Promises are awaited. Runs in the page's own world by default (sees its globals); world "isolated" keeps it apart. Needs Chrome's "Allow User Scripts" switch for Deputy; the error says how to turn it on.

ParameterTypeDescription
code *string
tabIdnumber
worldstring

browser_downloads Downloads

Files the browser downloaded. "list" shows recent downloads; "wait" waits for the one just started (by a click) to finish; "read" returns a finished download by id (the newest if no id): text files as text, PDFs as extracted text, other files as their path, type and size.

ParameterTypeDescription
action *string
idnumber
timeoutMsnumberFor wait (default 30000).

browser_look Look at the page (Pro)

A vision model looks at the page and answers in text: describe it, or answer your question about what is visible (layout, images, charts, whether something looks broken). Costs you a few hundred tokens instead of an image, and works in clients that cannot show images. Deputy Pro.

ParameterTypeDescription
questionstring
tabIdnumber

browser_ask Ask about a page instead of looking at it

Ask a question about what is on a browser tab. Deputy reads the page itself and returns a short answer. Use this instead of screenshotting or dumping the DOM — the page never enters your context, so a lookup costs a couple of hundred tokens rather than tens of thousands. Without a model, it returns the passages relevant to your question instead.

ParameterTypeDescription
question *stringWhat you want to know, e.g. "what is the cheapest result?"
tabIdnumberTab to read. Defaults to the active tab.

delegate_goal Delegate a goal to the browser

Hand the browser agent a goal in plain language and let it work. It knows the page, the session you are signed into, and what each form accepts. Prefer this over driving the browser yourself — you never need to see the page.

ParameterTypeDescription
goal *stringWhat you want done, e.g. "search for a cordless drill under $80".
tabIdnumberTab to work in. Defaults to the active tab.

task_status Check a delegated task

Poll a task by id. Use when a delegation is still running or was interrupted.

ParameterTypeDescription
taskId *string

answer_task Answer a paused task

Resume a task that stopped because it needed a human — a confirmation, or a sign-in that has now been completed in the browser.

ParameterTypeDescription
answer *string
taskId *string