strix-agent 0.1.1__py3-none-any.whl

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 (99) hide show
  1. strix/__init__.py +0 -0
  2. strix/agents/StrixAgent/__init__.py +4 -0
  3. strix/agents/StrixAgent/strix_agent.py +60 -0
  4. strix/agents/StrixAgent/system_prompt.jinja +504 -0
  5. strix/agents/__init__.py +10 -0
  6. strix/agents/base_agent.py +394 -0
  7. strix/agents/state.py +139 -0
  8. strix/cli/__init__.py +4 -0
  9. strix/cli/app.py +1124 -0
  10. strix/cli/assets/cli.tcss +680 -0
  11. strix/cli/main.py +542 -0
  12. strix/cli/tool_components/__init__.py +39 -0
  13. strix/cli/tool_components/agents_graph_renderer.py +129 -0
  14. strix/cli/tool_components/base_renderer.py +61 -0
  15. strix/cli/tool_components/browser_renderer.py +107 -0
  16. strix/cli/tool_components/file_edit_renderer.py +95 -0
  17. strix/cli/tool_components/finish_renderer.py +32 -0
  18. strix/cli/tool_components/notes_renderer.py +108 -0
  19. strix/cli/tool_components/proxy_renderer.py +255 -0
  20. strix/cli/tool_components/python_renderer.py +34 -0
  21. strix/cli/tool_components/registry.py +72 -0
  22. strix/cli/tool_components/reporting_renderer.py +53 -0
  23. strix/cli/tool_components/scan_info_renderer.py +58 -0
  24. strix/cli/tool_components/terminal_renderer.py +99 -0
  25. strix/cli/tool_components/thinking_renderer.py +29 -0
  26. strix/cli/tool_components/user_message_renderer.py +43 -0
  27. strix/cli/tool_components/web_search_renderer.py +28 -0
  28. strix/cli/tracer.py +308 -0
  29. strix/llm/__init__.py +14 -0
  30. strix/llm/config.py +19 -0
  31. strix/llm/llm.py +310 -0
  32. strix/llm/memory_compressor.py +206 -0
  33. strix/llm/request_queue.py +63 -0
  34. strix/llm/utils.py +84 -0
  35. strix/prompts/__init__.py +113 -0
  36. strix/prompts/coordination/root_agent.jinja +41 -0
  37. strix/prompts/vulnerabilities/authentication_jwt.jinja +129 -0
  38. strix/prompts/vulnerabilities/business_logic.jinja +143 -0
  39. strix/prompts/vulnerabilities/csrf.jinja +168 -0
  40. strix/prompts/vulnerabilities/idor.jinja +164 -0
  41. strix/prompts/vulnerabilities/race_conditions.jinja +194 -0
  42. strix/prompts/vulnerabilities/rce.jinja +222 -0
  43. strix/prompts/vulnerabilities/sql_injection.jinja +216 -0
  44. strix/prompts/vulnerabilities/ssrf.jinja +168 -0
  45. strix/prompts/vulnerabilities/xss.jinja +221 -0
  46. strix/prompts/vulnerabilities/xxe.jinja +276 -0
  47. strix/runtime/__init__.py +19 -0
  48. strix/runtime/docker_runtime.py +298 -0
  49. strix/runtime/runtime.py +25 -0
  50. strix/runtime/tool_server.py +97 -0
  51. strix/tools/__init__.py +64 -0
  52. strix/tools/agents_graph/__init__.py +16 -0
  53. strix/tools/agents_graph/agents_graph_actions.py +610 -0
  54. strix/tools/agents_graph/agents_graph_actions_schema.xml +223 -0
  55. strix/tools/argument_parser.py +120 -0
  56. strix/tools/browser/__init__.py +4 -0
  57. strix/tools/browser/browser_actions.py +236 -0
  58. strix/tools/browser/browser_actions_schema.xml +183 -0
  59. strix/tools/browser/browser_instance.py +533 -0
  60. strix/tools/browser/tab_manager.py +342 -0
  61. strix/tools/executor.py +302 -0
  62. strix/tools/file_edit/__init__.py +4 -0
  63. strix/tools/file_edit/file_edit_actions.py +141 -0
  64. strix/tools/file_edit/file_edit_actions_schema.xml +128 -0
  65. strix/tools/finish/__init__.py +4 -0
  66. strix/tools/finish/finish_actions.py +167 -0
  67. strix/tools/finish/finish_actions_schema.xml +45 -0
  68. strix/tools/notes/__init__.py +14 -0
  69. strix/tools/notes/notes_actions.py +191 -0
  70. strix/tools/notes/notes_actions_schema.xml +150 -0
  71. strix/tools/proxy/__init__.py +20 -0
  72. strix/tools/proxy/proxy_actions.py +101 -0
  73. strix/tools/proxy/proxy_actions_schema.xml +267 -0
  74. strix/tools/proxy/proxy_manager.py +785 -0
  75. strix/tools/python/__init__.py +4 -0
  76. strix/tools/python/python_actions.py +47 -0
  77. strix/tools/python/python_actions_schema.xml +131 -0
  78. strix/tools/python/python_instance.py +172 -0
  79. strix/tools/python/python_manager.py +131 -0
  80. strix/tools/registry.py +196 -0
  81. strix/tools/reporting/__init__.py +6 -0
  82. strix/tools/reporting/reporting_actions.py +63 -0
  83. strix/tools/reporting/reporting_actions_schema.xml +30 -0
  84. strix/tools/terminal/__init__.py +4 -0
  85. strix/tools/terminal/terminal_actions.py +53 -0
  86. strix/tools/terminal/terminal_actions_schema.xml +114 -0
  87. strix/tools/terminal/terminal_instance.py +231 -0
  88. strix/tools/terminal/terminal_manager.py +191 -0
  89. strix/tools/thinking/__init__.py +4 -0
  90. strix/tools/thinking/thinking_actions.py +18 -0
  91. strix/tools/thinking/thinking_actions_schema.xml +52 -0
  92. strix/tools/web_search/__init__.py +4 -0
  93. strix/tools/web_search/web_search_actions.py +80 -0
  94. strix/tools/web_search/web_search_actions_schema.xml +83 -0
  95. strix_agent-0.1.1.dist-info/LICENSE +201 -0
  96. strix_agent-0.1.1.dist-info/METADATA +200 -0
  97. strix_agent-0.1.1.dist-info/RECORD +99 -0
  98. strix_agent-0.1.1.dist-info/WHEEL +4 -0
  99. strix_agent-0.1.1.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,183 @@
