{"record":{"id":"13dfdae2e5f0e6d2","repo":"agentscope-ai/agentscope","slug":"reme-name-r-failed-getattr-response-answer","errorCode":null,"errorMessage":"ReMe {name!r} failed: {getattr(response, 'answer', '')}","messagePattern":"ReMe (.+?) failed: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/agentscope/middleware/_longterm_memory/_reme/_middleware.py","lineNumber":470,"sourceCode":"        if self._parameters.mode == \"static_control\":\n            return []\n        return _build_memory_tools(self)\n\n    # ==================================================================\n    # ReMe job helpers (shared by hooks and tools)\n    # ==================================================================\n    async def _run_job(self, name: str, **kwargs: Any) -> Any:\n        \"\"\"Start the embedded app (if needed) and run a ReMe job.\n\n        Raises:\n            RuntimeError:\n                If ReMe reports ``success=False``.\n        \"\"\"\n        await self._ensure_started()\n        assert self._app is not None\n        response = await self._app.run_job(name, **kwargs)\n        if getattr(response, \"success\", True) is False:\n            raise RuntimeError(\n                f\"ReMe {name!r} failed: {getattr(response, 'answer', '')}\",\n            )\n        return response\n\n    async def _search(\n        self,\n        query: str,\n        *,\n        limit: int | None = None,\n    ) -> list[str]:\n        \"\"\"Search ReMe and return the retrieved memory texts.\"\"\"\n        response = await self._run_job(\n            _SEARCH_JOB,\n            query=query,\n            limit=self._parameters.top_k if limit is None else limit,\n        )\n        return _extract_memory_texts(getattr(response, \"metadata\", {}))\n","sourceCodeStart":452,"sourceCodeEnd":488,"githubUrl":"https://github.com/agentscope-ai/agentscope/blob/e90f1c7592896cc95f6e5ee506194f533378247d/src/agentscope/middleware/_longterm_memory/_reme/_middleware.py#L452-L488","documentation":"Every ReMe operation (reindex, search, write-back) goes through _run_job, which checks the response's success flag; success=False raises RuntimeError embedding the job name and ReMe's answer text as the diagnostic.","triggerScenarios":"self._app.run_job('search', ...) returning success=False — bad ReMe config, missing graph store, embedding failure, or invalid query/job arguments.","commonSituations":"ReMe backend (graph DB / vector store) misconfigured or unreachable; API-key issues; schema not initialized before search.","solutions":["Read the answer text in the message — it carries ReMe's own error detail","Verify ReMe app config (graph store URI, embedding keys) and connectivity","Run a reindex job before search if the memory graph is empty/uninitialized","Wrap calls in try/except RuntimeError to surface and log job failures"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = await middleware.search(query)\nexcept RuntimeError as e:\n    logger.error('ReMe job failed: %s', e)\n    return []  # degrade gracefully without memory","preventionTips":["Run a reindex job and verify graph-store connectivity before serving searches","Log the answer field from the exception — it contains ReMe's own diagnostics"],"tags":["reme","job-failure","runtime-error"],"backgroundTag":"background-job-failed","analyzedSha":"e90f1c7592896cc95f6e5ee506194f533378247d","analyzedAt":"2026-08-28T18:24:12.087Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}