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.session_collection().get_session("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:

  • agentId
  • sessionId
  • title
  • previewText
  • messageCount
  • createdAt
  • updatedAt
  • modelLabel
  • executing
  • timezone

title comes from the top-level meta.json field. After the first user message, the SDK persists a title; if model generation fails, it uses a truncated version of that first user message.

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