Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

feat(agfs): support overriding queuefs db_path via config (#1751)

dingbencf33b5e08cac
diff --git a/openviking/utils/agfs_utils.py b/openviking/utils/agfs_utils.py
index 0a8e85eae..1520498a6 100644
--- a/openviking/utils/agfs_utils.py
+++ b/openviking/utils/agfs_utils.py
@@ -15,6 +15,13 @@ logger = get_logger(__name__)
def _generate_plugin_config(agfs_config: Any, data_path: Path) -> Dict[str, Any]:
"""Dynamically generate RAGFS plugin configuration based on backend type."""
+ default_queue_db_path = data_path / "_system" / "queue" / "queue.db"
+ configured_queue_db_path = getattr(agfs_config, "queue_db_path", None)
+ if configured_queue_db_path:
+ queue_db_path = str(Path(configured_queue_db_path).expanduser().resolve())
+ else:
+ queue_db_path = str(default_queue_db_path)
+
config = {
"serverinfofs": {
"enabled": True,
@@ -28,7 +35,7 @@ def _generate_plugin_config(agfs_config: Any, data_path: Path) -> Dict[str, Any]
"path": "/queue",
"config": {
"backend": "sqlite",
- "db_path": str(data_path / "_system" / "queue" / "queue.db"),
+ "db_path": queue_db_path,
},
},
}
diff --git a/openviking_cli/utils/config/agfs_config.py b/openviking_cli/utils/config/agfs_config.py
index 11863695b..f50dac14f 100644
--- a/openviking_cli/utils/config/agfs_config.py
+++ b/openviking_cli/utils/config/agfs_config.py
@@ -144,6 +144,13 @@ class AGFSConfig(BaseModel):
timeout: int = Field(default=10, description="RAGFS request timeout (seconds)")
+ queue_db_path: Optional[str] = Field(
+ default=None,
+ description="Override path of the queuefs sqlite database file. "
+ "Defaults to '{storage.workspace}/_system/queue/queue.db' when not set. "
+ "Useful when the workspace volume does not support sqlite (e.g. some network filesystems).",
+ )
+
retry_times: Any = Field(
default=None,
exclude=True,