Skip to content

Interface: ResearchSessionResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ResearchSessionResponse

Defined in: src/types/research.ts:137

Full research session state.

createdAt: string

Defined in: src/types/research.ts:185

When the session was created (ISO 8601).


cycles: ResearchCycleResultDto[]

Defined in: src/types/research.ts:151

Results from each completed cycle.


optional error?: string | null

Defined in: src/types/research.ts:149

Error message if status is Failed.


gapCheck: ResearchGapCheck | null

Defined in: src/types/research.ts:139

Null when the server has not reported an evidence check.


knowledgeBaseTenantId: string | null

Defined in: src/types/research.ts:143

Tenant holding the session’s research records, or null when the server omits it.


papers: PaperMetadataDto[]

Defined in: src/types/research.ts:158

Papers ingested so far, with full metadata (title, authors, DOI, URL).

This is the session’s actual corpus — totalPapersIngested is only its length. Empty against a backend that does not send it.


question: string

Defined in: src/types/research.ts:145

The research question.


sessionId: string

Defined in: src/types/research.ts:141

Session ID (UUID).


status: ResearchSessionStatusDto

Defined in: src/types/research.ts:147

Current session status.


totalContradictions: number

Defined in: src/types/research.ts:181

Total contradictions.


totalFindings: number

Defined in: src/types/research.ts:179

Total findings.


totalGaps: number

Defined in: src/types/research.ts:183

Total knowledge gaps.


totalPapersIngested: number

Defined in: src/types/research.ts:177

Total papers ingested.


totalPapersPooled: number

Defined in: src/types/research.ts:175

Total papers in the deduplicated retrieval pool, before ranking and the budget cut. Live during a run.


totalPapersRetrieved: number

Defined in: src/types/research.ts:170

Total papers KEPT, including by the cycle currently running: after ranking and the cut to the paper budget, so never above the budget. ResearchSessionResponse.totalPapersPooled is the pool before the cut.

Live throughout a run, unlike cycles[].papersRetrieved, which a cycle only publishes once it completes — minutes after the papers arrived. Deriving the figure from cycles alone therefore renders 0 over a visibly growing paper list for most of a session; read this instead, and keep cycles[].papersRetrieved for the per-cycle breakdown.


updatedAt: string

Defined in: src/types/research.ts:187

When the session was last updated (ISO 8601).