{"record":{"id":"70f683419878314f","repo":"vxcontrol/pentagi","slug":"center-node-uuid-is-required-for-entity-relationsh","errorCode":null,"errorMessage":"center_node_uuid is required for entity_relationships search","messagePattern":"center_node_uuid is required for entity_relationships search","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/graphiti_search.go","lineNumber":390,"sourceCode":"\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 \"+\n\t\t\t\t\"graphiti_search result, got %q\", args.CenterNodeUUID,\n\t\t)\n\t}\n\n\tmaxResults := args.MaxResults.Int()\n\tif maxResults <= 0 {\n\t\tmaxResults = DefaultRelationshipMaxResults\n\t}\n\n\tmaxDepth := args.MaxDepth.Int()\n\tif maxDepth <= 0 {\n\t\tmaxDepth = DefaultMaxDepth\n\t}\n\tif maxDepth > 3 {","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/graphiti_search.go#L372-L408","documentation":"The entity_relationships search type pivots around a center node, so center_node_uuid is mandatory. This guard returns before any network call when the field is empty. It tells the caller which parameter to supply for relationship traversal in the Graphiti graph.","triggerScenarios":"Calling graphiti_search with search_type=\"entity_relationships\" without setting center_node_uuid.","commonSituations":"LLM agents omitting the UUID argument; templates built for generic search reused for relationship search; confusion between query-only search types and node-pivoted ones.","solutions":["Supply center_node_uuid with a UUID copied verbatim from the 'UUID:' field of a prior graphiti_search result","First run a nodes/episodes search to discover the entity's UUID, then pivot with entity_relationships","Use a different search type if you do not have a center node"],"exampleFix":"// before\n{\"search_type\": \"entity_relationships\", \"query\": \"vpn server\"}\n// after\n{\"search_type\": \"entity_relationships\", \"query\": \"vpn server\", \"center_node_uuid\": \"3f2a9c1e-8b47-4d20-9c11-2f6a5b7e1234\"}","handlingStrategy":"validation","validationCode":"if args.CenterNodeUUID == \"\" {\n    return errors.New(\"entity_relationships requires center_node_uuid from a prior graphiti_search result\")\n}","typeGuard":"func hasCenterNode(args GraphitiSearchAction) bool {\n    return args.SearchType != \"entity_relationships\" || args.CenterNodeUUID != \"\"\n}","tryCatchPattern":null,"preventionTips":["Persist UUIDs from prior search results before pivoting","Run a discovery search first when no UUID is known","Make the required parameter explicit in agent prompts"],"tags":["validation","missing-parameter","graphiti","uuid"],"backgroundTag":"missing-required-argument","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}