{"record":{"id":"55ec93a3c9c00ac1","repo":"RyanCodrai/turbovec","slug":"agno-is-required-to-use-turbovec-agno-install-wit","errorCode":null,"errorMessage":"agno is required to use turbovec.agno. Install with: pip install turbovec[agno]","messagePattern":"agno is required to use turbovec\\.agno\\. Install with: pip install turbovec\\[agno\\]","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"turbovec-python/python/turbovec/agno.py","lineNumber":49,"sourceCode":"from pathlib import Path\nfrom typing import Any, Dict, Iterable, List, Optional, Set, Union\n\nimport numpy as np\n\nfrom ._persist import check_persisted_handles, check_schema_version\nfrom ._similarity import l2_normalize_rows\nfrom ._turbovec import IdMapIndex\nfrom ._persist import atomic_save  # isort:skip\n\ntry:\n    from agno.knowledge.document import Document\n    from agno.knowledge.embedder import Embedder\n    from agno.knowledge.reranker.base import Reranker\n    from agno.vectordb.base import VectorDb\n    from agno.vectordb.distance import Distance\n    from agno.vectordb.search import SearchType\nexcept ImportError as exc:\n    raise ImportError(\n        \"agno is required to use turbovec.agno. \"\n        \"Install with: pip install turbovec[agno]\"\n    ) from exc\n\n\n_INDEX_FILENAME = \"index.tvim\"\n_STORE_FILENAME = \"docstore.json\"\n# Bump when docstore.json shape changes; loader accepts the current\n# version plus any older versions whose missing fields we know how to\n# reconstruct (v1 predates the `distance` field — those stores hold raw,\n# unnormalized vectors, so they load as Distance.max_inner_product,\n# which is exactly the scoring they were written under).\n_DOCSTORE_SCHEMA_VERSION = 2\n_DOCSTORE_SCHEMA_COMPAT = (1, 2)\n\n\ndef _embedder_has_async(embedder: \"Embedder\") -> bool:\n    \"\"\"True when this embedder really implements the async single-embed","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/RyanCodrai/turbovec/blob/ccab9f325e6ce2a270a87daf01ae4e443bcf2d49/turbovec-python/python/turbovec/agno.py#L31-L67","documentation":"turbovec.agno is an optional integration module that imports agno's VectorDb/Embedder/Reranker base classes at import time. If the agno package is not installed, the ImportError is re-raised as ImportError with instructions to install the extra. This is a standard optional-dependency guard.","triggerScenarios":"Importing turbovec.agno (or anything that imports it) in an environment where the `agno` distribution is not installed.","commonSituations":"Deploying to a fresh environment where only the base package was installed (pip install turbovec), running tests/CI without the extra, or a requirements file that dropped the agno extra.","solutions":["Install the optional extra: pip install turbovec[agno].","Add 'turbovec[agno]' to requirements/pyproject dependencies for projects that use the agno integration.","Guard the import in your code if agno integration is optional for you, and fall back to another vector DB backend."],"exampleFix":"# before\npip install turbovec\nimport turbovec.agno  # ImportError\n# after\npip install 'turbovec[agno]'\nimport turbovec.agno  # works","handlingStrategy":"fallback","validationCode":"import importlib.util\nif importlib.util.find_spec(\"agno\") is None:\n    raise SystemExit(\"Install with: pip install turbovec[agno]\")","typeGuard":null,"tryCatchPattern":"try:\n    import turbovec.agno\nexcept ImportError:\n    turbovec_agno = None  # fall back to another vector backend","preventionTips":["Install optional extras explicitly: pip install turbovec[agno].","Pin 'turbovec[agno]' in requirements/pyproject for projects using the integration.","Keep CI and production environments installed from the same dependency spec."],"tags":["dependency","import","installation"],"backgroundTag":"missing-optional-dependency","analyzedSha":"ccab9f325e6ce2a270a87daf01ae4e443bcf2d49","analyzedAt":"2026-09-06T08:39:18.516Z","contentChangedAt":"2026-09-06T08:39:18.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}