{"record":{"id":"300662ee07d37a83","repo":"NousResearch/hermes-agent","slug":"the-boto3-package-is-required-for-the-aws-bedroc","errorCode":null,"errorMessage":"The 'boto3' package is required for the AWS Bedrock provider. Install it with: pip install boto3\nOr install Hermes with Bedrock support: pip install -e '.[bedrock]'","messagePattern":"The 'boto3' package is required for the AWS Bedrock provider\\. Install it with: pip install boto3\nOr install Hermes with Bedrock support: pip install -e '\\.\\[bedrock\\]'","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"agent/bedrock_adapter.py","lineNumber":69,"sourceCode":"\n# ---------------------------------------------------------------------------\n# Lazy boto3 import — only loaded when the Bedrock provider is actually used.\n# This keeps startup fast for users who don't use Bedrock.\n# ---------------------------------------------------------------------------\n\n_bedrock_runtime_client_cache: Dict[str, Any] = {}\n_bedrock_control_client_cache: Dict[str, Any] = {}\n\n\n_MIN_BOTO3_VERSION = (1, 34, 59)\n\n\ndef _require_boto3():\n    \"\"\"Import boto3, raising a clear error if not installed or too old.\"\"\"\n    try:\n        import boto3\n    except ImportError:\n        raise ImportError(\n            \"The 'boto3' package is required for the AWS Bedrock provider. \"\n            \"Install it with: pip install boto3\\n\"\n            \"Or install Hermes with Bedrock support: pip install -e '.[bedrock]'\"\n        )\n    # converse() / converse_stream() were added in boto3 1.34.59.\n    # When Hermes is installed editable into system Python, the system boto3\n    # (e.g. Ubuntu 24.04 ships 1.34.46) may take precedence over the venv\n    # version pinned in pyproject.toml.\n    try:\n        version = tuple(int(x) for x in boto3.__version__.split(\".\")[:3])\n    except (AttributeError, ValueError):\n        return boto3  # can't parse — don't block on version check\n    if version < _MIN_BOTO3_VERSION:\n        raise RuntimeError(\n            f\"boto3 {boto3.__version__} does not support converse_stream \"\n            f\"(minimum 1.34.59 required). Upgrade with: \"\n            f\"pip install --upgrade boto3\"\n        )","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/bedrock_adapter.py#L51-L87","documentation":"The AWS Bedrock adapter requires boto3. _require_boto3() imports it and converts the failure into an ImportError with two install paths (plain boto3 or Hermes' [bedrock] extra). No Bedrock call can proceed until the SDK is present.","triggerScenarios":"Configuring provider 'bedrock' (model.provider or auxiliary provider) without boto3 installed (agent/bedrock_adapter.py:69).","commonSituations":"Base install without the bedrock extra; new machine/container; system Python vs venv mismatch hiding the package.","solutions":["pip install -e '.[bedrock]' (installs boto3 with the Hermes extra) or pip install boto3.","Confirm the install landed in the venv Hermes actually runs from (which hermes; hermes -c 'import boto3').","Re-run `hermes setup` after installing so provider detection includes Bedrock."],"exampleFix":"pip install -e '.[bedrock]'   # or: pip install boto3","handlingStrategy":"validation","validationCode":"import importlib.util\nif importlib.util.find_spec(\"boto3\") is None:\n    raise SystemExit(\"Bedrock selected but boto3 missing — pip install -e '.[bedrock]'\")","typeGuard":null,"tryCatchPattern":"try:\n    from agent.bedrock_adapter import _require_boto3\n    _require_boto3()\nexcept ImportError as e:\n    if \"boto3\" in str(e):\n        run(\"pip install -e '.[bedrock]'\")","preventionTips":["Install the [bedrock] extra whenever configuring AWS models.","Verify installs land in the venv Hermes runs from."],"tags":["bedrock","aws","dependencies","import"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}