MemoGrafterAgent
invoke()
Recall memory, call the configured LLM, update history, and ingest the exchange.
What it does
Recall memory, call the configured LLM, update history, and ingest the exchange.
This is the high-level chat path: it recalls relevant memory, builds context, calls the configured language model, records both turns, and schedules or performs ingestion according to the agent configuration.
Signature
TypeScript
invoke(userMessage: string): Promise<string>Parameters
userMessage: the new user turn.Result
A promise containing the assistant response.
Example
example.ts
const answer = await agent.invoke("What city did I move to?");