hindsight icon indicating copy to clipboard operation
hindsight copied to clipboard

Can not reflect content when use client api create mental models

Open foreturn opened this issue 6 months ago • 4 comments

Bug Description

Can not reflect content when use client api create mental models

Steps to Reproduce

// Create a mental model with automatic refresh enabled
const result2 = await client.createMentalModel(
    BANK_ID,
    'Project Status',
    'What is the current project status?',
    { trigger: { refreshAfterConsolidation: true } },
);
  1. Can not reflect content when use client api create mental models
  2. But when I manually create mental models and refresh manually is work

Expected Behavior

When use client api create mental models is work

Actual Behavior

no context

Version

latest

LLM Provider

Other

foreturn avatar May 13 '26 09:05 foreturn

It might be caused by the tags, but they cannot be cleared from the page.

foreturn avatar May 13 '26 10:05 foreturn

I'm not sure, but I can't run any reflect queries at all if I create mental models with curl, even if the reflect query is totally unrelated. I always get a response like "I do not have information" Edit: Actually not sure what's going on, sometimes I still get "I don't have information" after deleting the mental models, so not sure if this is the same.

noctuid avatar May 15 '26 18:05 noctuid

Thanks for the report! Before digging deeper, could you help us pin down the exact symptom?

A couple of clarifying questions:

  1. When you say "cannot reflect content" / "no context", what specifically are you observing? For example:

    • You call getMentalModel after createMentalModel and see content: "Generating content..." (the placeholder)?
    • You call reflect(...) and get back an empty/unhelpful response?
    • Something else?
  2. createMentalModel is asynchronous — it returns an operation_id and the actual content is populated by a background worker. In your snippet you don't appear to wait on that operation before doing whatever comes next. Could you share what your code does after the createMentalModel call? In particular, are you polling the operation / last_refreshed_at before reading the MM or calling reflect?

  3. In your "manual" flow that works — are you (a) creating the MM in the UI and clicking the Refresh button (which polls until refresh completes), or (b) something else?

  4. Re: the tags comment — does your real code pass tags to createMentalModel? If so, what tags, and do the memories you've retained share those tags?

A minimal reproducible snippet (full retain → create → check sequence) would help us narrow this down quickly.

nicoloboschi avatar May 25 '26 12:05 nicoloboschi

Thanks for the report! Before digging deeper, could you help us pin down the exact symptom?

A couple of clarifying questions:

  1. When you say "cannot reflect content" / "no context", what specifically are you observing? For example:

    • You call getMentalModel after createMentalModel and see content: "Generating content..." (the placeholder)?
    • You call reflect(...) and get back an empty/unhelpful response?
    • Something else?
  2. createMentalModel is asynchronous — it returns an operation_id and the actual content is populated by a background worker. In your snippet you don't appear to wait on that operation before doing whatever comes next. Could you share what your code does after the createMentalModel call? In particular, are you polling the operation / last_refreshed_at before reading the MM or calling reflect?

  3. In your "manual" flow that works — are you (a) creating the MM in the UI and clicking the Refresh button (which polls until refresh completes), or (b) something else?

  4. Re: the tags comment — does your real code pass tags to createMentalModel? If so, what tags, and do the memories you've retained share those tags?

A minimal reproducible snippet (full retain → create → check sequence) would help us narrow this down quickly.

It was my mistake; I attached tags when creating the mental model, but I failed to query based on those tags.

foreturn avatar May 25 '26 13:05 foreturn