Sessions
session.getInfo()
Read the current Session summary and detail snapshot
session.getInfo()
session.getInfo() returns the current summary/detail snapshot for one session.
Example
const session = await agent.getSession("repo-analysis");
const info = await session.getInfo();
console.log(info.sessionId);
console.log(info.previewText);
console.log(info.messageCount);What it returns
Typical fields include:
agentIdsessionIdtitlepreviewTextmessageCountcreatedAtupdatedAtmodelLabelexecutingtimezone
Good use cases
- rendering the selected session header in UI
- checking whether a session is currently executing
- reading lightweight session detail before loading full history