Skip to content

Commit 228d7ae

Browse files
Merge pull request #236 from askui/chore/act_conversation_with_caching
Migrate act() to conversation-based architecture with Speaker pattern and add caching v2 features.
2 parents e89ed04 + c85141f commit 228d7ae

76 files changed

Lines changed: 5149 additions & 1651 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,6 @@ reports/
169169
/askui_chat.db-shm
170170
/askui_chat.db-wal
171171
.cache/
172+
.askui_cache/*
172173

173174
bom.json

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,18 @@ with ComputerAgent() as agent:
112112

113113
Ready to build your first agent? Check out our documentation:
114114

115-
1. **[Start Here](docs/00_overview.md)** - Overview and core concepts
116-
2. **[Setup](docs/01_setup.md)** - Installation and configuration
117-
3. **[Using Agents](docs/02_using_agents.md)** - Using the AskUI ComputerAgent and AndroidAgent
118-
4. **[System Prompts](docs/03_prompting.md)** - How to write effective instructions
119-
5. **[Using Models](docs/04_using_models.md)** - Using different models as backbone for act, get, and locate
120-
6. **[BYOM](docs/05_bring_your_own_model_provider.md)** - use your own model cloud by plugging in your own model provider
121-
7. **[Caching](docs/06_caching.md)** - Optimize performance and costs
122-
8. **[Tools](docs/07_tools.md)** - Extend agent capabilities
123-
9. **[Reporting](docs/08_reporting.md)** - Obtain agent logs as execution reports and summaries as test reports
124-
10. **[Observability](docs/09_observability_telemetry_tracing.md)** - Monitor and debug agents
125-
11. **[Extracting Data](docs/10_extracting_data.md)** - Extracting structured data from screenshots and files
115+
0. **[Start Here](docs/00_overview.md)** - Overview and core concepts
116+
1. **[Setup](docs/01_setup.md)** - Installation and configuration
117+
2. **[Using Agents](docs/02_using_agents.md)** - Using the AskUI ComputerAgent and AndroidAgent
118+
3. **[System Prompts](docs/03_prompting.md)** - How to write effective instructions
119+
4. **[Using Models](docs/04_using_models.md)** - Using different models as backbone for act, get, and locate
120+
5. **[BYOM](docs/05_bring_your_own_model_provider.md)** - use your own model cloud by plugging in your own model provider
121+
6. **[Caching](docs/06_caching.md)** - Optimize performance and costs
122+
7. **[Tools](docs/07_tools.md)** - Extend agent capabilities
123+
8. **[Reporting](docs/08_reporting.md)** - Obtain agent logs as execution reports and summaries as test reports
124+
9. **[Observability](docs/09_observability_telemetry_tracing.md)** - Monitor and debug agents
125+
10. **[Extracting Data](docs/10_extracting_data.md)** - Extracting structured data from screenshots and files
126+
11. **[Callbacks](docs/11_callbacks.md)** - Inject custom logic into the control loop
126127

127128
**Official documentation:** [docs.askui.com](https://docs.askui.com)
128129

SIMPLIFICATION_CONCEPT.md

Lines changed: 0 additions & 138 deletions
This file was deleted.

docs/00_overview.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ Understand what data is collected and how to opt out.
9090
### 10 - Extracting Data
9191
**Topics**: Using `get()`, file support (PDF. Excel, Word, CSV), structured data extraction, response schemas
9292

93+
### 11 - Callbacks
94+
**Topics**: Inject custom logic at different positions of the control loop through callbacks
95+
9396
Extract information from screens and files using the `get()` method with Pydantic models.
9497

9598
## Additional Resources

docs/03_prompting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ with WebVisionAgent() as agent:
118118
"Log in with username 'testuser' and password 'testpass123'",
119119
# CAUTION: this will also override all other MessageSettings
120120
# eventually provided earlier!
121-
settings=ActSettings(messages=MessageSettings(system=prompt))
121+
act_settings=ActSettings(messages=MessageSettings(system=prompt))
122122
)
123123
```
124124

@@ -170,7 +170,7 @@ prompt = ActSystemPrompt(
170170
with WebVisionAgent() as agent:
171171
agent.act(
172172
"Your task",
173-
settings=ActSettings(messages=MessageSettings(system=prompt))
173+
act_settings=ActSettings(messages=MessageSettings(system=prompt))
174174
)
175175
```
176176

@@ -329,6 +329,6 @@ with WebVisionAgent() as agent:
329329
"Find a laptop under $1000 and add it to cart",
330330
# CAUTION: this will also override all other MessageSettings
331331
# eventually provided earlier!
332-
settings=ActSettings(messages=MessageSettings(system=prompt))
332+
act_settings=ActSettings(messages=MessageSettings(system=prompt))
333333
)
334334
```

docs/05_bring_your_own_model_provider.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Environment variables:
4949

5050
If you want to use Anthropic models directly from the Anthropic API with your Anthropic API key, you can use:
5151
- `AnthropicVlmProvider` for `act()`
52-
- `AntrhopicImageQAProvider` for `get()`
52+
- `AnthropicImageQAProvider` for `get()`
5353

5454
```python
5555
import os
@@ -78,12 +78,11 @@ If you want to use Google models directly from the Google API with your Google A
7878
- `GoogleImageQAProvider` for `get()`
7979

8080
```python
81-
import os
8281
from askui import AgentSettings, ComputerAgent
83-
from askui.model_providers import AnthropicVlmProvider
82+
from askui.model_providers import GoogleImageQAProvider
8483

8584
with ComputerAgent(settings=AgentSettings(
86-
vlm_provider=GoogleImageQAProvider(
85+
image_qa_provider=GoogleImageQAProvider(
8786
model_id="gemini-2.5-pro",
8887
),
8988
)) as agent:

0 commit comments

Comments
 (0)