Using MCP, this could be a method that would get the context to take decisions.
For example, here's an example of how I use it currently:
```
const context = await getContext();
const response = await generateText({ system: `Here's the user context: ${context}`, messages: [...] });
console.log(context);
// "First-time visitor using Google Chrome on a MacBook, browsing from San Francisco.
// Landed on the pricing page from a Google ad, clicked to compare plans,
// then visited the enterprise section before initiating a support chat."
```
It's like a session recorder for LLMs that captures rich user behavior and traits (like device, browser, location, and journey) and turns them into LLM context. Your agent or app instantly becomes more helpful, relevant, and aware without wiring up your own tracking and enrichment pipeline.
Would love to have something like a hotjar/analytics script that could automatically collect context and then I could query it to produce context for a prompt
Great idea, you should build it. Then do a Show HN with it
I have an editor where I can ask a question and it brings up the most related pieces of info, and if I change any of those pieces it will update the embedding in the db
"The user landed on the pricing page from a Google ad, clicked to compare plans, then visited the enterprise section before initiating a support chat."