Significant-Gravitas/AutoGPT · error · ValueError
AgentGraph does not belong to the source organization
Error message
AgentGraph does not belong to the source organization
What it means
Error "AgentGraph does not belong to the source organization" thrown in Significant-Gravitas/AutoGPT.
Source
Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:214
# ---------------------------------------------------------------------------
# Internal helpers
# ---------------------------------------------------------------------------
async def _validate_resource_ownership(
resource_type: str, resource_id: str, org_id: str
) -> None:
"""Verify the resource exists and belongs to the given org."""
if resource_type == "AgentGraph":
graph = await prisma.agentgraph.find_first(
where={"id": resource_id, "isActive": True}
)
if graph is None:
raise NotFoundError(f"AgentGraph '{resource_id}' not found")
if graph.organizationId != org_id:
raise ValueError("AgentGraph does not belong to the source organization")
elif resource_type == "StoreListing":
listing = await prisma.storelisting.find_unique(where={"id": resource_id})
if listing is None or listing.isDeleted:
raise NotFoundError(f"StoreListing '{resource_id}' not found")
if listing.owningOrgId != org_id:
raise ValueError("StoreListing does not belong to the source organization")
async def _move_resource(
resource_type: str,
resource_id: str,
target_org_id: str,
) -> None:
"""Move the resource to the target organization."""
if resource_type == "AgentGraph":
# Move ALL versions, not just the active one, and land the graph at
# org-home (teamId=None) — a stale source-org teamId would fail everyView on GitHub (pinned to 9c8bb5550f)
Solutions
- Transfer the graph from the organization that actually owns it.
- Move the graph to the source org first if appropriate.
When it happens
Trigger: Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:214 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/03a9690a36a450bf.
Report an issue: GitHub.