Catalog PyPI
PACKAGE EXPLORERView in registry

agentyc

PyPI

Deterministic MCP-first browser automation runtime for coding agents

browser-automationcdpchromiumcoding-agentsmcpmodel-context-protocol
Versions collected1
Direct dependencies37From release 0.3.3
Last observed21 Oct, 09:01 UTC

README

Version 0.3.3 documentation

agentyc

Deterministic, MCP-first browser automation for coding agents.
No API key needed. No LLM fallback. Just CDP, stdio MCP, live HUD surfaces, and 77 tools.

Python ≥3.11 MIT MCP stdio CDP-native PyPI GitHub Stars Repo views


What Is It

agentyc ships a public stdio MCP server for browser automation. It speaks CDP directly — no Playwright, no Puppeteer, no LLM fallback. Every tool is deterministic, every response is compact, and the default path works with zero API keys.

For coding agents that need to read a page, click a button, fill a form, or extract a table — agentyc is the browser backend.

uv tool install agentyc
agentyc                          # Starts the MCP server — that's it

How It Compares

agentycbrowser-usePlaywright MCP
Protocolstdio MCP (native)Python script + custom loopMCP wrapper over library
LLM requiredNoYes (planner)No
ExtractionDeterministic routes (7 families)LLM-basedRaw page access
State snapshotsToken-aware, compact, since_hash pollingFull DOM dumpFull DOM or accessibility tree
Element targetingStable refs (e123) survive re-rendersXPath/CSS selectorsPlaywright locators
Browser backendCDP direct (no Playwright)PlaywrightPlaywright
Extraction API keyNot neededN/ANot needed
Auto-close defaultNo (session stays alive)VariesVaries
Parallel agent modelShared browser profile + per-runtime owned tabsN/AN/A
Dependencies~20 core (lean)~40+ (heavy)Playwright + SDK
Install sizeSmall (Python package)Very largeModerate
Tool count77~15-20 actions~20 tools
Console/Network captureCDP-native built-inLimitedLimited
Deterministic extractionTables, lists, forms, links, images, key-valueNone (LLM only)None
Headless by defaultNo (visible), flag for headlessConfigurableConfigurable

agentyc is not a testing framework or an autonomous agent loop. It is a browser MCP: launch it, give your agent 77 tools, let it inspect and interact — deterministically, compactly, without an LLM in the critical path.


Quick Start

# 1. Install
uv tool install agentyc

# 2. Run the MCP server
agentyc

# 3. Configure your agent
agentyc init     # writes agentyc-skill.md — point Claude Code/Cursor at it

Add to opencode.json:

{
  "mcp": {
    "agentyc": {
      "type": "local",
      "command": ["uv", "run", "agentyc", "mcp"]
    }
  }
}

From source:

uv venv --python 3.11
source .venv/bin/activate
uv sync --dev

Bootstrap Your Agent

agentyc init                      # writes agentyc-skill.md
agentyc init --output .agent.md   # custom path
agentyc init --print              # stdout
agentyc init --force              # overwrite

The skills guide covers: read→ref→act loop, tool-selection rules, since_hash polling, shared-browser reuse with --reuse-local-browser / AGENTYC_REUSE_LOCAL_BROWSER, same-browser versus same-tab safety, frame listing and frame HTML inspection, storage and cookie workflows, precise network waits, network entry inspection and replay, narrow network mocks, per-tab offline/throttling controls, right-click / double-click / drag flows, debug bundles, dynamic-text waits, error recovery, long-page search, multi-tab handoff, extraction routes, auth persistence, parallel agents, headless release-readiness flows (viewport, DOM stability, downloads, trace/log hygiene, PDF export), dialog acknowledgments after auto-handled prompts, JS evaluation, and a fuller quick-reference tool list.


Live HUD

When BrowserProfile(demo_mode=True) is enabled, Agentyc injects a high-visibility HUD into the controlled browser page. It shows the current step, a short recent timeline, a DETAILS toggle with sanitized tool/session/argument context, and a REPORT menu that copies sanitized context before opening the repo's bug-report, feature-request, or private security flow.

For local operator visibility outside the browser, agentyc mcp --hud-overlay opens a small transparent desktop HUD window that mirrors the same sanitized activity stream. Agents can also call browser_set_intent to push a short human-readable status label into both HUD surfaces.


MCP Surface: 77 Tools

Navigation & State (15 tools)

