{"record":{"id":"7cee2bb0acc56f26","repo":"Significant-Gravitas/AutoGPT","slug":"graph-execution-graph-exec-id-can-t-be-turned-i","errorCode":null,"errorMessage":"Graph execution #{graph_exec_id} can't be turned into a preset because it was run before this feature existed and so the input credentials were not saved.","messagePattern":"Graph execution #(.+?) can't be turned into a preset because it was run before this feature existed and so the input credentials were not saved\\.","errorType":"validation","errorClass":"ValueError","httpStatus":400,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/library/db.py","lineNumber":2086,"sourceCode":"    graph_exec_id = create_request.graph_execution_id\n    graph_execution = await get_graph_execution(user_id, graph_exec_id)\n    if not graph_execution:\n        raise NotFoundError(f\"Graph execution #{graph_exec_id} not found\")\n\n    # Sanity check: credential inputs must be available if required for this preset\n    if graph_execution.credential_inputs is None:\n        graph = await graph_db.get_graph(\n            graph_id=graph_execution.graph_id,\n            version=graph_execution.graph_version,\n            user_id=graph_execution.user_id,\n            include_subgraphs=True,\n        )\n        if not graph:\n            raise NotFoundError(\n                f\"Graph #{graph_execution.graph_id} not found or accessible\"\n            )\n        elif len(graph.regular_credentials_inputs) > 0:\n            raise ValueError(\n                f\"Graph execution #{graph_exec_id} can't be turned into a preset \"\n                \"because it was run before this feature existed \"\n                \"and so the input credentials were not saved.\"\n            )\n\n    logger.debug(\n        f\"Creating preset for user #{user_id} from graph execution #{graph_exec_id}\",\n    )\n    return await create_preset(\n        user_id=user_id,\n        preset=library_model.LibraryAgentPresetCreatable(\n            inputs=graph_execution.inputs,\n            credentials=graph_execution.credential_inputs or {},\n            graph_id=graph_execution.graph_id,\n            graph_version=graph_execution.graph_version,\n            name=create_request.name,\n            description=create_request.description,\n            is_active=create_request.is_active,","sourceCodeStart":2068,"sourceCodeEnd":2104,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/library/db.py#L2068-L2104","documentation":"Error \"Graph execution #{graph_exec_id} can't be turned into a preset because it was run before this feature existed and so the input credentials were not saved.\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2086 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the agent and create the preset from the new execution so credentials are captured.","Manually create a preset and supply the required credentials."],"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"}