MemoGrafterAgent
getSessionId()
Read the stable session identifier used by the agent.
What it does
Read the stable session identifier used by the agent.
When to use it
Use when logging, correlating storage records, or integrating the agent with application-owned session metadata.
Signature
TypeScript
getSessionId(): stringResult
The current session ID.
Behavior
Returns the stable session identifier assigned to this agent instance.
Side effects and completion
Read-only and synchronous.
Example
example.ts
const sessionId = agent.getSessionId();