agentyc 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. agentyc-0.1.0/.gitignore +86 -0
  2. agentyc-0.1.0/LICENSE +21 -0
  3. agentyc-0.1.0/PKG-INFO +263 -0
  4. agentyc-0.1.0/README.md +190 -0
  5. agentyc-0.1.0/agentyc/__init__.py +124 -0
  6. agentyc-0.1.0/agentyc/_utils_async.py +108 -0
  7. agentyc-0.1.0/agentyc/_utils_core.py +43 -0
  8. agentyc-0.1.0/agentyc/_utils_runtime.py +108 -0
  9. agentyc-0.1.0/agentyc/_utils_signals.py +204 -0
  10. agentyc-0.1.0/agentyc/_utils_strings.py +27 -0
  11. agentyc-0.1.0/agentyc/_utils_urls.py +103 -0
  12. agentyc-0.1.0/agentyc/actions.py +48 -0
  13. agentyc-0.1.0/agentyc/browser/__init__.py +41 -0
  14. agentyc-0.1.0/agentyc/browser/_cdp_timeout.py +125 -0
  15. agentyc-0.1.0/agentyc/browser/_element_click.py +257 -0
  16. agentyc-0.1.0/agentyc/browser/_profile_constants.py +138 -0
  17. agentyc-0.1.0/agentyc/browser/_profile_display.py +85 -0
  18. agentyc-0.1.0/agentyc/browser/_profile_extensions.py +325 -0
  19. agentyc-0.1.0/agentyc/browser/_profile_models.py +407 -0
  20. agentyc-0.1.0/agentyc/browser/_profile_types.py +45 -0
  21. agentyc-0.1.0/agentyc/browser/_profile_validation.py +47 -0
  22. agentyc-0.1.0/agentyc/browser/chrome_profiles.py +92 -0
  23. agentyc-0.1.0/agentyc/browser/collaboration.py +162 -0
  24. agentyc-0.1.0/agentyc/browser/demo_mode.py +135 -0
  25. agentyc-0.1.0/agentyc/browser/demo_mode_script.py +3 -0
  26. agentyc-0.1.0/agentyc/browser/element.py +927 -0
  27. agentyc-0.1.0/agentyc/browser/events.py +668 -0
  28. agentyc-0.1.0/agentyc/browser/keymap.py +176 -0
  29. agentyc-0.1.0/agentyc/browser/mouse.py +134 -0
  30. agentyc-0.1.0/agentyc/browser/page.py +564 -0
  31. agentyc-0.1.0/agentyc/browser/profile.py +56 -0
  32. agentyc-0.1.0/agentyc/browser/python_highlights.py +548 -0
  33. agentyc-0.1.0/agentyc/browser/session.py +914 -0
  34. agentyc-0.1.0/agentyc/browser/session_connection.py +660 -0
  35. agentyc-0.1.0/agentyc/browser/session_dom.py +783 -0
  36. agentyc-0.1.0/agentyc/browser/session_manager.py +805 -0
  37. agentyc-0.1.0/agentyc/browser/session_manager_support.py +226 -0
  38. agentyc-0.1.0/agentyc/browser/session_models.py +172 -0
  39. agentyc-0.1.0/agentyc/browser/session_navigation.py +398 -0
  40. agentyc-0.1.0/agentyc/browser/session_runtime.py +226 -0
  41. agentyc-0.1.0/agentyc/browser/session_shared_browser.py +416 -0
  42. agentyc-0.1.0/agentyc/browser/session_targets.py +600 -0
  43. agentyc-0.1.0/agentyc/browser/video_recorder.py +139 -0
  44. agentyc-0.1.0/agentyc/browser/views.py +205 -0
  45. agentyc-0.1.0/agentyc/browser/watchdog_base.py +321 -0
  46. agentyc-0.1.0/agentyc/browser/watchdogs/__init__.py +0 -0
  47. agentyc-0.1.0/agentyc/browser/watchdogs/aboutblank_watchdog.py +259 -0
  48. agentyc-0.1.0/agentyc/browser/watchdogs/captcha_watchdog.py +221 -0
  49. agentyc-0.1.0/agentyc/browser/watchdogs/crash_watchdog.py +361 -0
  50. agentyc-0.1.0/agentyc/browser/watchdogs/default_action_click_engine.py +700 -0
  51. agentyc-0.1.0/agentyc/browser/watchdogs/default_action_clicks.py +111 -0
  52. agentyc-0.1.0/agentyc/browser/watchdogs/default_action_dropdowns.py +686 -0
  53. agentyc-0.1.0/agentyc/browser/watchdogs/default_action_navigation.py +500 -0
  54. agentyc-0.1.0/agentyc/browser/watchdogs/default_action_text.py +765 -0
  55. agentyc-0.1.0/agentyc/browser/watchdogs/default_action_watchdog.py +36 -0
  56. agentyc-0.1.0/agentyc/browser/watchdogs/dom_watchdog.py +870 -0
  57. agentyc-0.1.0/agentyc/browser/watchdogs/downloads_core.py +516 -0
  58. agentyc-0.1.0/agentyc/browser/watchdogs/downloads_helpers.py +52 -0
  59. agentyc-0.1.0/agentyc/browser/watchdogs/downloads_network.py +496 -0
  60. agentyc-0.1.0/agentyc/browser/watchdogs/downloads_watchdog.py +61 -0
  61. agentyc-0.1.0/agentyc/browser/watchdogs/har_recording_watchdog.py +779 -0
  62. agentyc-0.1.0/agentyc/browser/watchdogs/local_browser_watchdog.py +506 -0
  63. agentyc-0.1.0/agentyc/browser/watchdogs/permissions_watchdog.py +43 -0
  64. agentyc-0.1.0/agentyc/browser/watchdogs/popups_watchdog.py +145 -0
  65. agentyc-0.1.0/agentyc/browser/watchdogs/recording_watchdog.py +223 -0
  66. agentyc-0.1.0/agentyc/browser/watchdogs/screenshot_watchdog.py +88 -0
  67. agentyc-0.1.0/agentyc/browser/watchdogs/security_watchdog.py +278 -0
  68. agentyc-0.1.0/agentyc/browser/watchdogs/storage_state_watchdog.py +373 -0
  69. agentyc-0.1.0/agentyc/browser/windowing.py +48 -0
  70. agentyc-0.1.0/agentyc/config.py +502 -0
  71. agentyc-0.1.0/agentyc/controller/__init__.py +3 -0
  72. agentyc-0.1.0/agentyc/dogfood.py +334 -0
  73. agentyc-0.1.0/agentyc/dom/constants.py +136 -0
  74. agentyc-0.1.0/agentyc/dom/enhanced_snapshot.py +181 -0
  75. agentyc-0.1.0/agentyc/dom/history.py +60 -0
  76. agentyc-0.1.0/agentyc/dom/markdown_extractor.py +534 -0
  77. agentyc-0.1.0/agentyc/dom/models.py +133 -0
  78. agentyc-0.1.0/agentyc/dom/node.py +386 -0
  79. agentyc-0.1.0/agentyc/dom/serializer/bbox.py +98 -0
  80. agentyc-0.1.0/agentyc/dom/serializer/clickable_elements.py +246 -0
  81. agentyc-0.1.0/agentyc/dom/serializer/compound.py +242 -0
  82. agentyc-0.1.0/agentyc/dom/serializer/constants.py +35 -0
  83. agentyc-0.1.0/agentyc/dom/serializer/eval_serializer.py +478 -0
  84. agentyc-0.1.0/agentyc/dom/serializer/html_serializer.py +346 -0
  85. agentyc-0.1.0/agentyc/dom/serializer/indexing.py +208 -0
  86. agentyc-0.1.0/agentyc/dom/serializer/paint_order.py +212 -0
  87. agentyc-0.1.0/agentyc/dom/serializer/rendering.py +328 -0
  88. agentyc-0.1.0/agentyc/dom/serializer/serializer.py +85 -0
  89. agentyc-0.1.0/agentyc/dom/serializer/tree.py +118 -0
  90. agentyc-0.1.0/agentyc/dom/service.py +112 -0
  91. agentyc-0.1.0/agentyc/dom/service_ax.py +70 -0
  92. agentyc-0.1.0/agentyc/dom/service_build.py +371 -0
  93. agentyc-0.1.0/agentyc/dom/service_fetch.py +320 -0
  94. agentyc-0.1.0/agentyc/dom/service_pagination.py +54 -0
  95. agentyc-0.1.0/agentyc/dom/service_visibility.py +91 -0
  96. agentyc-0.1.0/agentyc/dom/state.py +75 -0
  97. agentyc-0.1.0/agentyc/dom/utils.py +129 -0
  98. agentyc-0.1.0/agentyc/dom/views.py +53 -0
  99. agentyc-0.1.0/agentyc/exceptions.py +5 -0
  100. agentyc-0.1.0/agentyc/filesystem/__init__.py +0 -0
  101. agentyc-0.1.0/agentyc/filesystem/errors.py +4 -0
  102. agentyc-0.1.0/agentyc/filesystem/external_readers.py +154 -0
  103. agentyc-0.1.0/agentyc/filesystem/file_system.py +325 -0
  104. agentyc-0.1.0/agentyc/filesystem/file_types.py +226 -0
  105. agentyc-0.1.0/agentyc/filesystem/filename_policy.py +106 -0
  106. agentyc-0.1.0/agentyc/filesystem/state.py +11 -0
  107. agentyc-0.1.0/agentyc/integrations/gmail/__init__.py +24 -0
  108. agentyc-0.1.0/agentyc/integrations/gmail/actions.py +115 -0
  109. agentyc-0.1.0/agentyc/integrations/gmail/service.py +225 -0
  110. agentyc-0.1.0/agentyc/llm/__init__.py +164 -0
  111. agentyc-0.1.0/agentyc/llm/agentyc/__init__.py +3 -0
  112. agentyc-0.1.0/agentyc/llm/agentyc/chat.py +300 -0
  113. agentyc-0.1.0/agentyc/llm/anthropic/chat.py +260 -0
  114. agentyc-0.1.0/agentyc/llm/anthropic/serializer.py +328 -0
  115. agentyc-0.1.0/agentyc/llm/aws/__init__.py +36 -0
  116. agentyc-0.1.0/agentyc/llm/aws/chat_anthropic.py +258 -0
  117. agentyc-0.1.0/agentyc/llm/aws/chat_bedrock.py +279 -0
  118. agentyc-0.1.0/agentyc/llm/aws/serializer.py +257 -0
  119. agentyc-0.1.0/agentyc/llm/azure/chat.py +287 -0
  120. agentyc-0.1.0/agentyc/llm/base.py +59 -0
  121. agentyc-0.1.0/agentyc/llm/cerebras/chat.py +196 -0
  122. agentyc-0.1.0/agentyc/llm/cerebras/serializer.py +109 -0
  123. agentyc-0.1.0/agentyc/llm/copilot/__init__.py +3 -0
  124. agentyc-0.1.0/agentyc/llm/copilot/chat.py +389 -0
  125. agentyc-0.1.0/agentyc/llm/deepseek/chat.py +215 -0
  126. agentyc-0.1.0/agentyc/llm/deepseek/serializer.py +109 -0
  127. agentyc-0.1.0/agentyc/llm/exceptions.py +29 -0
  128. agentyc-0.1.0/agentyc/llm/google/__init__.py +3 -0
  129. agentyc-0.1.0/agentyc/llm/google/chat.py +605 -0
  130. agentyc-0.1.0/agentyc/llm/google/serializer.py +123 -0
  131. agentyc-0.1.0/agentyc/llm/groq/chat.py +231 -0
  132. agentyc-0.1.0/agentyc/llm/groq/parser.py +158 -0
  133. agentyc-0.1.0/agentyc/llm/groq/serializer.py +159 -0
  134. agentyc-0.1.0/agentyc/llm/litellm/__init__.py +3 -0
  135. agentyc-0.1.0/agentyc/llm/litellm/chat.py +227 -0
  136. agentyc-0.1.0/agentyc/llm/litellm/serializer.py +120 -0
  137. agentyc-0.1.0/agentyc/llm/messages.py +238 -0
  138. agentyc-0.1.0/agentyc/llm/mistral/__init__.py +5 -0
  139. agentyc-0.1.0/agentyc/llm/mistral/chat.py +221 -0
  140. agentyc-0.1.0/agentyc/llm/mistral/schema.py +34 -0
  141. agentyc-0.1.0/agentyc/llm/models.py +334 -0
  142. agentyc-0.1.0/agentyc/llm/oci_raw/__init__.py +10 -0
  143. agentyc-0.1.0/agentyc/llm/oci_raw/chat.py +445 -0
  144. agentyc-0.1.0/agentyc/llm/oci_raw/serializer.py +229 -0
  145. agentyc-0.1.0/agentyc/llm/ollama/chat.py +99 -0
  146. agentyc-0.1.0/agentyc/llm/ollama/serializer.py +143 -0
  147. agentyc-0.1.0/agentyc/llm/openai/chat.py +306 -0
  148. agentyc-0.1.0/agentyc/llm/openai/like.py +15 -0
  149. agentyc-0.1.0/agentyc/llm/openai/responses_serializer.py +142 -0
  150. agentyc-0.1.0/agentyc/llm/openai/serializer.py +165 -0
  151. agentyc-0.1.0/agentyc/llm/openrouter/chat.py +213 -0
  152. agentyc-0.1.0/agentyc/llm/openrouter/serializer.py +26 -0
  153. agentyc-0.1.0/agentyc/llm/schema.py +217 -0
  154. agentyc-0.1.0/agentyc/llm/vercel/__init__.py +3 -0
  155. agentyc-0.1.0/agentyc/llm/vercel/chat.py +673 -0
  156. agentyc-0.1.0/agentyc/llm/vercel/serializer.py +26 -0
  157. agentyc-0.1.0/agentyc/llm/views.py +48 -0
  158. agentyc-0.1.0/agentyc/logging_config.py +328 -0
  159. agentyc-0.1.0/agentyc/mcp/__init__.py +25 -0
  160. agentyc-0.1.0/agentyc/mcp/__main__.py +12 -0
  161. agentyc-0.1.0/agentyc/mcp/action_runtime.py +757 -0
  162. agentyc-0.1.0/agentyc/mcp/cdp_tools.py +605 -0
  163. agentyc-0.1.0/agentyc/mcp/cli.py +172 -0
  164. agentyc-0.1.0/agentyc/mcp/server.py +489 -0
  165. agentyc-0.1.0/agentyc/mcp/session_lifecycle.py +243 -0
  166. agentyc-0.1.0/agentyc/mcp/state.py +543 -0
  167. agentyc-0.1.0/agentyc/mcp/tool_dispatch.py +215 -0
  168. agentyc-0.1.0/agentyc/mcp/tool_schemas.py +558 -0
  169. agentyc-0.1.0/agentyc/observability.py +204 -0
  170. agentyc-0.1.0/agentyc/py.typed +0 -0
  171. agentyc-0.1.0/agentyc/screenshots/__init__.py +1 -0
  172. agentyc-0.1.0/agentyc/screenshots/service.py +52 -0
  173. agentyc-0.1.0/agentyc/telemetry/__init__.py +51 -0
  174. agentyc-0.1.0/agentyc/telemetry/service.py +112 -0
  175. agentyc-0.1.0/agentyc/telemetry/views.py +103 -0
  176. agentyc-0.1.0/agentyc/tokens/__init__.py +0 -0
  177. agentyc-0.1.0/agentyc/tokens/custom_pricing.py +33 -0
  178. agentyc-0.1.0/agentyc/tokens/mappings.py +4 -0
  179. agentyc-0.1.0/agentyc/tokens/service.py +605 -0
  180. agentyc-0.1.0/agentyc/tokens/views.py +109 -0
  181. agentyc-0.1.0/agentyc/tools/actions/__init__.py +18 -0
  182. agentyc-0.1.0/agentyc/tools/actions/completion.py +86 -0
  183. agentyc-0.1.0/agentyc/tools/actions/exploration.py +191 -0
  184. agentyc-0.1.0/agentyc/tools/actions/extraction.py +203 -0
  185. agentyc-0.1.0/agentyc/tools/actions/file_eval.py +155 -0
  186. agentyc-0.1.0/agentyc/tools/actions/interactions.py +429 -0
  187. agentyc-0.1.0/agentyc/tools/actions/navigation.py +170 -0
  188. agentyc-0.1.0/agentyc/tools/actions/rendering.py +125 -0
  189. agentyc-0.1.0/agentyc/tools/extraction/__init__.py +4 -0
  190. agentyc-0.1.0/agentyc/tools/extraction/common.py +70 -0
  191. agentyc-0.1.0/agentyc/tools/extraction/form_fields.py +87 -0
  192. agentyc-0.1.0/agentyc/tools/extraction/formatters.py +444 -0
  193. agentyc-0.1.0/agentyc/tools/extraction/markdown_parsers.py +156 -0
  194. agentyc-0.1.0/agentyc/tools/extraction/projection.py +391 -0
  195. agentyc-0.1.0/agentyc/tools/extraction/router.py +119 -0
  196. agentyc-0.1.0/agentyc/tools/extraction/schema_utils.py +168 -0
  197. agentyc-0.1.0/agentyc/tools/extraction/strategy.py +147 -0
  198. agentyc-0.1.0/agentyc/tools/extraction/views.py +17 -0
  199. agentyc-0.1.0/agentyc/tools/javascript.py +270 -0
  200. agentyc-0.1.0/agentyc/tools/registry/service.py +601 -0
  201. agentyc-0.1.0/agentyc/tools/registry/views.py +179 -0
  202. agentyc-0.1.0/agentyc/tools/runtime.py +207 -0
  203. agentyc-0.1.0/agentyc/tools/service.py +201 -0
  204. agentyc-0.1.0/agentyc/tools/utils.py +82 -0
  205. agentyc-0.1.0/agentyc/tools/views.py +181 -0
  206. agentyc-0.1.0/agentyc/utils.py +48 -0
  207. agentyc-0.1.0/pyproject.toml +219 -0
