Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,37 @@ Ready to build your first agent? Check out our documentation:

## Quick Install

```bash
pip install askui
```

**Requires Python >=3.10*

The default install includes core dependencies (Agent OS client, HTTP, common model APIs, Android tooling, etc.). Add **optional extras** only when you need the features below.

```bash
pip install askui[all]
```

**Requires Python >=3.10, <3.14**
`all` pulls in every optional extra in one command (larger install). Prefer picking individual extras when you know what you need. Or start using AskUI with a minimal install and add extras as you need them.

### Optional install extras

| Extra | When to use it |
| --- | --- |
| *(none)* | Everyday automation. Smallest footprint. |
| `all` | You want every optional integration below without choosing extras (CI images, demos, or “install everything once”). |
| `office-document` | Reading or converting **Office files** (Excel `.xls`/`.xlsx`, Word `.docx`) via MarkItDown—e.g. extracting content from spreadsheets or documents in workflows. To be used in `get()` methods. |
| `bedrock` | Running **Anthropic Claude through AWS Bedrock** (`anthropic[bedrock]`). Use when your org routes Claude via Bedrock, not the direct Anthropic API. |
| `vertex` | Running **Anthropic Claude on Google Vertex AI** plus Vertex client libraries. Use when models are hosted on Vertex, not only the public Anthropic API. |
| `otel` | **OpenTelemetry** export and instrumentation you enable in code: OTLP over HTTP, plus optional instrumentation for `httpx` and SQLAlchemy. Use for production tracing/metrics pipelines—not required for local scripts. |
| `web` | **Browser automation with Playwright** (e.g. web-focused agents and Playwright-backed flows). Core desktop control still uses Agent OS; this extra is for the Playwright stack. |

Combine extras as needed, for example:

```bash
pip install askui[bedrock,otel]
```

You'll also need to install AskUI Agent OS for device control. See [Setup Guide](docs/01_setup.md) for detailed instructions.

Expand Down
2 changes: 1 addition & 1 deletion docs/01_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide will get AskUI Vision Agent installed and configured on your system.

## Python Package Installation

AskUI Vision Agent requires Python >=3.10, and <3.14.
AskUI Vision Agent requires Python >=3.10 and <3.14.

For installing the python-sdk please run

Expand Down
6 changes: 6 additions & 0 deletions docs/10_extracting_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ The AskUI Python SDK supports the use of various file formats.
- Word Files (.docx, .doc)
- CSV Files (.csv)

**Office documents (Excel and Word)** are loaded as `OfficeDocumentSource` and converted to Markdown with MarkItDown. That stack is optional: the base `askui` install does not include it. Install AskUI with the **office-document** extra when you use Excel or Word as `get()` sources:

```bash
pip install "askui[office-document]"
```

**Model Compatibility Matrix**

| File Format | AskUI Gemini | Anthropic Claude | Google Gemini
Expand Down
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ namespace_packages = true
[mypy-jsonref.*]
ignore_missing_imports = true

[mypy-bson.*]
ignore_missing_imports = true

[mypy-alembic.*]
ignore_missing_imports = true

Expand Down
4,707 changes: 2,706 additions & 2,001 deletions pdm.lock

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@ dependencies = [
"protobuf>=6.31.1",
"google-genai>=1.20.0",
"filetype>=1.2.0",
"markitdown[xls,xlsx,docx]>=0.1.2",
"asyncer==0.0.8",
"bson>=0.5.10",
"aiofiles>=24.1.0",
"anyio==4.10.0", # We need to pin this version otherwise listing mcp tools using fastmcp within runner fails
"sqlalchemy[mypy]>=2.0.44",
"apscheduler==4.0.0a6",
"opentelemetry-api>=1.38.0",
"imagehash>=4.3.0",
"imagehash>=4.3.0", # requires python <3.14 because of dependency on scipy
"pure-python-adb>=0.3.0.dev0"
]
requires-python = ">=3.10,<3.14"
requires-python = ">=3.10, <3.14"
readme = "README.md"
license = {text = "MIT"}
dynamic = ["version"]
Expand Down Expand Up @@ -217,9 +216,9 @@ known-first-party = ["askui"]
known-third-party = ["pytest", "mypy"]

[project.optional-dependencies]
all = ["askui[android,bedrock,otel,vertex,web]"]
android = [
"pure-python-adb>=0.3.0.dev0"
all = ["askui[office-document,bedrock,otel,vertex,web]"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is android no longer part of the all group?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see, because it is now a default, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it’s included by default, and we should start using pip install askui without the all option, especially on Windows, to improve installation speed.

office-document = [
"markitdown[xls,xlsx,docx]>=0.1.2"
]
bedrock = [
"anthropic[bedrock]>=0.72.0"
Expand Down
7 changes: 5 additions & 2 deletions src/askui/utils/id_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time
import uuid
from typing import Any

import bson
from pydantic import Field


Expand All @@ -14,7 +15,9 @@ def generate_time_ordered_id(prefix: str) -> str:
str: Time-ordered ID string
"""

return f"{prefix}_{str(bson.ObjectId())}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know what bson was doing and what effects removing it has. Out of curiosity: can you maybe explain?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was the reason why the SDK was not compatible with Python 3.14 and later, but now the imagehash library is the new issue causing incompatibility.

timestamp_hex = f"{time.time_ns():x}"
random_hex = uuid.uuid4().hex[:12]
return f"{prefix}_{timestamp_hex}{random_hex}"


def IdField(prefix: str) -> Any:
Expand Down
17 changes: 11 additions & 6 deletions src/askui/utils/markdown_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
from pathlib import Path
from typing import BinaryIO

from markitdown import MarkItDown

_MARKDOWN_CONVERTER = MarkItDown()


def convert_to_markdown(source: Path | bytes | BinaryIO) -> str:
"""Converts a source to markdown text.
Expand All @@ -16,9 +12,18 @@ def convert_to_markdown(source: Path | bytes | BinaryIO) -> str:
Returns:
str: The markdown representation of the source.
"""
try:
from markitdown import MarkItDown
except ImportError:
error_msg = (
"Office document support is not available."
" Please install it with `pip install askui[office-document]`."
)
raise ImportError(error_msg) # noqa: B904
markdown_converter = MarkItDown()
if isinstance(source, bytes):
bytes_source = BytesIO(source)
result = _MARKDOWN_CONVERTER.convert(bytes_source)
result = markdown_converter.convert(bytes_source)
return result.text_content
result = _MARKDOWN_CONVERTER.convert(source)
result = markdown_converter.convert(source)
return result.text_content
Loading