Can not reflect content when use client api create mental models
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 } },
);
- Can not reflect content when use client api create mental models
- 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
It might be caused by the tags, but they cannot be cleared from the page.
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.
Thanks for the report! Before digging deeper, could you help us pin down the exact symptom?
A couple of clarifying questions:
-
When you say "cannot reflect content" / "no context", what specifically are you observing? For example:
- You call
getMentalModelaftercreateMentalModeland seecontent: "Generating content..."(the placeholder)? - You call
reflect(...)and get back an empty/unhelpful response? - Something else?
- You call
-
createMentalModelis asynchronous — it returns anoperation_idand 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 thecreateMentalModelcall? In particular, are you polling the operation /last_refreshed_atbefore reading the MM or calling reflect? -
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?
-
Re: the tags comment — does your real code pass
tagstocreateMentalModel? 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.
Thanks for the report! Before digging deeper, could you help us pin down the exact symptom?
A couple of clarifying questions:
When you say "cannot reflect content" / "no context", what specifically are you observing? For example:
- You call
getMentalModelaftercreateMentalModeland seecontent: "Generating content..."(the placeholder)?- You call
reflect(...)and get back an empty/unhelpful response?- Something else?
createMentalModelis asynchronous — it returns anoperation_idand 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 thecreateMentalModelcall? In particular, are you polling the operation /last_refreshed_atbefore reading the MM or calling reflect?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?
Re: the tags comment — does your real code pass
tagstocreateMentalModel? 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.