{"record":{"id":"7168f8f49e4d2f29","repo":"Significant-Gravitas/AutoGPT","slug":"library-agent-for-graph-graph-id-and-user-use","errorCode":null,"errorMessage":"Library agent for graph #{graph_id} and user #{user_id} not found","messagePattern":"Library agent for graph #(.+?) and user #(.+?) not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/library/routes/agents.py","lineNumber":123,"sourceCode":"@router.get(\"/{library_agent_id}\", summary=\"Get Library Agent\")\nasync def get_library_agent(\n    library_agent_id: str,\n    user_id: str = Security(autogpt_auth_lib.get_user_id),\n) -> library_model.LibraryAgent:\n    return await library_db.get_library_agent(id=library_agent_id, user_id=user_id)\n\n\n@router.get(\"/by-graph/{graph_id}\")\nasync def get_library_agent_by_graph_id(\n    graph_id: str,\n    version: Optional[int] = Query(default=None),\n    user_id: str = Security(autogpt_auth_lib.get_user_id),\n) -> library_model.LibraryAgent:\n    library_agent = await library_db.get_library_agent_by_graph_id(\n        user_id, graph_id, version\n    )\n    if not library_agent:\n        raise HTTPException(\n            status_code=status.HTTP_404_NOT_FOUND,\n            detail=f\"Library agent for graph #{graph_id} and user #{user_id} not found\",\n        )\n    return library_agent\n\n\n@router.get(\n    \"/marketplace/{store_listing_version_id}\",\n    summary=\"Get Agent By Store ID\",\n    tags=[\"store\", \"library\"],\n    response_model=library_model.LibraryAgent | None,\n)\nasync def get_library_agent_by_store_listing_version_id(\n    store_listing_version_id: str,\n    user_id: str = Security(autogpt_auth_lib.get_user_id),\n) -> library_model.LibraryAgent | None:\n    \"\"\"\n    Get Library Agent from Store Listing Version ID.","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/library/routes/agents.py#L105-L141","documentation":"Error \"Library agent for graph #{graph_id} and user #{user_id} not found\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/library/routes/agents.py:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the graph ID is correct and the agent is in your library.","Add the agent to your library first, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}