1
+ <?xml version="1.0" ?>
2
+ <tools>
3
+ <tool name="browser_action">
4
+ <description>Perform browser actions using a Playwright-controlled browser with multiple tabs.
5
+ The browser is PERSISTENT and remains active until explicitly closed, allowing for
6
+ multi-step workflows and long-running processes across multiple tabs.</description>
7
+ <parameters>
8
+ <parameter name="action" type="string" required="true">
9
+ </parameter>
10
+ <parameter name="url" type="string" required="false">
11
+ <description>Required for 'launch', 'goto', and optionally for 'new_tab' actions. The URL to launch the browser at, navigate to, or load in new tab. Must include appropriate protocol (e.g., http://, https://, file://).</description>
12
+ </parameter>
13
+ <parameter name="coordinate" type="string" required="false">
14
+ <description>Required for 'click', 'double_click', and 'hover' actions. Format: "x,y" (e.g., "432,321"). Coordinates should target the center of elements (buttons, links, etc.). Must be within the browser viewport resolution. Be very careful to calculate the coordinates correctly based on the previous screenshot.</description>
15
+ </parameter>
16
+ <parameter name="text" type="string" required="false">
17
+ <description>Required for 'type' action. The text to type in the field.</description>
18
+ </parameter>
19
+ <parameter name="tab_id" type="string" required="false">
20
+ <description>Required for 'switch_tab' and 'close_tab' actions. Optional for other actions to specify which tab to operate on. The ID of the tab to operate on. The first tab created during 'launch' has ID "tab_1". If not provided, actions will operate on the currently active tab.</description>
21
+ </parameter>
22
+ <parameter name="js_code" type="string" required="false">
23
+ <description>Required for 'execute_js' action. JavaScript code to execute in the page context. The code runs in the context of the current page and has access to the DOM and all page-defined variables and functions. The last evaluated expression's value is returned in the response.</description>
24
+ </parameter>
25
+ <parameter name="duration" type="string" required="false">
26
+ <description>Required for 'wait' action. Number of seconds to pause execution. Can be fractional (e.g., 0.5 for half a second).</description>
27
+ </parameter>
28
+ <parameter name="key" type="string" required="false">
29
+ <description>Required for 'press_key' action. The key to press. Valid values include: - Single characters: 'a'-'z', 'A'-'Z', '0'-'9' - Special keys: 'Enter', 'Escape', 'ArrowLeft', 'ArrowRight', etc. - Modifier keys: 'Shift', 'Control', 'Alt', 'Meta' - Function keys: 'F1'-'F12'</description>
30
+ </parameter>
31
+ <parameter name="file_path" type="string" required="false">
32
+ <description>Required for 'save_pdf' action. The file path where to save the PDF.</description>
33
+ </parameter>
34
+ <parameter name="clear" type="boolean" required="false">
35
+ <description>For 'get_console_logs' action: whether to clear console logs after retrieving them. Default is False (keep logs).</description>
36
+ </parameter>
37
+ </parameters>
38
+ <returns type="Dict[str, Any]">
39
+ <description>Response containing: - screenshot: Base64 encoded PNG of the current page state - url: Current page URL - title: Current page title - viewport: Current browser viewport dimensions - tab_id: ID of the current active tab - all_tabs: Dict of all open tab IDs and their URLs - message: Status message about the action performed - js_result: Result of JavaScript execution (for execute_js action) - pdf_saved: File path of saved PDF (for save_pdf action) - console_logs: Array of console messages (for get_console_logs action) Limited to 50KB total and 200 most recent logs. Individual messages truncated at 1KB. - page_source: HTML source code (for view_source action) Large pages are truncated to 100KB (keeping beginning and end sections).</description>
40
+ </returns>
41
+ <notes>
42
+ Important usage rules:
43
+ 1. PERSISTENCE: The browser remains active and maintains its state until
44
+ explicitly closed with the 'close' action. This allows for multi-step workflows
45
+ across multiple tool calls and tabs.
46
+ 2. Browser interaction MUST start with 'launch' and end with 'close'.
47
+ 3. Only one action can be performed per call.
48
+ 4. To visit a new URL not reachable from current page, either:
49
+ - Use 'goto' action
50
+ - Open a new tab with the URL
51
+ - Close browser and relaunch
52
+ 5. Click coordinates must be derived from the most recent screenshot.
53
+ 6. You MUST click on the center of the element, not the edge. You MUST calculate
54
+ the coordinates correctly based on the previous screenshot, otherwise the click
55
+ will fail. After clicking, check the new screenshot to verify the click was
56
+ successful.
57
+ 7. Tab management:
58
+ - First tab from 'launch' is "tab_1"
59
+ - New tabs are numbered sequentially ("tab_2", "tab_3", etc.)
60
+ - Must have at least one tab open at all times
61
+ - Actions affect the currently active tab unless tab_id is specified
62
+ 8. JavaScript execution (following Playwright evaluation patterns):
63
+ - Code runs in the browser page context, not the tool context
64
+ - Has access to DOM (document, window, etc.) and page variables/functions
65
+ - The LAST EVALUATED EXPRESSION is automatically returned - no return statement needed
66
+ - For simple values: document.title (returns the title)
67
+ - For objects: {title: document.title, url: location.href} (returns the object)
68
+ - For async operations: Use await and the promise result will be returned
69
+ - AVOID explicit return statements - they can break evaluation
70
+ - object literals must be wrapped in paranthesis when they are the final expression
71
+ - Variables from tool context are NOT available - pass data as parameters if needed
72
+ - Examples of correct patterns:
73
+ * Single value: document.querySelectorAll('img').length
74
+ * Object result: {images: document.images.length, links: document.links.length}
75
+ * Async operation: await fetch(location.href).then(r => r.status)
76
+ * DOM manipulation: document.body.style.backgroundColor = 'red'; 'background changed'
77
+
78
+ 9. Wait action:
79
+ - Time is specified in seconds
80
+ - Can be used to wait for page loads, animations, etc.
81
+ - Can be fractional (e.g., 0.5 seconds)
82
+ - Screenshot is captured after the wait
83
+ 10. The browser can operate concurrently with other tools. You may invoke
84
+ terminal, python, or other tools (in separate assistant messages) while maintaining
85
+ the active browser session, enabling sophisticated multi-tool workflows.
86
+ 11. Keyboard actions:
87
+ - Use press_key for individual key presses
88
+ - Use type for typing regular text
89
+ - Some keys have special names based on Playwright's key documentation
90
+ 12. All code in the js_code parameter is executed as-is - there's no need to
91
+ escape special characters or worry about formatting. Just write your JavaScript
92
+ code normally. It can be single line or multi-line.
93
+ 13. For form filling, click on the field first, then use 'type' to enter text.
94
+ 14. The browser runs in headless mode using Chrome engine for security and performance.
95
+ </notes>
96
+ <examples>
97
+ # Launch browser at URL (creates tab_1)
98
+ <function=browser_action>
99
+ <parameter=action>launch</parameter>
100
+ <parameter=url>https://example.com</parameter>
101
+ </function>
102
+
103
+ # Navigate to different URL
104
+ <function=browser_action>
105
+ <parameter=action>goto</parameter>
106
+ <parameter=url>https://github.com</parameter>
107
+ </function>
108
+
109
+ # Open new tab with different URL
110
+ <function=browser_action>
111
+ <parameter=action>new_tab</parameter>
112
+ <parameter=url>https://another-site.com</parameter>
113
+ </function>
114
+
115
+ # Wait for page load
116
+ <function=browser_action>
117
+ <parameter=action>wait</parameter>
118
+ <parameter=duration>2.5</parameter>
119
+ </function>
120
+
121
+ # Click login button at coordinates from screenshot
122
+ <function=browser_action>
123
+ <parameter=action>click</parameter>
124
+ <parameter=coordinate>450,300</parameter>
125
+ </function>
126
+
127
+ # Click username field and type
128
+ <function=browser_action>
129
+ <parameter=action>click</parameter>
130
+ <parameter=coordinate>400,200</parameter>
131
+ </function>
132
+
133
+ <function=browser_action>
134
+ <parameter=action>type</parameter>
135
+ <parameter=text>user@example.com</parameter>
136
+ </function>
137
+
138
+ # Click password field and type
139
+ <function=browser_action>
140
+ <parameter=action>click</parameter>
141
+ <parameter=coordinate>400,250</parameter>
142
+ </function>
143
+
144
+ <function=browser_action>
145
+ <parameter=action>type</parameter>
146
+ <parameter=text>mypassword123</parameter>
147
+ </function>
148
+
149
+ # Press Enter key
150
+ <function=browser_action>
151
+ <parameter=action>press_key</parameter>
152
+ <parameter=key>Enter</parameter>
153
+ </function>
154
+
155
+ # Execute JavaScript to get page stats (correct pattern - no return statement)
156
+ <function=browser_action>
157
+ <parameter=action>execute_js</parameter>
158
+ <parameter=js_code>const images = document.querySelectorAll('img');
159
+ const links = document.querySelectorAll('a');
160
+ {
161
+ images: images.length,
162
+ links: links.length,
163
+ title: document.title
164
+ }</parameter>
165
+ </function>
166
+
167
+ # Scroll down
168
+ <function=browser_action>
169
+ <parameter=action>scroll_down</parameter>
170
+ </function>
171
+
172
+ # Get console logs
173
+ <function=browser_action>
174
+ <parameter=action>get_console_logs</parameter>
175
+ </function>
176
+
177
+ # View page source
178
+ <function=browser_action>
179
+ <parameter=action>view_source</parameter>
180
+ </function>
181
+ </examples>
182
+ </tool>
183
+ </tools>