Significant-Gravitas/AutoGPT · error · InvalidInputError
Search term is too long
Error message
Search term is too long
What it means
Error "Search term is too long" thrown in Significant-Gravitas/AutoGPT.
Source
Thrown at autogpt_platform/backend/backend/api/features/library/db.py:159
Returns:
A LibraryAgentResponse containing the list of agents and pagination details.
Raises:
DatabaseError: If there is an issue fetching from Prisma.
"""
logger.debug(
f"Fetching library agents for user_id={user_id}, "
f"search_term={repr(search_term)}, "
f"sort_by={sort_by}, page={page}, page_size={page_size}"
)
if page < 1 or page_size < 1:
logger.warning(f"Invalid pagination: page={page}, page_size={page_size}")
raise InvalidInputError("Invalid pagination input")
if search_term and len(search_term.strip()) > 100:
logger.warning(f"Search term too long: {repr(search_term)}")
raise InvalidInputError("Search term is too long")
where_clause: prisma.types.LibraryAgentWhereInput = {
"userId": user_id,
"isDeleted": False,
"isArchived": False,
}
# Library entries are personal bookmarks (per-user favorites/folders),
# so org context scopes rather than shares: the caller's own rows in
# the active org, plus untagged pre-backfill rows. Nested in AND so it
# can't collide with the search OR-clause below.
if organization_id is not None:
where_clause["AND"] = [
{
"OR": [
{"organizationId": organization_id},
{"organizationId": None},
]
}View on GitHub (pinned to 9c8bb5550f)
Solutions
- Shorten the search term to within the maximum allowed length.
- Split the search into multiple narrower queries.
When it happens
Trigger: Thrown at autogpt_platform/backend/backend/api/features/library/db.py:159 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/a47bff428cb26898.
Report an issue: GitHub.