vxcontrol/pentagi · error

center_node_uuid is required for entity_relationships search

Error message

center_node_uuid is required for entity_relationships search

What it means

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.

Source

Thrown at backend/pkg/tools/graphiti_search.go:390

	}

	resp, err := t.graphitiClient.TemporalWindowSearch(ctx, req)
	if err != nil {
		return "", fmt.Errorf("temporal window search failed: %w", err)
	}

	return FormatGraphitiTemporalResults(resp, args.Query), nil
}

// handleEntityRelationshipsSearch finds relationships from a center node
func (t *graphitiSearchTool) handleEntityRelationshipsSearch(
	ctx context.Context,
	groupID string,
	args GraphitiSearchAction,
	observationObject *graphiti.Observation,
) (string, error) {
	if args.CenterNodeUUID == "" {
		return "", fmt.Errorf("center_node_uuid is required for entity_relationships search")
	}
	if _, err := uuid.Parse(args.CenterNodeUUID); err != nil {
		return "", fmt.Errorf(
			"center_node_uuid must be a valid UUID copied verbatim from the 'UUID:' field of a prior "+
				"graphiti_search result, got %q", args.CenterNodeUUID,
		)
	}

	maxResults := args.MaxResults.Int()
	if maxResults <= 0 {
		maxResults = DefaultRelationshipMaxResults
	}

	maxDepth := args.MaxDepth.Int()
	if maxDepth <= 0 {
		maxDepth = DefaultMaxDepth
	}
	if maxDepth > 3 {

View on GitHub (pinned to ea665308ba)

Solutions

  1. Supply center_node_uuid with a UUID copied verbatim from the 'UUID:' field of a prior graphiti_search result
  2. First run a nodes/episodes search to discover the entity's UUID, then pivot with entity_relationships
  3. Use a different search type if you do not have a center node

Example fix

// before
{"search_type": "entity_relationships", "query": "vpn server"}
// after
{"search_type": "entity_relationships", "query": "vpn server", "center_node_uuid": "3f2a9c1e-8b47-4d20-9c11-2f6a5b7e1234"}
Defensive patterns

Strategy: validation

Validate before calling

if args.CenterNodeUUID == "" {
    return errors.New("entity_relationships requires center_node_uuid from a prior graphiti_search result")
}

Type guard

func hasCenterNode(args GraphitiSearchAction) bool {
    return args.SearchType != "entity_relationships" || args.CenterNodeUUID != ""
}

Prevention

When it happens

Trigger: Calling graphiti_search with search_type="entity_relationships" without setting center_node_uuid.

Common situations: 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.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01). Data as JSON: /api/errors/70f683419878314f. Report an issue: GitHub.