{"record":{"id":"42a71ff4fcd9773f","repo":"vxcontrol/pentagi","slug":"temporal-window-search-failed-w","errorCode":null,"errorMessage":"temporal window search failed: %w","messagePattern":"temporal window search failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/graphiti_search.go","lineNumber":376,"sourceCode":"\t}\n\n\tmaxResults := args.MaxResults.Int()\n\tif maxResults <= 0 {\n\t\tmaxResults = DefaultTemporalMaxResults\n\t}\n\n\treq := graphiti.TemporalSearchRequest{\n\t\tQuery:       args.Query,\n\t\tGroupID:     &groupID,\n\t\tTimeStart:   timeStart,\n\t\tTimeEnd:     timeEnd,\n\t\tMaxResults:  maxResults,\n\t\tObservation: observationObject,\n\t}\n\n\tresp, err := t.graphitiClient.TemporalWindowSearch(ctx, req)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"temporal window search failed: %w\", err)\n\t}\n\n\treturn FormatGraphitiTemporalResults(resp, args.Query), nil\n}\n\n// handleEntityRelationshipsSearch finds relationships from a center node\nfunc (t *graphitiSearchTool) handleEntityRelationshipsSearch(\n\tctx context.Context,\n\tgroupID string,\n\targs GraphitiSearchAction,\n\tobservationObject *graphiti.Observation,\n) (string, error) {\n\tif args.CenterNodeUUID == \"\" {\n\t\treturn \"\", fmt.Errorf(\"center_node_uuid is required for entity_relationships search\")\n\t}\n\tif _, err := uuid.Parse(args.CenterNodeUUID); err != nil {\n\t\treturn \"\", fmt.Errorf(\n\t\t\t\"center_node_uuid must be a valid UUID copied verbatim from the 'UUID:' field of a prior \"+","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/graphiti_search.go#L358-L394","documentation":"Wrapper error returned when the Graphiti client's TemporalWindowSearch RPC/HTTP call itself fails (network error, server 5xx, timeout). The original error is preserved via %w so callers can errors.Is/As into the underlying cause. Note transport errors may be classified as soft/retryable upstream.","triggerScenarios":"TemporalWindowSearch returns a non-nil error: Graphiti service down, connection refused, timeout, or a 5xx response from the API.","commonSituations":"Graphiti container not running or unreachable in the compose network; transient network partitions; Graphiti overloaded or restarting during heavy agent activity.","solutions":["Check the wrapped cause: if it is a transport/*url.Error, retry the search after a short backoff","Verify the Graphiti service is up and reachable (docker compose ps, health endpoint)","Inspect Graphiti server logs for a 5xx cause","Confirm network/DNS/TLS configuration between PentAGI and Graphiti"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// No pre-call validation helps; ensure the service is reachable first\nif err := graphitiHealthCheck(ctx); err != nil {\n    return fmt.Errorf(\"graphiti unreachable, skipping temporal search: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"resp, err := client.TemporalWindowSearch(ctx, req)\nif err != nil {\n    var urlErr *url.Error\n    if errors.As(err, &urlErr) {\n        // transient transport failure: retry with backoff\n        return retryWithBackoff(ctx, req)\n    }\n    return fmt.Errorf(\"temporal window search failed: %w\", err)\n}","preventionTips":["Monitor Graphiti service health in the compose stack","Set sane client timeouts and retry budgets","Alert on repeated upstream failures from the search tool"],"tags":["network","upstream","graphiti","retryable"],"backgroundTag":"upstream-request-failed","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}