Skip to content

Agent Zero AI framework

feat(document_query): expose parser concurrency setting

Alessandro59dd1c99cb55
diff --git a/plugins/_document_query/webui/config.html b/plugins/_document_query/webui/config.html
new file mode 100644
index 000000000..ed7e5ec3d
--- /dev/null
+++ b/plugins/_document_query/webui/config.html
@@ -0,0 +1,33 @@
+<html>
+<head>
+ <title>Document Query</title>
+</head>
+
+<body>
+ <div x-data>
+ <template x-if="config">
+ <div>
+ <div class="section-title">Document Query</div>
+ <div class="section-description">
+ Settings for document parsing and retrieval.
+ </div>
+
+ <div class="field">
+ <div class="field-label">
+ <div class="field-title">Max parser concurrency</div>
+ <div class="field-description">
+ Maximum document parser jobs allowed to run at the same time in this Agent Zero process.
+ </div>
+ </div>
+ <div class="field-control">
+ <input type="number" min="1" step="1"
+ x-init="config.parser_concurrency = Math.max(1, parseInt(config.parser_concurrency || 1, 10) || 1)"
+ x-model.number="config.parser_concurrency" />
+ </div>
+ </div>
+ </div>
+ </template>
+ </div>
+</body>
+
+</html>
diff --git a/tests/test_document_query_plugin.py b/tests/test_document_query_plugin.py
index 2098227e3..dbb74af85 100644
--- a/tests/test_document_query_plugin.py
+++ b/tests/test_document_query_plugin.py
@@ -122,6 +122,16 @@ def test_default_config_bounds_liteparse_runtime_concurrency():
assert "liteparse_subprocess: true" in default_config
+def test_config_panel_exposes_parser_concurrency_setting():
+ config_html = (
+ ROOT / "plugins" / "_document_query" / "webui" / "config.html"
+ ).read_text(encoding="utf-8")
+
+ assert "Max parser concurrency" in config_html
+ assert 'x-model.number="config.parser_concurrency"' in config_html
+ assert 'min="1"' in config_html
+
+
def test_liteparse_parser_caps_workers_by_default():
parser = LiteParseParser()