Significant-Gravitas/AutoGPT · error · NotFoundError
Graph {slv.agentGraphId} v{slv.agentGraphVersion} not found
Error message
Graph {slv.agentGraphId} v{slv.agentGraphVersion} not found What it means
NotFoundError raised by store_db.get_agent() when the StoreListingVersion row exists but get_graph(for_export=True) returns None for slv.agentGraphId / slv.agentGraphVersion. It signals referential drift: the listing version points at an AgentGraph version that is gone or was never created.
Source
Thrown at autogpt_platform/backend/backend/api/features/store/db.py:1413
async def get_agent(store_listing_version_id: str) -> GraphModel:
"""Get agent using the version ID and store listing version ID."""
slv = await prisma.models.StoreListingVersion.prisma().find_unique(
where={"id": store_listing_version_id}
)
if not slv:
raise NotFoundError(
f"Store listing version {store_listing_version_id} not found"
)
graph = await get_graph(
graph_id=slv.agentGraphId,
version=slv.agentGraphVersion,
user_id=None,
for_export=True,
)
if not graph:
raise NotFoundError(
f"Graph {slv.agentGraphId} v{slv.agentGraphVersion} not found"
)
return graph
#####################################################
################## ADMIN FUNCTIONS ##################
#####################################################
async def review_store_submission(
store_listing_version_id: str,
is_approved: bool,
external_comments: str,
internal_comments: str,
reviewer_id: str,
) -> store_model.StoreSubmissionAdminView:
"""Review a store listing submission as an admin."""View on GitHub (pinned to 9c8bb5550f)
Solutions
- Query the pair directly: check AgentGraph for id = slv.agentGraphId AND version = slv.agentGraphVersion.
- If the graph is truly gone, remove or resubmit the orphaned StoreListingVersion so the store stops referencing it.
- If versions drifted, re-align slv.agentGraphVersion with the max existing version or recreate the graph version.
- Add a cleanup script/admin action for orphaned listing versions if this recurs.
Defensive patterns
Strategy: validation
Validate before calling
slv = await prisma.models.StoreListingVersion.prisma().find_unique(
where={"id": store_listing_version_id}
)
graph_exists = slv is not None and (
await prisma.models.AgentGraph.prisma().find_first(
where={"id": slv.agentGraphId, "version": slv.agentGraphVersion}
)
) is not None Try / catch
try:
graph = await store_db.get_agent(store_listing_version_id)
except NotFoundError as e:
if "Graph" in str(e):
logger.error(f"Orphaned listing version {store_listing_version_id}: {e}")
raise Prevention
- Delete store listing versions in the same transaction/flow as their graphs.
- Periodically audit StoreListingVersion rows whose (agentGraphId, agentGraphVersion) pair has no AgentGraph match.
When it happens
Trigger: Store listing metadata survives while the referenced AgentGraph (or that specific version number) was deleted by its owner, rolled back by a migration, or written with a mismatched version during a failed submission.
Common situations: Data-restore from a partial dump, manual DB edits, concurrent submission + graph deletion, or a schema migration that reset graph version counters.
Related errors
- StoreListing {listing.id} has no CreatorProfile — FK violate
- Failed to fetch store agents
- Agent {username}/{agent_name} not found
- Failed to fetch agent details
- Store listing version {store_listing_version_id} not found
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/f8039d6778917f11.
Report an issue: GitHub.