You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/askui/computer_agent.py
+25-3Lines changed: 25 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,9 @@ class ComputerAgent(Agent):
79
79
`display`.
80
80
settings (AgentSettings | None, optional): Provider-based model settings. If `None`, uses the default AskUI model stack.
81
81
retry (Retry, optional): The retry instance to use for retrying failed actions. Defaults to `ConfigurableRetry` with exponential backoff. Currently only supported for `locate()` method.
82
-
act_tools (list[Tool] | None, optional): Additional tools to make available for the `act()` method.
82
+
act_tools (list[Tool] | None, optional): Additional tools to make available for
83
+
the `act()` method for every call. Same tools can instead be passed per call
84
+
via `act(..., tools=[...])` (see example below).
83
85
84
86
Example:
85
87
Single local machine (the default):
@@ -136,6 +138,26 @@ class ComputerAgent(Agent):
136
138
)
137
139
agent.act("Kick off a release build on the build server")
138
140
```
141
+
142
+
Example (optional tools for `act()`):
143
+
Register tools from `askui.tools.store` (or your own `Tool` implementations)
144
+
either on the agent so they apply to all `act()` calls, or only for one call.
145
+
146
+
```python
147
+
from askui import ComputerAgent
148
+
from askui.tools.store.computer import ComputerSaveScreenshotTool
0 commit comments