vxcontrol/pentagi · error
invalid time_start format (use ISO 8601, e.g. 2026-01-02T15:
Error message
invalid time_start format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w
What it means
The time_start parameter of a temporal_window search could not be parsed as a valid ISO 8601 timestamp by parseGraphitiTime. The wrapped error (%w) carries the underlying parse failure. This is an argument-format validation error raised before any network call.
Source
Thrown at backend/pkg/tools/graphiti_search.go:348
}
return input
}
// handleTemporalWindowSearch performs time-bounded search
func (t *graphitiSearchTool) handleTemporalWindowSearch(
ctx context.Context,
groupID string,
args GraphitiSearchAction,
observationObject *graphiti.Observation,
) (string, error) {
// Validate temporal parameters
if args.TimeStart == "" || args.TimeEnd == "" {
return "", fmt.Errorf("time_start and time_end are required for temporal_window search")
}
timeStart, err := parseGraphitiTime(args.TimeStart)
if err != nil {
return "", fmt.Errorf("invalid time_start format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w", err)
}
timeEnd, err := parseGraphitiTime(args.TimeEnd)
if err != nil {
return "", fmt.Errorf("invalid time_end format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w", err)
}
if timeEnd.Before(timeStart) {
return "", fmt.Errorf("time_end must be after time_start")
}
maxResults := args.MaxResults.Int()
if maxResults <= 0 {
maxResults = DefaultTemporalMaxResults
}
req := graphiti.TemporalSearchRequest{
Query: args.Query,View on GitHub (pinned to ea665308ba)
Solutions
- Format time_start as ISO 8601, e.g. 2026-01-02T15:04:05Z
- Use an explicit UTC 'Z' offset to avoid timezone parsing issues
- Check the wrapped %w cause in the error for the exact parse failure
Example fix
// before
{"time_start": "August 1st 2026"}
// after
{"time_start": "2026-08-01T00:00:00Z"} Defensive patterns
Strategy: validation
Validate before calling
ts, err := time.Parse(time.RFC3339, args.TimeStart)
if err != nil {
return fmt.Errorf("time_start must be ISO 8601 (RFC3339), e.g. 2026-01-02T15:04:05Z: %w", err)
} Type guard
func validISO8601(s string) bool {
_, err := time.Parse(time.RFC3339, s)
return err == nil
} Prevention
- Format all timestamps with time.Format(time.RFC3339) at the source
- Use explicit UTC 'Z' offsets
- Reject human-readable date strings before invoking the tool
When it happens
Trigger: Passing time_start in a non-ISO-8601 format such as "01/02/2026", "yesterday", "2026-08-01 10:00" (space instead of T may fail depending on the parser), or a value with an invalid timezone.
Common situations: LLM agents emitting human-readable dates; locale-formatted timestamps; milliseconds vs seconds confusion; missing timezone designator.
Related errors
- invalid time_end format (use ISO 8601, e.g. 2026-01-02T15:04
- unknown search_type: %s
- time_start and time_end are required for temporal_window sea
- time_end must be after time_start
- center_node_uuid is required for entity_relationships search
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/ff213126d6474391.
Report an issue: GitHub.