Significant-Gravitas/AutoGPT · warning · NotFoundError
Agent / not found
Error message
Agent {username}/{agent_name} not found What it means
NotFoundError raised by get_store_agent_details when no row in the StoreAgent view matches the creator username + slug pair. The StoreAgent view only contains APPROVED public listings, so absence can mean the agent doesn't exist, was renamed, was unlisted, or is still pending review.
Solutions
- Verify the exact current username and slug on the store page (slugs are case-sensitive).
- If the submission is pending, use the admin/preview endpoint (get_store_agent_details_as_admin path) rather than the public route.
- If the listing was intentionally removed, retire the links pointing at it (redirects or 410 handling).
- Search the store by name to find the listing's new slug after a rename.
Example fix
# before
await get_store_agent_details("old-username", "my-agent")
# after — resolve current creator/slug first
listing = await search_store_agents("my agent");
await get_store_agent_details(listing.creator_username, listing.slug) Defensive patterns
Strategy: type-guard
Validate before calling
// Resolve listing by search first when details matter
const hit = await searchStoreAgents(`${username}/${agent_name}`);
if (!hit.items.length) throw new NotFoundError('no such agent'); Type guard
// Server-side shape to distinguish not-found from DB failure
function isNotFound(e: unknown): e is NotFoundError {
return e instanceof Error && e.message.startsWith('Agent ') && e.message.endsWith(' not found');
} Try / catch
try { return await getStoreAgentDetails(u, slug); }
catch (e) {
if (e instanceof NotFoundError) return null; // render 'not available' page
throw e; // DatabaseError needs attention
} Prevention
- Treat 404 as an expected state: render an 'agent unavailable' page, not an error.
- Use current creator_username + slug from the store search, not cached URLs.
- For pending submissions use the preview/admin route, never the public one.
When it happens
Trigger: GET public store agent details for {username}/{agent_name} where the slug is misspelled, the listing was removed/soft-deleted, the creator changed their username, or the submission is not yet APPROVED (pending/rejected versions are invisible to this query).
Common situations: Stale links/Bookmarks to agents that were unpublished; frontend routing by slug after a rename; creators previewing their own pending submission via the public endpoint instead of the admin/preview route; scrapers hitting old URLs.
Related errors
- Store listing version
- Agent graph # not found
- Agent # v not found for this user (# )
- Execution not found
- Execution not found
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/3c16f46d51d654e4.
Report an issue: GitHub.
Appendix: source
Thrown at autogpt_platform/backend/backend/api/features/store/db.py:314
except Exception as e:
# Fail silently here so that logging search terms doesn't break the app
logger.error(f"Error logging search term: {e}")
async def get_store_agent_details(
username: str, agent_name: str, include_changelog: bool = False
) -> store_model.StoreAgentDetails:
"""Get PUBLIC store agent details from the StoreAgent view"""
logger.debug(f"Getting store agent details for {username}/{agent_name}")
try:
agent = await prisma.models.StoreAgent.prisma().find_first(
where={"creator_username": username, "slug": agent_name}
)
if not agent:
logger.warning(f"Agent not found: {username}/{agent_name}")
raise NotFoundError(f"Agent {username}/{agent_name} not found")
# Fetch changelog data if requested
changelog_data = None
if include_changelog:
changelog_versions = (
await prisma.models.StoreListingVersion.prisma().find_many(
where={
"storeListingId": agent.listing_id,
"submissionStatus": prisma.enums.SubmissionStatus.APPROVED,
},
order=[{"version": "desc"}],
)
)
changelog_data = [
store_model.ChangelogEntry(
version=str(version.version),
changes_summary=version.changesSummary or "No changes recorded",
date=version.createdAt,View on GitHub (pinned to 9c8bb5550f)