ToolWhat it does
browser_navigateNavigate to a URL, optionally in a new tab
browser_go_backHistory back
browser_go_forwardHistory forward
browser_refreshReload current page
browser_waitWait N seconds (bounded)
browser_wait_for_urlWait until the current page URL matches a substring or regex
browser_wait_for_network_idleWait until AJAX/XHR settles
browser_wait_for_requestWait for a matching request by URL, method, or resource type
browser_wait_for_responseWait for a matching response or network failure by URL, method, or status
browser_wait_for_stable_domWait until DOM mutations settle via MutationObserver
browser_get_statePrimary primitive — structured DOM with stable refs, screenshots, 4 modes
browser_get_htmlRaw HTML (full or CSS-selected)
browser_screenshotViewport or full-page screenshot (WebP/JPEG/PNG, configurable format, resize, quality)
browser_save_as_pdfSave current page as PDF via CDP Page.printToPDF
browser_set_viewportSet browser viewport width, height, and scale

Interaction (14 tools)

ToolWhat it does
browser_clickClick by ref, index, label, or viewport coordinates; can also wait for a download, new tab, URL change, matching request, or matching response
browser_right_clickContext menu
browser_double_clickDouble-click (text selection, file open)
browser_hoverTrigger hover states and menus
browser_drag_toDrag source to target (kanban, sliders, drop zones)
browser_typeClear and type into a field by ref, index, or label
browser_fill_formBatch text, selects, uploads, and checkbox/radio toggles in one round trip
browser_press_keySend keys / shortcuts (Enter, Tab, Meta+r)
browser_scrollScroll page or element
browser_scroll_to_textBring text into viewport
browser_select_optionPick a <select> option by visible text, targeting by ref, index, or label
browser_get_dropdown_optionsInspect all options in a combobox by ref, index, or label
browser_upload_fileUpload a file to a file input by ref, index, or label
browser_handle_dialogAccept/dismiss JS dialogs (alert, confirm, prompt)

Inspection & Extraction (7 tools)

ToolWhat it does
browser_extract_contentDeterministic extraction — tables, lists, forms, links, images, key-value
browser_find_elementsCSS selector search
browser_search_pageCtrl+F for text or regex
browser_wait_for_elementPoll until text/appears or disappears
browser_get_focused_elementCurrent keyboard focus
browser_get_attributeGet attribute from element by ref/index (href, src, value, disabled)
browser_evaluateExecute JavaScript in page context

Frames & Storage (5 tools)

ToolWhat it does
browser_list_framesList known frames with frame IDs, URLs, and cross-origin markers
browser_get_frame_htmlRaw HTML for one frame by frame_id
browser_get_storageInspect localStorage / sessionStorage by origin, type, or key
browser_set_storageSet one localStorage / sessionStorage key for the current origin
browser_clear_storageClear one key, one storage area, or all storage for the current origin

Tabs & Session State (17 tools)

ToolWhat it does
browser_new_tabCreate tab + switch focus — parallel agent primitive
browser_list_tabsList open tabs, grouped by owning agent/runtime by default
browser_switch_tabSwitch by 4-char tab_id
browser_close_tabClose by tab_id
browser_wait_for_tabWait for a new tab to appear and optionally switch focus to it
browser_get_cookiesRead cookies for current domain
browser_set_cookiesInject cookies (auth persistence)
browser_clear_cookiesDelete one or all cookies
browser_grant_permissionsGrant browser permissions such as geolocation for the current or explicit origin
browser_set_geolocationOverride browser geolocation for the current session
browser_set_extra_headersSet or clear extra HTTP headers for the focused page target
browser_set_user_agentOverride the user agent, platform, and optional Accept-Language for the focused page target
browser_set_timezoneOverride the timezone for the focused page target
browser_set_localeOverride the locale for the focused page target
browser_emulate_mediaEmulate CSS media type and key user-preference media features
browser_save_statePersist cookies + storage to disk
browser_load_stateRestore cookies + storage from disk

Observability, Network Control & Lifecycle (19 tools)

ToolWhat it does
browser_get_console_logsCDP-native console capture (log/warn/error)
browser_get_network_logCDP-native network log with optional headers
browser_inspect_network_entryInspect one captured request/response with optional bodies
browser_add_network_mockAdd a narrow URL-matching fulfill/abort rule for the active tab
browser_remove_network_mockRemove one mock rule or clear them all
browser_list_network_mocksList active mock rules and match counts
browser_set_network_conditionsApply offline or throttling conditions to the active tab
browser_get_network_conditionsList active per-tab network conditions
browser_replay_requestReplay a captured request with optional header/body overrides
browser_export_debug_bundleBundle state, console, network, trace summary, optional HTML, and screenshot in one round-trip
browser_set_intentPublish a short operator-facing intent label into the live HUD surfaces
browser_get_downloadsList downloaded files from the session
browser_wait_for_downloadWait for a download to finish and return the matched file metadata
browser_clear_logsClear console and/or network log buffers
browser_start_traceStart CDP performance trace
browser_stop_traceStop trace and return collected events as JSON
browser_list_sessionsList tracked sessions
browser_close_sessionClose one session
browser_close_allClose all sessions

