{"record":{"id":"9fac263af09c3582","repo":"vxcontrol/pentagi","slug":"time-start-and-time-end-are-required-for-temporal","errorCode":null,"errorMessage":"time_start and time_end are required for temporal_window search","messagePattern":"time_start and time_end are required for temporal_window search","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/graphiti_search.go","lineNumber":343,"sourceCode":"\tif args.MinMentions != nil {\n\t\tinput[\"min_mentions\"] = args.MinMentions.Int()\n\t}\n\tif args.RecencyWindow != \"\" {\n\t\tinput[\"recency_window\"] = args.RecencyWindow\n\t}\n\treturn input\n}\n\n// handleTemporalWindowSearch performs time-bounded search\nfunc (t *graphitiSearchTool) handleTemporalWindowSearch(\n\tctx context.Context,\n\tgroupID string,\n\targs GraphitiSearchAction,\n\tobservationObject *graphiti.Observation,\n) (string, error) {\n\t// Validate temporal parameters\n\tif args.TimeStart == \"\" || args.TimeEnd == \"\" {\n\t\treturn \"\", fmt.Errorf(\"time_start and time_end are required for temporal_window search\")\n\t}\n\n\ttimeStart, err := parseGraphitiTime(args.TimeStart)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid time_start format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w\", err)\n\t}\n\n\ttimeEnd, err := parseGraphitiTime(args.TimeEnd)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid time_end format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w\", err)\n\t}\n\n\tif timeEnd.Before(timeStart) {\n\t\treturn \"\", fmt.Errorf(\"time_end must be after time_start\")\n\t}\n\n\tmaxResults := args.MaxResults.Int()\n\tif maxResults <= 0 {","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/graphiti_search.go#L325-L361","documentation":"The temporal_window search type requires both time_start and time_end to bound the episode window queried in Graphiti. This guard fires before any HTTP call when either parameter is an empty string. It is a precondition validation error aimed at the tool caller.","triggerScenarios":"Calling graphiti_search with search_type=\"temporal_window\" while omitting time_start and/or time_end, or passing empty strings for them.","commonSituations":"LLM agents forgetting required parameters for temporal queries; templates that only fill query/max_results; copying a generic search payload and switching search_type to temporal_window without adding the time fields.","solutions":["Provide both time_start and time_end in ISO 8601 format (e.g. 2026-01-02T15:04:05Z)","Use a narrower search type if you do not actually need a time-bounded window","Re-invoke the tool after adding the missing temporal parameters"],"exampleFix":"// before\n{\"search_type\": \"temporal_window\", \"query\": \"login flow\"}\n// after\n{\"search_type\": \"temporal_window\", \"query\": \"login flow\", \"time_start\": \"2026-08-01T00:00:00Z\", \"time_end\": \"2026-08-31T23:59:59Z\"}","handlingStrategy":"validation","validationCode":"if searchType == \"temporal_window\" && (args.TimeStart == \"\" || args.TimeEnd == \"\") {\n    return errors.New(\"temporal_window requires both time_start and time_end (ISO 8601)\")\n}","typeGuard":"func temporalWindowArgsComplete(args GraphitiSearchAction) bool {\n    return args.SearchType == \"temporal_window\" && args.TimeStart != \"\" && args.TimeEnd != \"\"\n}","tryCatchPattern":null,"preventionTips":["Always set both time bounds when choosing temporal_window","Use a plain search type when no time filtering is needed","Add the required fields to any tool-payload template for temporal queries"],"tags":["validation","missing-parameter","graphiti","temporal"],"backgroundTag":"missing-required-argument","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}