vxcontrol/pentagi · error
entity relationships search failed: %w
Error message
entity relationships search failed: %w
What it means
Wrapper error returned when the Graphiti client's EntityRelationshipsSearch call fails (transport error, timeout, or server-side 5xx). The underlying cause is preserved via %w for errors.Is/As inspection. Like other upstream failures it is distinct from the argument-validation errors in the same handler.
Source
Thrown at backend/pkg/tools/graphiti_search.go:435
var edgeTypes *[]string
if len(args.EdgeTypes) > 0 {
edgeTypes = &args.EdgeTypes
}
req := graphiti.EntityRelationshipSearchRequest{
Query: args.Query,
GroupID: &groupID,
CenterNodeUUID: args.CenterNodeUUID,
MaxDepth: maxDepth,
NodeLabels: nodeLabels,
EdgeTypes: edgeTypes,
MaxResults: maxResults,
Observation: observationObject,
}
resp, err := t.graphitiClient.EntityRelationshipsSearch(ctx, req)
if err != nil {
return "", fmt.Errorf("entity relationships search failed: %w", err)
}
return FormatGraphitiEntityRelationshipResults(resp, args.Query), nil
}
// handleDiverseResultsSearch gets diverse, non-redundant results
func (t *graphitiSearchTool) handleDiverseResultsSearch(
ctx context.Context,
groupID string,
args GraphitiSearchAction,
observationObject *graphiti.Observation,
) (string, error) {
maxResults := args.MaxResults.Int()
if maxResults <= 0 {
maxResults = DefaultDiverseMaxResults
}
diversityLevel := args.DiversityLevel.String()View on GitHub (pinned to ea665308ba)
Solutions
- Retry after a short backoff if the wrapped cause is a transient transport error
- Verify the Graphiti service is running and reachable
- Check Graphiti server logs for the internal error
- Reduce max_results to shrink the traversal if the failure correlates with large queries
Defensive patterns
Strategy: retry
Validate before calling
// Validate arguments first so only genuine upstream failures reach the call
if _, err := uuid.Parse(args.CenterNodeUUID); err != nil {
return err // don't hit the network with bad args
} Try / catch
resp, err := client.EntityRelationshipsSearch(ctx, req)
if err != nil {
var urlErr *url.Error
if errors.As(err, &urlErr) {
return retryWithBackoff(ctx, req)
}
return fmt.Errorf("entity relationships search failed: %w", err)
} Prevention
- Cap max_results to avoid heavy traversals on hub nodes
- Monitor Graphiti health and restart policies
- Apply exponential backoff for transient transport errors only
When it happens
Trigger: EntityRelationshipsSearch returns non-nil error: Graphiti unreachable, request timeout, or internal server error while traversing relationships.
Common situations: Graphiti service outage; network flakiness between PentAGI and the Graphiti container; Graphiti crashing on a very large traversal around a hub node.
Related errors
- temporal window search failed: %w
- failed to do request: %v
- google search failed: %w
- failed to do request: %w
- request to Sploitus failed: %w
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/de4bfe2e11079983.
Report an issue: GitHub.