State & Element Targeting

browser_get_state is the primary inspection primitive.

ModeBehavior
autoFull state on small pages, compact ranked on dense pages
fullComplete interactive-element payload
minCompact ranked subset (default 9-element budget with adaptive trimming and viewport-aware scoring)
focusSingle-element payload
  • Stable refs: Elements get e123 refs derived from backend node IDs — survive re-renders.
  • since_hash: Poll unchanged pages with changed=false — zero element payload sent.
  • In min mode: elements within 2× viewport height get a proximity score boost.
  • Unchanged responses: still return url, title, state_hash, current_tab_id, scroll position.
  • Shared-browser tabs: tabs stays flat for compatibility, and tab_groups groups tabs by owning agent/runtime by default.
  • Screenshots: delivered as MCP image content, not embedded base64. Screenshot format, size, quality, and grayscale are configurable via BrowserSession constructor parameters (see LLM Screenshot Optimization).

Best practice: Start with mode="min", use since_hash for follow-up reads, escalate to mode="full" only when compact payload omitted something you need.


LLM Screenshot Optimization

Screenshots are the dominant token cost in browser automation. Agentyc automatically resizes and compresses screenshots before delivering them to the LLM, reducing token consumption by about 8.3× on the benchmark fixture with no measured regression in the validated headless flows.

Config fieldDefaultDescription
llm_screenshot_size(480, 270)Target resize in pixels. None for full-viewport resolution.
llm_screenshot_format"webp"Output format — "png", "jpeg", or "webp". WebP gives best size.
llm_screenshot_quality85Compression quality 1–100 (JPEG/WebP).
llm_screenshot_grayscaleFalseConvert to grayscale before encoding (saves ~20-30%).

Set these via the BrowserSession constructor:

session = BrowserSession(
    llm_screenshot_size=(480, 270),
    llm_screenshot_format='webp',
    llm_screenshot_quality=85,
)

Benchmark (1280×720 viewport, 3-run median):

FormatSizeBase64Tokens (est.)vs Baseline
PNG (baseline)1280×72058,816B~23,526—
JPEG q=85640×36022,748B~9,0992.6× smaller
WebP q=85 (default)480×2707,116B~2,8468.3× smaller
Gray JPEG q=60320×1804,460B~1,78413.2× smaller

All resize/encode operations complete in 30–50ms — negligible compared to CDP capture time.


Deterministic Extraction

browser_extract_content is deterministic-only — no LLM fallback, no API key required.

Supported route families:

RouteExtracts
Links<a> elements
Link collectionsNav menus, pagination, result lists
Images<img> + alt text
Tables<table> rows and cells
Lists<ul> / <ol> items
Form fieldsInputs, selects, textareas
Key-valueDefinition lists, property panels
  • output_schema works when the query matches a deterministic route.
  • Unrecognized queries return an explicit error with examples — no silent degradation.
  • Responses include <extraction_metadata> with route and truncation info.

Shared Browser & Parallel Agents

# Start a browser for sharing
agentyc browser --port 9222 --detach
# → ws://127.0.0.1:9222/devtools/browser/...

# Reuse the latest locally launched Agentyc browser automatically
agentyc mcp --reuse-local-browser

# Attach MCP servers to it
agentyc mcp --cdp-url ws://127.0.0.1:9222/devtools/browser/...

Parallel automation flow:

  1. Primary agent starts a shared browser with agentyc browser --detach
  2. Each subagent either spawns agentyc mcp --cdp-url <url> or uses agentyc mcp --reuse-local-browser / AGENTYC_REUSE_LOCAL_BROWSER=1 — Agentyc claims a dedicated collaboration tab in the shared browser profile
  3. Subagents can immediately navigate and work in that owned tab; browser_new_tab is only needed when one subagent wants an additional tab of its own
  4. Subagents operate independently — refs, network logs, and console logs stay scoped to the owned tab, while auth/cookies/local storage remain shared with the browser profile
  5. Primary coordinates and collects results

When multiple runtimes share one browser, Agentyc surfaces a grouped tab view by default so developers can quickly see which agent owns how many tabs.

Collaboration flags:

  • --runtime-label — human-readable ownership label
  • --runtime-role — primary / assistant
  • --shared-browser-mode — tab (default) or window
  • --shared-browser-focus-policy — preserve or activate
  • --shared-browser-window-bounds — JSON bounds for window mode
  • --reuse-local-browser — auto-attach to the latest locally launched Agentyc browser without copying a CDP URL around