@@ -0,0 +1,86 @@
1
+ # Cache files
2
+ .DS_Store
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+ .mypy_cache/
7
+ .ruff_cache/
8
+ .pytest_cache/
9
+ .ipynb_checkpoints
10
+ ~/
11
+
12
+ # Virtual Environments
13
+ .venv*
14
+ venv/
15
+
16
+ # IDEs
17
+ .vscode/
18
+ .idea/
19
+
20
+ # Build files
21
+ dist/
22
+
23
+ # Data files
24
+ *.gif
25
+ *.txt
26
+ *.pdf
27
+ *.csv
28
+ *.json
29
+ *.jsonl
30
+ *.log
31
+ *.bak
32
+
33
+ # Secrets and sensitive files
34
+ secrets.env
35
+ .env
36
+ browser_cookies.json
37
+ cookies.json
38
+ gcp-login.json
39
+ saved_trajectories/
40
+ old_tests/
41
+ AgentHistory.json
42
+ AgentHistoryList.json
43
+ private_example.py
44
+ private_example
45
+ CLAUDE.local.md
46
+
47
+ uv.lock
48
+ temp
49
+ tmp
50
+
51
+ # Google API credentials
52
+ credentials.json
53
+ token.json
54
+
55
+ !docs/docs.json
56
+
57
+
58
+ temp-profile-*
59
+
60
+ screenshot.png
61
+
62
+ # *.md
63
+
64
+ all_github_issues_progress.md
65
+ all_github_issues.md
66
+
67
+ todo-input-token.md
68
+
69
+ TOOL_CHANGES_SUMMARY.md
70
+
71
+
72
+ claude-code-todo
73
+ result_judge.md
74
+ result.md
75
+ result2.md
76
+ result3.md
77
+ Brainstorm.md
78
+ example.ipynb
79
+ *SUMMARY.md
80
+ todo.md
81
+ product_extraction.ipynb
82
+ product_extraction.py
83
+ *report.md
84
+ plot.py
85
+
86
+ .claude/
agentyc-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Gregor Zunic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
agentyc-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,263 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentyc
3
+ Version: 0.1.0
4
+ Summary: Deterministic MCP-first browser automation runtime for coding agents
5
+ Project-URL: Homepage, https://github.com/distillation-labs/agentyc
6
+ Project-URL: Documentation, https://github.com/distillation-labs/agentyc/tree/main/docs
7
+ Project-URL: Repository, https://github.com/distillation-labs/agentyc
8
+ Project-URL: Source, https://github.com/distillation-labs/agentyc
9
+ Project-URL: Issues, https://github.com/distillation-labs/agentyc/issues
10
+ Project-URL: Changelog, https://github.com/distillation-labs/agentyc/releases
11
+ Author: Gregor Zunic
12
+ License-File: LICENSE
13
+ Keywords: browser-automation,cdp,chromium,coding-agents,mcp,model-context-protocol
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: <4.0,>=3.11
25
+ Requires-Dist: aiohttp==3.13.4
26
+ Requires-Dist: anthropic==0.76.0
27
+ Requires-Dist: anyio==4.12.1
28
+ Requires-Dist: bubus==1.5.6
29
+ Requires-Dist: cdp-use==1.4.5
30
+ Requires-Dist: google-api-core==2.29.0
31
+ Requires-Dist: google-api-python-client==2.188.0
32
+ Requires-Dist: google-auth-oauthlib==1.2.4
33
+ Requires-Dist: google-auth==2.48.0
34
+ Requires-Dist: google-genai==1.65.0
35
+ Requires-Dist: groq==1.0.0
36
+ Requires-Dist: httpx==0.28.1
37
+ Requires-Dist: markdownify==1.2.2
38
+ Requires-Dist: mcp==1.26.0
39
+ Requires-Dist: ollama==0.6.1
40
+ Requires-Dist: openai==2.16.0
41
+ Requires-Dist: pillow==12.2.0
42
+ Requires-Dist: posthog==7.7.0
43
+ Requires-Dist: psutil==7.2.2
44
+ Requires-Dist: pydantic==2.12.5
45
+ Requires-Dist: pyobjc==12.1; platform_system == 'darwin'
46
+ Requires-Dist: pyotp==2.9.0
47
+ Requires-Dist: pypdf==6.10.2
48
+ Requires-Dist: python-docx==1.2.0
49
+ Requires-Dist: python-dotenv==1.2.1
50
+ Requires-Dist: reportlab==4.4.9
51
+ Requires-Dist: requests==2.33.0
52
+ Requires-Dist: screeninfo==0.8.1; platform_system != 'darwin'
53
+ Requires-Dist: typing-extensions==4.15.0
54
+ Requires-Dist: uuid7==0.1.0
55
+ Provides-Extra: all
56
+ Requires-Dist: boto3==1.42.37; extra == 'all'
57
+ Requires-Dist: oci==2.166.0; extra == 'all'
58
+ Provides-Extra: aws
59
+ Requires-Dist: boto3==1.42.37; extra == 'aws'
60
+ Provides-Extra: copilot
61
+ Requires-Dist: github-copilot-sdk<0.2.0,>=0.1.0; extra == 'copilot'
62
+ Provides-Extra: eval
63
+ Requires-Dist: anyio==4.12.1; extra == 'eval'
64
+ Requires-Dist: datamodel-code-generator==0.53.0; extra == 'eval'
65
+ Requires-Dist: lmnr[all]==0.7.42; extra == 'eval'
66
+ Requires-Dist: psutil==7.2.2; extra == 'eval'
67
+ Provides-Extra: oci
68
+ Requires-Dist: oci==2.166.0; extra == 'oci'
69
+ Provides-Extra: video
70
+ Requires-Dist: imageio[ffmpeg]==2.37.2; extra == 'video'
71
+ Requires-Dist: numpy==2.4.1; extra == 'video'
72
+ Description-Content-Type: text/markdown
73
+
74
+ # agentyc
75
+
76
+ Deterministic, MCP-first browser automation for coding agents.
77
+
78
+ `agentyc` ships a public stdio MCP server for Chrome or Chromium automation plus the Python session primitives that back that server. The public contract is centered on deterministic browser control, token-aware state snapshots, and deterministic extraction without LLM fallback.
79
+
80
+ ## What It Is
81
+
82
+ - Public stdio MCP server exposed by the `agentyc` console script.
83
+ - Browser control over CDP through `agentyc.mcp.server`, `agentyc.tools.service`, `agentyc.mcp.state`, and `agentyc.browser.session`.
84
+ - Deterministic extraction routes in `agentyc.tools.extraction.router` for common page structures.
85
+ - Python imports such as `AgentycServer`, `BrowserSession`, `BrowserProfile`, and `Tools` for direct embedding.
86
+
87
+ The default MCP path does not require an API key for navigation, interaction, state inspection, screenshots, HTML access, cookies, or deterministic extraction.
88
+
89
+ ## Install
90
+
91
+ ```bash
92
+ uv tool install agentyc
93
+ ```
94
+
95
+ From source:
96
+
97
+ ```bash
98
+ uv venv --python 3.11
99
+ source .venv/bin/activate
100
+ uv sync --dev
101
+ ```
102
+
103
+ ## Run The MCP Server
104
+
105
+ Start the stdio MCP server:
106
+
107
+ ```bash
108
+ agentyc
109
+ ```
110
+
111
+ Equivalent explicit form:
112
+
113
+ ```bash
114
+ agentyc mcp
115
+ ```
116
+
117
+ Override the idle timeout for the browser session tracked by the server:
118
+
119
+ ```bash
120
+ agentyc --session-timeout-minutes 20
121
+ ```
122
+
123
+ Shared-browser collaboration flags are also available on `agentyc mcp` and the no-subcommand form:
124
+
125
+ - `--runtime-label`
126
+ - `--runtime-role`
127
+ - `--parent-runtime-id`
128
+ - `--shared-browser-mode`
129
+ - `--shared-browser-window-bounds`
130
+ - `--shared-browser-focus-policy`
131
+
132
+ ## Shared Browser Mode
133
+
134
+ Launch a Chrome or Chromium instance with remote debugging enabled and print its CDP WebSocket URL:
135
+
136
+ ```bash
137
+ agentyc browser --detach
138
+ ```
139
+
140
+ Attach the MCP server to that browser instead of launching a separate browser process:
141
+
142
+ ```bash
143
+ agentyc mcp --cdp-url ws://127.0.0.1:9222/devtools/browser/...
144
+ ```
145
+
146
+ Current shared-browser behavior is intentionally narrow:
147
+
148
+ - Each attached MCP server creates a collaboration target in the shared browser: a tab by default, or a separate window when `--shared-browser-mode window` is used.
149
+ - Attach and `new_tab=true` flows update the runtime's focused target automatically.
150
+ - Visible browser activation is controlled by `--shared-browser-focus-policy`: `preserve` avoids stealing the human-focused surface, while `activate` explicitly foregrounds the runtime target.
151
+ - `browser_get_state` and `browser_list_tabs` surface ownership metadata, display titles, and optional window bounds for shared-browser targets.
152
+ - Stock Chrome and CDP do not provide reliable per-tab color ownership cues.
153
+ - Shared-browser workflows should be treated as best-effort collaboration, not hard isolation.
154
+
155
+ ## MCP Tool Surface
156
+
157
+ Navigation and state:
158
+
159
+ - `browser_navigate`
160
+ - `browser_go_back`
161
+ - `browser_go_forward`
162
+ - `browser_refresh`
163
+ - `browser_wait`
164
+ - `browser_wait_for_network_idle`
165
+ - `browser_get_state`
166
+ - `browser_get_html`
167
+ - `browser_screenshot`
168
+
169
+ Interaction:
170
+
171
+ - `browser_click`
172
+ - `browser_right_click`
173
+ - `browser_double_click`
174
+ - `browser_hover`
175
+ - `browser_drag_to`
176
+ - `browser_type`
177
+ - `browser_press_key`
178
+ - `browser_scroll`
179
+ - `browser_scroll_to_text`
180
+ - `browser_select_option`
181
+ - `browser_get_dropdown_options`
182
+ - `browser_upload_file`
183
+
184
+ Inspection and extraction:
185
+
186
+ - `browser_extract_content`
187
+ - `browser_find_elements`
188
+ - `browser_search_page`
189
+ - `browser_wait_for_element`
190
+ - `browser_get_focused_element`
191
+ - `browser_evaluate`
192
+
193
+ Tabs, cookies, and session state:
194
+
195
+ - `browser_list_tabs`
196
+ - `browser_switch_tab`
197
+ - `browser_close_tab`
198
+ - `browser_get_cookies`
199
+ - `browser_set_cookies`
200
+ - `browser_clear_cookies`
201
+ - `browser_save_state`
202
+ - `browser_load_state`
203
+
204
+ Observability and lifecycle:
205
+
206
+ - `browser_get_console_logs`
207
+ - `browser_get_network_log`
208
+ - `browser_list_sessions`
209
+ - `browser_close_session`
210
+ - `browser_close_all`
211
+
212
+ The public server exposes tools only. It does not publish MCP resources or prompts.
213
+
214
+ ## State And Element Targeting
215
+
216
+ `browser_get_state` is the primary inspection primitive.
217
+
218
+ - Stable element refs such as `e123` are derived from backend node ids.
219
+ - `mode` supports `auto`, `full`, `min`, and `focus`.
220
+ - `since_hash` allows unchanged-state checks without resending interactive element payloads.
221
+ - Compact state payloads can surface `compaction_strategy`, truncation counts, ownership, and runtime metadata when relevant.
222
+ - Screenshots are returned as MCP image content, with JSON metadata in a separate text payload.
223
+
224
+ Prefer refs from `browser_get_state` over legacy numeric `index` arguments.
225
+
226
+ ## Deterministic Extraction
227
+
228
+ `browser_extract_content` in the public MCP server is deterministic-only.
229
+
230
+ - No LLM fallback is used in the public server.
231
+ - Compatible routes include links, link collections, images, tables, lists, form fields, and key-value blocks.
232
+ - `output_schema` is supported when the query matches a deterministic route.
233
+ - Unsupported free-form requests return an explicit error instead of silently degrading.
234
+ - Responses include `<extraction_metadata>` describing the route and truncation state.
235
+
236
+ This means the default extraction path works without any API key.
237
+
238
+ ## Python Surface
239
+
240
+ The package also exposes Python imports for direct integration:
241
+
242
+ ```python
243
+ from agentyc import AgentycServer, BrowserProfile, BrowserSession, Tools
244
+ ```
245
+
246
+ The public product story is still MCP-first. Direct Python usage is available for embedding or lower-level control.
247
+
248
+ ## Development
249
+
250
+ ```bash
251
+ ./scripts/lint.sh
252
+ ./scripts/test.sh
253
+ uv build
254
+ ```
255
+
256
+ ## Docs
257
+
258
+ - `docs/overview.md`
259
+ - `docs/features.md`
260
+ - `docs/architecture.md`
261
+ - `docs/api.md`
262
+ - `docs/configuration.md`
263
+ - `docs/tech-stack.md`
@@ -0,0 +1,190 @@
1
+ # agentyc
2
+
3
+ Deterministic, MCP-first browser automation for coding agents.
4
+
5
+ `agentyc` ships a public stdio MCP server for Chrome or Chromium automation plus the Python session primitives that back that server. The public contract is centered on deterministic browser control, token-aware state snapshots, and deterministic extraction without LLM fallback.
6
+
7
+ ## What It Is
8
+
9
+ - Public stdio MCP server exposed by the `agentyc` console script.
10
+ - Browser control over CDP through `agentyc.mcp.server`, `agentyc.tools.service`, `agentyc.mcp.state`, and `agentyc.browser.session`.
11
+ - Deterministic extraction routes in `agentyc.tools.extraction.router` for common page structures.
12
+ - Python imports such as `AgentycServer`, `BrowserSession`, `BrowserProfile`, and `Tools` for direct embedding.
13
+
14
+ The default MCP path does not require an API key for navigation, interaction, state inspection, screenshots, HTML access, cookies, or deterministic extraction.
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ uv tool install agentyc
20
+ ```
21
+
22
+ From source:
23
+
24
+ ```bash
25
+ uv venv --python 3.11
26
+ source .venv/bin/activate
27
+ uv sync --dev
28
+ ```
29
+
30
+ ## Run The MCP Server
31
+
32
+ Start the stdio MCP server:
33
+
34
+ ```bash
35
+ agentyc
36
+ ```
37
+
38
+ Equivalent explicit form:
39
+
40
+ ```bash
41
+ agentyc mcp
42
+ ```
43
+
44
+ Override the idle timeout for the browser session tracked by the server:
45
+
46
+ ```bash
47
+ agentyc --session-timeout-minutes 20
48
+ ```
49
+
50
+ Shared-browser collaboration flags are also available on `agentyc mcp` and the no-subcommand form:
51
+
52
+ - `--runtime-label`
53
+ - `--runtime-role`
54
+ - `--parent-runtime-id`
55
+ - `--shared-browser-mode`
56
+ - `--shared-browser-window-bounds`
57
+ - `--shared-browser-focus-policy`
58
+
59
+ ## Shared Browser Mode
60
+
61
+ Launch a Chrome or Chromium instance with remote debugging enabled and print its CDP WebSocket URL:
62
+
63
+ ```bash
64
+ agentyc browser --detach
65
+ ```
66
+
67
+ Attach the MCP server to that browser instead of launching a separate browser process:
68
+
69
+ ```bash
70
+ agentyc mcp --cdp-url ws://127.0.0.1:9222/devtools/browser/...
71
+ ```
72
+
73
+ Current shared-browser behavior is intentionally narrow:
74
+
75
+ - Each attached MCP server creates a collaboration target in the shared browser: a tab by default, or a separate window when `--shared-browser-mode window` is used.
76
+ - Attach and `new_tab=true` flows update the runtime's focused target automatically.
77
+ - Visible browser activation is controlled by `--shared-browser-focus-policy`: `preserve` avoids stealing the human-focused surface, while `activate` explicitly foregrounds the runtime target.
78
+ - `browser_get_state` and `browser_list_tabs` surface ownership metadata, display titles, and optional window bounds for shared-browser targets.
79
+ - Stock Chrome and CDP do not provide reliable per-tab color ownership cues.
80
+ - Shared-browser workflows should be treated as best-effort collaboration, not hard isolation.
81
+
82
+ ## MCP Tool Surface
83
+
84
+ Navigation and state:
85
+
86
+ - `browser_navigate`
87
+ - `browser_go_back`
88
+ - `browser_go_forward`
89
+ - `browser_refresh`
90
+ - `browser_wait`
91
+ - `browser_wait_for_network_idle`
92
+ - `browser_get_state`
93
+ - `browser_get_html`
94
+ - `browser_screenshot`
95
+
96
+ Interaction:
97
+
98
+ - `browser_click`
99
+ - `browser_right_click`
100
+ - `browser_double_click`
101
+ - `browser_hover`
102
+ - `browser_drag_to`
103
+ - `browser_type`
104
+ - `browser_press_key`
105
+ - `browser_scroll`
106
+ - `browser_scroll_to_text`
107
+ - `browser_select_option`
108
+ - `browser_get_dropdown_options`
109
+ - `browser_upload_file`
110
+
111
+ Inspection and extraction:
112
+
113
+ - `browser_extract_content`
114
+ - `browser_find_elements`
115
+ - `browser_search_page`
116
+ - `browser_wait_for_element`
117
+ - `browser_get_focused_element`
118
+ - `browser_evaluate`
119
+
120
+ Tabs, cookies, and session state:
121
+
122
+ - `browser_list_tabs`
123
+ - `browser_switch_tab`
124
+ - `browser_close_tab`
125
+ - `browser_get_cookies`
126
+ - `browser_set_cookies`
127
+ - `browser_clear_cookies`
128
+ - `browser_save_state`
129
+ - `browser_load_state`
130
+
131
+ Observability and lifecycle:
132
+
133
+ - `browser_get_console_logs`
134
+ - `browser_get_network_log`
135
+ - `browser_list_sessions`
136
+ - `browser_close_session`
137
+ - `browser_close_all`
138
+
139
+ The public server exposes tools only. It does not publish MCP resources or prompts.
140
+
141
+ ## State And Element Targeting
142
+
143
+ `browser_get_state` is the primary inspection primitive.
144
+
145
+ - Stable element refs such as `e123` are derived from backend node ids.
146
+ - `mode` supports `auto`, `full`, `min`, and `focus`.
147
+ - `since_hash` allows unchanged-state checks without resending interactive element payloads.
148
+ - Compact state payloads can surface `compaction_strategy`, truncation counts, ownership, and runtime metadata when relevant.
149
+ - Screenshots are returned as MCP image content, with JSON metadata in a separate text payload.
150
+
151
+ Prefer refs from `browser_get_state` over legacy numeric `index` arguments.
152
+
153
+ ## Deterministic Extraction
154
+
155
+ `browser_extract_content` in the public MCP server is deterministic-only.
156
+
157
+ - No LLM fallback is used in the public server.
158
+ - Compatible routes include links, link collections, images, tables, lists, form fields, and key-value blocks.
159
+ - `output_schema` is supported when the query matches a deterministic route.
160
+ - Unsupported free-form requests return an explicit error instead of silently degrading.
161
+ - Responses include `<extraction_metadata>` describing the route and truncation state.
162
+
163
+ This means the default extraction path works without any API key.
164
+
165
+ ## Python Surface
166
+
167
+ The package also exposes Python imports for direct integration:
168
+
169
+ ```python
170
+ from agentyc import AgentycServer, BrowserProfile, BrowserSession, Tools
171
+ ```
172
+
173
+ The public product story is still MCP-first. Direct Python usage is available for embedding or lower-level control.
174
+
175
+ ## Development
176
+
177
+ ```bash
178
+ ./scripts/lint.sh
179
+ ./scripts/test.sh
180
+ uv build
181
+ ```
182
+
183
+ ## Docs
184
+
185
+ - `docs/overview.md`
186
+ - `docs/features.md`
187
+ - `docs/architecture.md`
188
+ - `docs/api.md`
189
+ - `docs/configuration.md`
190
+ - `docs/tech-stack.md`
@@ -0,0 +1,124 @@
1
+ import os
2
+ from asyncio import base_subprocess
3
+ from typing import TYPE_CHECKING
4
+
5
+ from agentyc.logging_config import setup_logging
6
+
7
+ # Only set up logging if not in MCP mode or if explicitly requested
8
+ if os.environ.get('AGENTYC_SETUP_LOGGING', 'true').lower() != 'false':
9
+ from agentyc.config import CONFIG
10
+
11
+ debug_log_file = getattr(CONFIG, 'AGENTYC_DEBUG_LOG_FILE', None)
12
+ info_log_file = getattr(CONFIG, 'AGENTYC_INFO_LOG_FILE', None)
13
+ logger = setup_logging(debug_log_file=debug_log_file, info_log_file=info_log_file)
14
+ else:
15
+ import logging
16
+
17
+ logger = logging.getLogger('agentyc')
18
+
19
+ _original_del = base_subprocess.BaseSubprocessTransport.__del__
20
+
21
+
22
+ def _patched_del(self):
23
+ """Avoid noisy RuntimeError when subprocess cleanup runs after loop shutdown."""
24
+ try:
25
+ if hasattr(self, '_loop') and self._loop and self._loop.is_closed():
26
+ return
27
+ _original_del(self)
28
+ except RuntimeError as e:
29
+ if 'Event loop is closed' not in str(e):
30
+ raise
31
+
32
+
33
+ base_subprocess.BaseSubprocessTransport.__del__ = _patched_del
34
+
35
+
36
+ if TYPE_CHECKING:
37
+ from agentyc.actions import ActionModel, ActionResult
38
+ from agentyc.browser import BrowserProfile, BrowserSession
39
+ from agentyc.browser import BrowserSession as Browser
40
+ from agentyc.dom.service import DomService
41
+ from agentyc.llm import models
42
+ from agentyc.llm.agentyc.chat import ChatAgentyc
43
+ from agentyc.llm.anthropic.chat import ChatAnthropic
44
+ from agentyc.llm.azure.chat import ChatAzureOpenAI
45
+ from agentyc.llm.copilot.chat import ChatGitHubCopilot
46
+ from agentyc.llm.google.chat import ChatGoogle
47
+ from agentyc.llm.groq.chat import ChatGroq
48
+ from agentyc.llm.litellm.chat import ChatLiteLLM
49
+ from agentyc.llm.mistral.chat import ChatMistral
50
+ from agentyc.llm.oci_raw.chat import ChatOCIRaw
51
+ from agentyc.llm.ollama.chat import ChatOllama
52
+ from agentyc.llm.openai.chat import ChatOpenAI
53
+ from agentyc.llm.vercel.chat import ChatVercel
54
+ from agentyc.mcp.server import AgentycServer
55
+ from agentyc.tools.service import Controller, Tools
56
+
57
+
58
+ _LAZY_IMPORTS = {
59
+ 'ActionModel': ('agentyc.actions', 'ActionModel'),
60
+ 'ActionResult': ('agentyc.actions', 'ActionResult'),
61
+ 'BrowserSession': ('agentyc.browser', 'BrowserSession'),
62
+ 'Browser': ('agentyc.browser', 'BrowserSession'),
63
+ 'BrowserProfile': ('agentyc.browser', 'BrowserProfile'),
64
+ 'Tools': ('agentyc.tools.service', 'Tools'),
65
+ 'Controller': ('agentyc.tools.service', 'Controller'),
66
+ 'DomService': ('agentyc.dom.service', 'DomService'),
67
+ 'ChatOpenAI': ('agentyc.llm.openai.chat', 'ChatOpenAI'),
68
+ 'ChatGoogle': ('agentyc.llm.google.chat', 'ChatGoogle'),
69
+ 'ChatAnthropic': ('agentyc.llm.anthropic.chat', 'ChatAnthropic'),
70
+ 'ChatAgentyc': ('agentyc.llm.agentyc.chat', 'ChatAgentyc'),
71
+ 'ChatGitHubCopilot': ('agentyc.llm.copilot.chat', 'ChatGitHubCopilot'),
72
+ 'ChatGroq': ('agentyc.llm.groq.chat', 'ChatGroq'),
73
+ 'ChatLiteLLM': ('agentyc.llm.litellm.chat', 'ChatLiteLLM'),
74
+ 'ChatMistral': ('agentyc.llm.mistral.chat', 'ChatMistral'),
75
+ 'ChatAzureOpenAI': ('agentyc.llm.azure.chat', 'ChatAzureOpenAI'),
76
+ 'ChatOCIRaw': ('agentyc.llm.oci_raw.chat', 'ChatOCIRaw'),
77
+ 'ChatOllama': ('agentyc.llm.ollama.chat', 'ChatOllama'),
78
+ 'ChatVercel': ('agentyc.llm.vercel.chat', 'ChatVercel'),
79
+ 'AgentycServer': ('agentyc.mcp.server', 'AgentycServer'),
80
+ 'models': ('agentyc.llm.models', None),
81
+ }
82
+
83
+
84
+ def __getattr__(name: str):
85
+ """Lazy import mechanism - only import modules when they're actually accessed."""
86
+ if name in _LAZY_IMPORTS:
87
+ module_path, attr_name = _LAZY_IMPORTS[name]
88
+ try:
89
+ from importlib import import_module
90
+
91
+ module = import_module(module_path)
92
+ attr = module if attr_name is None else getattr(module, attr_name)
93
+ globals()[name] = attr
94
+ return attr
95
+ except ImportError as e:
96
+ raise ImportError(f'Failed to import {name} from {module_path}: {e}') from e
97
+
98
+ raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
99
+
100
+
101
+ __all__ = [
102
+ 'ActionModel',
103
+ 'ActionResult',
104
+ 'BrowserSession',
105
+ 'Browser',
106
+ 'BrowserProfile',
107
+ 'Controller',
108
+ 'DomService',
109
+ 'AgentycServer',
110
+ 'ChatOpenAI',
111
+ 'ChatGoogle',
112
+ 'ChatAnthropic',
113
+ 'ChatAgentyc',
114
+ 'ChatGitHubCopilot',
115
+ 'ChatGroq',
116
+ 'ChatLiteLLM',
117
+ 'ChatMistral',
118
+ 'ChatAzureOpenAI',
119
+ 'ChatOCIRaw',
120
+ 'ChatOllama',
121
+ 'ChatVercel',
122
+ 'Tools',
123
+ 'models',
124
+ ]