vxcontrol/pentagi · error

memorist handler is required

Error message

memorist handler is required

What it means

Constructor validation error (backend/pkg/tools/tools.go): the flow tool-set factory was invoked with a nil Memorist handler in its config. Programming/configuration error — all agent handlers must be wired before building the flow's tool executor.

Source

Thrown at backend/pkg/tools/tools.go:830

		summarizer:  cfg.Summarizer,
	}, nil
}

func (fte *flowToolsExecutor) GetAssistantExecutor(cfg AssistantExecutorConfig) (ContextToolsExecutor, error) {
	if cfg.Adviser == nil {
		return nil, fmt.Errorf("adviser handler is required")
	}

	if cfg.Coder == nil {
		return nil, fmt.Errorf("coder handler is required")
	}

	if cfg.Installer == nil {
		return nil, fmt.Errorf("installer handler is required")
	}

	if cfg.Memorist == nil {
		return nil, fmt.Errorf("memorist handler is required")
	}

	if cfg.Pentester == nil {
		return nil, fmt.Errorf("pentester handler is required")
	}

	if cfg.Searcher == nil {
		return nil, fmt.Errorf("searcher handler is required")
	}

	container, err := fte.db.GetFlowPrimaryContainer(context.Background(), fte.flowID)
	if err != nil {
		return nil, fmt.Errorf("failed to get container %d: %w", fte.flowID, err)
	}

	term := NewTerminalTool(
		fte.flowID, nil, nil,
		container.ID,

View on GitHub (pinned to ea665308ba)

Solutions

  1. Assign a non-nil Memorist handler in AssistantExecutorConfig.
  2. Check that the memory store and embedding provider are configured so the memorist handler is created.
  3. Validate all required handler fields before calling GetAssistantExecutor.

Example fix

// before
executor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{
  Adviser: adviser, Coder: coder, Installer: installer,
}) // Memorist nil
// after
executor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{
  Adviser: adviser, Coder: coder, Installer: installer, Memorist: memorist,
})
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Memorist == nil {
    return errors.New("memorist handler missing from AssistantExecutorConfig")
}

Type guard

func hasMemorist(cfg tools.AssistantExecutorConfig) bool {
    return cfg.Memorist != nil
}

Try / catch

executor, err := fte.GetAssistantExecutor(cfg)
if err != nil {
    if strings.Contains(err.Error(), "memorist handler is required") {
        // check memory store + embedding provider configuration
        return err
    }
    return err
}

Prevention

When it happens

Trigger: Calling GetAssistantExecutor with cfg.Memorist == nil, e.g. when the memory store/embedder is disabled upstream so the memorist handler was never created.

Common situations: Deployments without the pgvector/embedding backend configured, causing the memorist handler to be nil; partial wiring of agent handlers.

Related errors


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