Shared-browser reuse means the same browser process and profile. Each runtime still claims its own collaboration tab or window; Chrome does not provide a safe public contract for multiple agents to co-own the exact same tab.


Debugging Loops

  • browser_export_debug_bundle returns one compact artifact with current state, recent console logs, recent network activity, pending requests, trace summary, optional scoped HTML, and an optional screenshot.
  • browser_wait_for_request / browser_wait_for_response are the precise sync primitives for API-heavy apps when generic networkidle is too blunt.
  • browser_inspect_network_entry / browser_replay_request turn captured traffic into a concrete request/response artifact with optional bodies, then let agents reissue the same call with narrow overrides.
  • browser_add_network_mock / browser_set_network_conditions provide deterministic per-tab stubbing, offline mode, and throttling without switching to a separate test runner abstraction.
  • Network waits, inspection, replay, and mocks all build on the same CDP capture/interception layer, so agents can wait for a specific call and then inspect or control the matching traffic immediately.

Perceived Speed

agentyc helps separate browser work from agent thinking time:

  • MCP log notifications — emit start/completion/error tool-phase messages through MCP logging when the client enables them.
  • Tool timing — every result includes _meta.agentyc/browser_duration_ms and agentyc/tool_phase.
  • Since-hash polling — unchanged pages avoid resending interactive-element payloads.
  • Compact mode — mode="min" surfaces the 30 most actionable elements with proximity scoring.
  • Agent narration — agents should narrate intent briefly before a likely pause: "Waiting for validation to finish."

Benchmarks

Measured by the release-gate benchmark suite (scripts/benchmark_mcp_runtime.py --preset dogfood --release-gate). The values below are the median of two confirmed headless runs on current HEAD:

MetricThresholdCurrent
Python import time≤ 2500 ms194.4 ms
Cold-start session init≤ 35000 ms1027.4 ms
auto payload reduction≥ 8.0%10.2%
auto element recall≥ 0.991.0
min element recall≥ 0.991.0
Deterministic extraction recall≥ 0.991.0
Structured extraction recall≥ 0.991.0
Action success rate≥ 1.01.0
Collaboration check pass rate≥ 1.01.0
Collaboration latencyinformational1283.1 ms

Confirmed headless stdio tool-surface median across two runs (scripts/benchmark_mcp_stdio_e2e.py --targets source --minimum-total-calls 100):

  • success / accuracy / precision: 1.0 / 1.0 / 1.0
  • total duration: 24140.0 ms
  • average / p95 tool latency: 43.3 ms / 161.6 ms

Python Surface

from agentyc import AgentycServer, BrowserSession, BrowserProfile, Tools

server = AgentycServer(session_timeout_minutes=20)
await server.run()

The primary public story is MCP-first. Direct Python imports are available for embedding or lower-level control.


Configuration

CLI flagDefaultDescription
--session-timeout-minutes0 (never)Auto-close idle sessions
--hud-overlayoffShow a small transparent desktop HUD for sanitized live activity
--cdp-url—Attach to existing browser
--reuse-local-browseroff unless enabled explicitly or via envReuse the latest locally launched Agentyc browser
--runtime-label—Ownership label for shared browser
--runtime-role—Collaboration role
--shared-browser-modetabtab or window
--shared-browser-focus-policypreservepreserve or activate

BrowserSession config

Constructor paramDefaultDescription
llm_screenshot_size(480, 270)Target resize for LLM screenshots. None = full resolution.
llm_screenshot_format"webp"Output format: "png", "jpeg", or "webp".
llm_screenshot_quality85Compression 1–100 (JPEG/WebP).
llm_screenshot_grayscaleFalseGrayscale encoding (~20-30% savings).
browser_profilerequiredBrowserProfile instance.
headlessFalseOverride headless mode.

Environment variables

AGENTYC_HEADLESS, AGENTYC_HUD_OVERLAY, AGENTYC_ALLOWED_DOMAINS, AGENTYC_ACTION_TIMEOUT_S, AGENTYC_PROXY_*, AGENTYC_LOGGING_LEVEL.

Browser defaults

headless=false, downloads_path=~/Downloads/agentyc-mcp, user_data_dir=~/.config/agentyc/profiles/default.


Development

source .venv/bin/activate
./scripts/lint.sh     # ruff
./scripts/test.sh     # pytest + pytest-asyncio
uv run pyright        # static types
uv build              # package

Docs


License

MIT — see LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.331 May 202637

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
distillation-labs/agentyc

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:01 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:62fb451932277c2cfe2783a930d42b860f8a49d1b80c98469c1e94ebc5c107f1