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
-**`strategy`**: The caching strategy to use (`"execute"`, `"record"`, `"both"`, or `None`).
37
+
-**`strategy`**: The caching strategy to use (`"execute"`, `"record"`, `"auto"`, or `None`).
38
38
-**`cache_dir`**: Directory where cache files are stored. Defaults to `".cache"`.
39
39
-**`filename`**: Name of the cache file to write to or read from. If not specified in record mode, a timestamped filename will be generated automatically (format: `cached_trajectory_YYYYMMDDHHMMSSffffff.json`).
40
40
-**`execute_cached_trajectory_tool_settings`**: Configuration for the trajectory execution tool (optional). See [Execution Settings](#execution-settings) below.
@@ -73,7 +73,7 @@ with ComputerAgent() as agent:
73
73
agent.act(
74
74
goal="Fill out the login form with username 'admin' and password 'secret123'",
75
75
caching_settings=CachingSettings(
76
-
strategy="record", # you could also use "both" here
76
+
strategy="record", # you could also use "auto" here
77
77
cache_dir=".cache",
78
78
filename="login_test.json"
79
79
)
@@ -94,7 +94,7 @@ with ComputerAgent() as agent:
94
94
agent.act(
95
95
goal="Fill out the login form",
96
96
caching_settings=CachingSettings(
97
-
strategy="execute", # you could also use "both" here
97
+
strategy="execute", # you could also use "auto" here
98
98
cache_dir=".cache"
99
99
)
100
100
)
@@ -109,7 +109,7 @@ The agent will automatically check if a relevant cached trajectory exists and us
109
109
110
110
### Referencing Cache Files in Goal Prompts
111
111
112
-
When using `strategy="execute"` or `strategy="both"`, **you need to inform the agent about which cache files are available and when to use them**. This is done by including cache file information directly in your goal prompt.
112
+
When using `strategy="execute"` or `strategy="auto"`, **you need to inform the agent about which cache files are available and when to use them**. This is done by including cache file information directly in your goal prompt.
113
113
114
114
#### Explicit Cache File References
115
115
@@ -233,7 +233,7 @@ This is particularly useful when:
233
233
- UI elements take time to become interactive after appearing
234
234
- You're testing on slower hardware or environments
235
235
236
-
### Using Both Strategies
236
+
### Using Auto Strategy
237
237
238
238
Enable both reading and writing simultaneously:
239
239
@@ -245,7 +245,7 @@ with ComputerAgent() as agent:
245
245
agent.act(
246
246
goal="Complete the checkout process",
247
247
caching_settings=CachingSettings(
248
-
strategy="both",
248
+
strategy="auto",
249
249
cache_dir=".cache",
250
250
filename="checkout_test.json"
251
251
)
@@ -323,7 +323,7 @@ The delay between actions can be customized using `CachedExecutionToolSettings`
323
323
## Limitations
324
324
325
325
-**UI State Sensitivity**: Cached trajectories assume the UI is in the same state as when they were recorded. If the UI has changed, the replay may fail or produce incorrect results.
326
-
-**No on_message Callback**: When using `strategy="record"` or `strategy="both"`, you cannot provide a custom `on_message` callback, as the caching system uses this callback to record actions.
326
+
-**No on_message Callback**: When using `strategy="record"` or `strategy="auto"`, you cannot provide a custom `on_message` callback, as the caching system uses this callback to record actions.
327
327
-**Verification Required**: After executing a cached trajectory, the agent should verify that the results are correct, as UI changes may cause partial failures.
0 commit comments