openapi: 3.2.0 info: title: Latitude Sessions API version: v1 description: Open-source AI agent monitoring platform. Full observability into what's failing in production. Discover underlying issues, get alerts when something breaks and verify your fix worked. servers: - url: https://api.latitude.so description: Production servers: - url: https://api.latitude.so tags: - name: Sessions paths: /v1/projects/{projectSlug}/sessions/list: post: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: list summary: List project sessions description: Returns a cursor-paginated page of sessions in the project. A session groups the traces of one conversation. Combine `filters` with `query` (free-text semantic search) to narrow the result set. Session list rows exclude per-message LLM content — use `getSession` for the conversation view. security: - ApiKeyAuth: [] operationId: listSessions parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ListSessionsBody' responses: '200': description: Page of sessions content: application/json: schema: $ref: '#/components/schemas/PaginatedSessions' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/analytics: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: analytics summary: Get project session analytics description: 'Returns session analytics for the project: a total (or median) per metric over the requested range, plus a per-bucket series for each metric. Buckets are 12-hour UTC-aligned. The range defaults to the trailing 7 days.' security: - ApiKeyAuth: [] operationId: getSessionAnalytics parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string format: date-time description: Lower bound (inclusive) of the time range. Defaults to 7 days before `toIso`. required: false description: Lower bound (inclusive) of the time range. Defaults to 7 days before `toIso`. name: fromIso in: query - schema: type: string format: date-time description: Upper bound (inclusive) of the time range. Defaults to now. required: false description: Upper bound (inclusive) of the time range. Defaults to now. name: toIso in: query responses: '200': description: Session analytics content: application/json: schema: $ref: '#/components/schemas/SessionAnalyticsResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/{sessionId}: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: get summary: Get project session description: 'Returns a single session by id, including its `conversation`: the system instructions and the messages of the session''s latest LLM completion, in OpenTelemetry GenAI format.' security: - ApiKeyAuth: [] operationId: getSession parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string maxLength: 128 description: Session identifier lifted from instrumentation. Up to 128 characters. required: true description: Session identifier lifted from instrumentation. Up to 128 characters. name: sessionId in: path responses: '200': description: Session detail content: application/json: schema: $ref: '#/components/schemas/SessionDetail' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/{sessionId}/assessment: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: getAssessment summary: Get session assessment description: Explains a session across outcome, reliability, cost, speed, and safety with complete summaries, reader coverage, and a chronological page of evidence. Evidence contains identifiers for authorized records rather than raw message, tool, or span content. security: - ApiKeyAuth: [] operationId: getSessionAssessment parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string maxLength: 128 description: Session identifier lifted from instrumentation. Up to 128 characters. required: true description: Session identifier lifted from instrumentation. Up to 128 characters. name: sessionId in: path - schema: type: string description: Opaque cursor returned by a previous assessment page. Omit for the first page. required: false description: Opaque cursor returned by a previous assessment page. Omit for the first page. name: cursor in: query responses: '200': description: Session assessment page content: application/json: schema: $ref: '#/components/schemas/SessionAssessment' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/{sessionId}/traces: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: listTraces summary: List session traces description: Returns a cursor-paginated page of the traces that belong to the session. Rows match the trace list shape and exclude per-message LLM content — use `getTrace` for the full conversation view. security: - ApiKeyAuth: [] operationId: listSessionTraces parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string maxLength: 128 description: Session identifier lifted from instrumentation. Up to 128 characters. required: true description: Session identifier lifted from instrumentation. Up to 128 characters. name: sessionId in: path - schema: type: string description: Opaque cursor returned in a previous response's `nextCursor`. Omit on the first page. required: false description: Opaque cursor returned in a previous response's `nextCursor`. Omit on the first page. name: cursor in: query - schema: type: integer minimum: 1 maximum: 200 default: 50 description: Page size. Defaults to 50; max 200. required: false description: Page size. Defaults to 50; max 200. name: limit in: query - schema: type: string enum: - startTime - endTime - durationNs - tokensTotal - costTotalMicrocents default: startTime description: Field to sort by. Defaults to `startTime`. required: false description: Field to sort by. Defaults to `startTime`. name: sortBy in: query - schema: type: string enum: - asc - desc default: desc description: Sort direction. Defaults to `desc` (most recent first). required: false description: Sort direction. Defaults to `desc` (most recent first). name: sortDirection in: query responses: '200': description: Page of traces content: application/json: schema: $ref: '#/components/schemas/PaginatedTraces' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/{sessionId}/signals: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: listSignals summary: List session signals description: Returns the signals that occurred in the session, including each signal's `scoreEvidence` and occurrence stats scoped to the session's traces. Ordered by most recent occurrence first. security: - ApiKeyAuth: [] operationId: listSessionSignals parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string maxLength: 128 description: Session identifier lifted from instrumentation. Up to 128 characters. required: true description: Session identifier lifted from instrumentation. Up to 128 characters. name: sessionId in: path responses: '200': description: Signals of the session content: application/json: schema: $ref: '#/components/schemas/SessionSignals' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/{sessionId}/signals/{signalSlug}: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: getSignal summary: Get session signal description: Returns one signal by slug, including its `scoreEvidence` and occurrence stats scoped to the session. Returns 404 when the signal has no occurrences in the session. security: - ApiKeyAuth: [] operationId: getSessionSignal parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string maxLength: 128 description: Session identifier lifted from instrumentation. Up to 128 characters. required: true description: Session identifier lifted from instrumentation. Up to 128 characters. name: sessionId in: path - schema: type: string description: Signal slug. required: true description: Signal slug. name: signalSlug in: path responses: '200': description: Session signal content: application/json: schema: $ref: '#/components/schemas/SessionSignal' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/{sessionId}/memory: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: getMemory summary: Get session memory footprint description: 'Returns the session''s memory footprint: per-record read, added, and removed token metrics plus session-wide totals. Pass `traceId` to restrict the footprint to a single trace of the session.' security: - ApiKeyAuth: [] operationId: getSessionMemory parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string maxLength: 128 description: Session identifier lifted from instrumentation. Up to 128 characters. required: true description: Session identifier lifted from instrumentation. Up to 128 characters. name: sessionId in: path - schema: type: string minLength: 32 maxLength: 32 description: Restrict the memory footprint to this trace of the session. Omit for the whole session. required: false description: Restrict the memory footprint to this trace of the session. Omit for the whole session. name: traceId in: query responses: '200': description: Session memory footprint content: application/json: schema: $ref: '#/components/schemas/SessionMemorySummary' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/sessions/{sessionId}/memory/changes: get: tags: - Sessions x-fern-sdk-group-name: sessions x-fern-sdk-method-name: getMemoryChanges summary: Get session memory changes description: Returns the memory writes the session made as per-record before/after diffs. Pass `traceId` to restrict to a single trace of the session. security: - ApiKeyAuth: [] operationId: getSessionMemoryChanges parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string maxLength: 128 description: Session identifier lifted from instrumentation. Up to 128 characters. required: true description: Session identifier lifted from instrumentation. Up to 128 characters. name: sessionId in: path - schema: type: string minLength: 32 maxLength: 32 description: Restrict the memory changes to this trace of the session. Omit for the whole session. required: false description: Restrict the memory changes to this trace of the session. Omit for the whole session. name: traceId in: query responses: '200': description: Session memory changes content: application/json: schema: $ref: '#/components/schemas/SessionMemoryChanges' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: SessionAssessmentCostEvaluation: type: object properties: family: type: string enum: - spend - context - tools - memory - recovery description: 'Cost family this evidence belongs to: spend, context, tools, memory, or recovery.' rawValue: type: number description: The metric's raw reading in `rawUnit`, when measured. rawUnit: type: string enum: - microcents - inputTokens - cacheTokens - contextLimitTokens - toolCalls - memoryOperations - memoryReads - memoryWrites - completedSessions description: Native unit of `rawValue`. measurementState: type: string enum: - measured - unmeasured - notApplicable description: Whether this evidence was measured, could not be measured, or did not apply. This is not a health label. nativeImpact: $ref: '#/components/schemas/SessionAssessmentEstimateRange' required: - family - measurementState description: Cost family evaluation for this evidence. Only Cost evidence carries one. SessionAnalyticsSpans: type: object properties: total: type: number description: Total number of spans. buckets: type: array items: $ref: '#/components/schemas/SessionAnalyticsBucket' description: Number of spans per bucket. required: - total - buckets Error: type: object properties: error: type: string required: - error SessionMemorySummary: type: object properties: records: type: array items: $ref: '#/components/schemas/MemoryRecordSummary' description: Per-record read/write token footprint for the session (or a single trace). total: type: object properties: readTokens: type: integer minimum: 0 description: Total tokens read across the session. tokensAdded: type: integer minimum: 0 description: Total tokens added across the session. tokensRemoved: type: integer minimum: 0 description: Total tokens removed across the session. writeRecords: type: integer minimum: 0 description: Number of records the session wrote, including zero-delta writes. required: - readTokens - tokensAdded - tokensRemoved - writeRecords description: Session-wide totals. required: - records - total SessionAssessmentDimensionSummary: oneOf: - type: object properties: scoreDimension: type: string enum: - outcome description: Outcome dimension. evidenceCounts: type: object properties: positive: type: integer minimum: 0 description: Number of positive evidence effects. negative: type: integer minimum: 0 description: Number of negative evidence effects. context: type: integer minimum: 0 description: Number of contextual evidence effects. required: - positive - negative - context description: Evidence counts grouped by direction. measurementCounts: type: object properties: observed: type: integer minimum: 0 description: Number of directly observed effects. estimated: type: integer minimum: 0 description: Number of estimated effects. notMeasured: type: integer minimum: 0 description: Number of effects without a numeric measurement. required: - observed - estimated - notMeasured description: Evidence counts grouped by measurement state. coverage: type: string enum: - complete - partial - notExamined description: Reader coverage for this dimension. taskOutcome: type: object properties: verdict: type: string enum: - success - failure description: Observed task verdict when available. probability: type: number minimum: 0 maximum: 1 description: Estimated success probability when available. description: Resolved task outcome when available. required: - scoreDimension - evidenceCounts - measurementCounts - coverage - type: object properties: scoreDimension: type: string enum: - reliability description: Reliability dimension. evidenceCounts: type: object properties: positive: type: integer minimum: 0 description: Number of positive evidence effects. negative: type: integer minimum: 0 description: Number of negative evidence effects. context: type: integer minimum: 0 description: Number of contextual evidence effects. required: - positive - negative - context description: Evidence counts grouped by direction. measurementCounts: type: object properties: observed: type: integer minimum: 0 description: Number of directly observed effects. estimated: type: integer minimum: 0 description: Number of estimated effects. notMeasured: type: integer minimum: 0 description: Number of effects without a numeric measurement. required: - observed - estimated - notMeasured description: Evidence counts grouped by measurement state. coverage: type: string enum: - complete - partial - notExamined description: Reader coverage for this dimension. completion: type: string enum: - usable - terminalFailure - undetermined description: Resolved completion status. recoveredIncidentCount: type: integer minimum: 0 description: Number of recovered operational incidents. unrecoveredIncidentCount: type: integer minimum: 0 description: Number of unrecovered operational incidents. required: - scoreDimension - evidenceCounts - measurementCounts - coverage - completion - recoveredIncidentCount - unrecoveredIncidentCount - type: object properties: scoreDimension: type: string enum: - cost description: Cost dimension. evidenceCounts: type: object properties: positive: type: integer minimum: 0 description: Number of positive evidence effects. negative: type: integer minimum: 0 description: Number of negative evidence effects. context: type: integer minimum: 0 description: Number of contextual evidence effects. required: - positive - negative - context description: Evidence counts grouped by direction. measurementCounts: type: object properties: observed: type: integer minimum: 0 description: Number of directly observed effects. estimated: type: integer minimum: 0 description: Number of estimated effects. notMeasured: type: integer minimum: 0 description: Number of effects without a numeric measurement. required: - observed - estimated - notMeasured description: Evidence counts grouped by measurement state. coverage: type: string enum: - complete - partial - notExamined description: Reader coverage for this dimension. observedMicrocents: type: number minimum: 0 description: Total observed session spend in microcents. measuredAvoidableMicrocents: type: number minimum: 0 description: Directly measured avoidable spend. estimatedAvoidableMicrocents: type: number minimum: 0 description: Estimated avoidable spend. families: type: array items: $ref: '#/components/schemas/SessionAssessmentCostFamilySummary' description: All five Cost families, always present, with raw metric readings and their measurement state. required: - scoreDimension - evidenceCounts - measurementCounts - coverage - families - type: object properties: scoreDimension: type: string enum: - speed description: Speed dimension. evidenceCounts: type: object properties: positive: type: integer minimum: 0 description: Number of positive evidence effects. negative: type: integer minimum: 0 description: Number of negative evidence effects. context: type: integer minimum: 0 description: Number of contextual evidence effects. required: - positive - negative - context description: Evidence counts grouped by direction. measurementCounts: type: object properties: observed: type: integer minimum: 0 description: Number of directly observed effects. estimated: type: integer minimum: 0 description: Number of estimated effects. notMeasured: type: integer minimum: 0 description: Number of effects without a numeric measurement. required: - observed - estimated - notMeasured description: Evidence counts grouped by measurement state. coverage: type: string enum: - complete - partial - notExamined description: Reader coverage for this dimension. observedCriticalPathNs: type: number minimum: 0 description: Observed critical-path duration in nanoseconds. measuredAvoidableNs: type: number minimum: 0 description: Directly measured avoidable duration. estimatedAvoidableNs: type: number minimum: 0 description: Estimated avoidable duration. required: - scoreDimension - evidenceCounts - measurementCounts - coverage - type: object properties: scoreDimension: type: string enum: - safety description: Safety dimension. evidenceCounts: type: object properties: positive: type: integer minimum: 0 description: Number of positive evidence effects. negative: type: integer minimum: 0 description: Number of negative evidence effects. context: type: integer minimum: 0 description: Number of contextual evidence effects. required: - positive - negative - context description: Evidence counts grouped by direction. measurementCounts: type: object properties: observed: type: integer minimum: 0 description: Number of directly observed effects. estimated: type: integer minimum: 0 description: Number of estimated effects. notMeasured: type: integer minimum: 0 description: Number of effects without a numeric measurement. required: - observed - estimated - notMeasured description: Evidence counts grouped by measurement state. coverage: type: string enum: - complete - partial - notExamined description: Reader coverage for this dimension. exposureCount: type: integer minimum: 0 description: Number of safety exposures. successfulDefenseCount: type: integer minimum: 0 description: Number of successful safety defenses. confirmedHarmCount: type: integer minimum: 0 description: Number of confirmed harmful outcomes. required: - scoreDimension - evidenceCounts - measurementCounts - coverage - exposureCount - successfulDefenseCount - confirmedHarmCount SessionAssessmentEstimateRange: type: object properties: unit: type: string description: Unit both the point estimate and its bounds are expressed in. point: type: number description: Point estimate in `unit`. lower: type: number description: Lower bound in `unit`, when the estimate is bounded. upper: type: number description: Upper bound in `unit`, when the estimate is bounded. interpretation: type: string enum: - identificationBound - confidenceInterval description: What the bounds mean. `identificationBound` is the range the evidence cannot narrow further; `confidenceInterval` is sampling uncertainty. Present whenever a bound is. required: - unit - point description: 'Impact in the family''s own unit. Never a score: sessions do not receive Cost numbers.' SessionAssessmentDimensionEffect: oneOf: - type: object properties: scoreDimension: type: string enum: - outcome description: Outcome dimension. role: type: string enum: - taskOutcome description: Evidence about whether the task succeeded. direction: type: string enum: - positive - negative - context description: How the evidence affects this dimension. measurement: type: string enum: - observed - estimated - notMeasured description: Whether the impact was measured, estimated, or left unquantified. benchmarkUse: type: string enum: - direct - modeled - attributionOnly - contextOnly description: How this evidence may be used in benchmark calculations. impact: $ref: '#/components/schemas/SessionAssessmentEvidenceImpact' costEvaluation: $ref: '#/components/schemas/SessionAssessmentCostEvaluation' required: - scoreDimension - role - direction - measurement - benchmarkUse - type: object properties: scoreDimension: type: string enum: - reliability description: Reliability dimension. role: type: string enum: - completionOutcome - operationalIncident description: Reliability evidence channel informed by this item. direction: type: string enum: - positive - negative - context description: How the evidence affects this dimension. measurement: type: string enum: - observed - estimated - notMeasured description: Whether the impact was measured, estimated, or left unquantified. benchmarkUse: type: string enum: - direct - modeled - attributionOnly - contextOnly description: How this evidence may be used in benchmark calculations. impact: $ref: '#/components/schemas/SessionAssessmentEvidenceImpact' costEvaluation: $ref: '#/components/schemas/SessionAssessmentCostEvaluation' required: - scoreDimension - role - direction - measurement - benchmarkUse - type: object properties: scoreDimension: type: string enum: - cost description: Cost dimension. role: type: string enum: - spendEfficiency description: Evidence about useful versus avoidable spend. direction: type: string enum: - positive - negative - context description: How the evidence affects this dimension. measurement: type: string enum: - observed - estimated - notMeasured description: Whether the impact was measured, estimated, or left unquantified. benchmarkUse: type: string enum: - direct - modeled - attributionOnly - contextOnly description: How this evidence may be used in benchmark calculations. impact: $ref: '#/components/schemas/SessionAssessmentEvidenceImpact' costEvaluation: $ref: '#/components/schemas/SessionAssessmentCostEvaluation' required: - scoreDimension - role - direction - measurement - benchmarkUse - type: object properties: scoreDimension: type: string enum: - speed description: Speed dimension. role: type: string enum: - criticalPathEfficiency description: Evidence about critical-path efficiency. direction: type: string enum: - positive - negative - context description: How the evidence affects this dimension. measurement: type: string enum: - observed - estimated - notMeasured description: Whether the impact was measured, estimated, or left unquantified. benchmarkUse: type: string enum: - direct - modeled - attributionOnly - contextOnly description: How this evidence may be used in benchmark calculations. impact: $ref: '#/components/schemas/SessionAssessmentEvidenceImpact' costEvaluation: $ref: '#/components/schemas/SessionAssessmentCostEvaluation' required: - scoreDimension - role - direction - measurement - benchmarkUse - type: object properties: scoreDimension: type: string enum: - safety description: Safety dimension. role: type: string enum: - confirmedHarm - exposure - successfulDefense description: Safety evidence channel informed by this item. direction: type: string enum: - positive - negative - context description: How the evidence affects this dimension. measurement: type: string enum: - observed - estimated - notMeasured description: Whether the impact was measured, estimated, or left unquantified. benchmarkUse: type: string enum: - direct - modeled - attributionOnly - contextOnly description: How this evidence may be used in benchmark calculations. impact: $ref: '#/components/schemas/SessionAssessmentEvidenceImpact' costEvaluation: $ref: '#/components/schemas/SessionAssessmentCostEvaluation' required: - scoreDimension - role - direction - measurement - benchmarkUse SessionAssessmentCostMetricEvidence: type: object properties: metricId: type: string description: Stable identifier of the Cost metric. family: type: string enum: - spend - context - tools - memory - recovery description: 'Cost family this evidence belongs to: spend, context, tools, memory, or recovery.' aggregation: type: string enum: - resourceRatio - eventRate - sessionMean description: How the aggregate reading was calculated for this session. measurementState: type: string enum: - measured - unmeasured - notApplicable description: Whether the metric produced a raw session reading. This is not a health label. rawUnit: type: string enum: - microcents - inputTokens - cacheTokens - contextLimitTokens - toolCalls - memoryOperations - memoryReads - memoryWrites - completedSessions description: Native unit used by the Cost metric. rawValue: type: number description: Aggregate raw metric value when measured. eligibleUnits: type: number minimum: 0 description: Total session units eligible for this metric. adverseUnits: type: number minimum: 0 description: Observed adverse units within `eligibleUnits`; never a calibrated penalty. evidence: type: string enum: - confirmed - modeled description: Whether the reported native impact is directly confirmed or modeled. nativeImpact: allOf: - $ref: '#/components/schemas/SessionAssessmentEstimateRange' - description: Impact in the metric's native unit, when available. limitations: type: array items: type: string enum: - missingContent - truncatedContent - missingPricing - unknownModelContext - unknownToolContract - criticalPathUnavailable - insufficientComparableCalls - definitionPeriodIncomplete description: Known limits on how completely the metric could examine the session. required: - metricId - family - aggregation - measurementState - rawUnit - limitations SessionSignals: type: object properties: items: type: array items: $ref: '#/components/schemas/SessionSignal' description: Signals that occurred in the session, ordered by most recent occurrence first. required: - items SessionAnalyticsTokens: type: object properties: total: type: number description: Total tokens across all LLM spans. buckets: type: array items: $ref: '#/components/schemas/SessionAnalyticsBucket' description: Tokens per bucket across all LLM spans. required: - total - buckets SessionAssessmentReaderCoverage: oneOf: - type: object properties: readerId: type: string description: Stable identifier of the evidence reader. label: type: string description: Human-readable reader name. scoreDimensions: type: array items: type: string enum: - outcome - reliability - cost - speed - safety description: Agent Score dimension informed by this evidence. description: Dimensions the reader can inform. status: type: string enum: - examined findingCount: type: integer minimum: 0 description: Number of findings produced by the reader. selection: type: object properties: method: type: string enum: - deterministic - hinted - jev-preclassifier - uniform-sample - ordinary-sample description: Selection method. inclusionProbability: type: number minimum: 0 maximum: 1 description: Probability that this session was selected. required: - method - inclusionProbability description: Sampling details when this reader is not deterministic. required: - readerId - label - scoreDimensions - status - findingCount - type: object properties: readerId: type: string description: Stable identifier of the evidence reader. label: type: string description: Human-readable reader name. scoreDimensions: type: array items: type: string enum: - outcome - reliability - cost - speed - safety description: Agent Score dimension informed by this evidence. description: Dimensions the reader can inform. status: type: string enum: - partiallyExamined findingCount: type: integer minimum: 0 description: Number of findings produced by readable inputs. readableCount: type: integer minimum: 0 description: Number of inputs the reader could examine. totalCount: type: integer minimum: 0 description: Total candidate inputs for the reader. limitation: type: string enum: - skipped - notSelected - rateLimited - executionFailed - pending - missingTelemetry - unmappedTelemetry - missingPricing - missingContent - truncatedContent - unknownModelContext - criticalPathUnavailable - missingLatencyReference description: Reason the reader could not completely examine the session. selection: type: object properties: method: type: string enum: - deterministic - hinted - jev-preclassifier - uniform-sample - ordinary-sample description: Selection method. inclusionProbability: type: number minimum: 0 maximum: 1 description: Probability that this session was selected. required: - method - inclusionProbability description: Sampling details when this reader is not deterministic. required: - readerId - label - scoreDimensions - status - findingCount - readableCount - totalCount - limitation - type: object properties: readerId: type: string description: Stable identifier of the evidence reader. label: type: string description: Human-readable reader name. scoreDimensions: type: array items: type: string enum: - outcome - reliability - cost - speed - safety description: Agent Score dimension informed by this evidence. description: Dimensions the reader can inform. status: type: string enum: - notExamined limitation: type: string enum: - skipped - notSelected - rateLimited - executionFailed - pending - missingTelemetry - unmappedTelemetry - missingPricing - missingContent - truncatedContent - unknownModelContext - criticalPathUnavailable - missingLatencyReference description: Reason the reader could not completely examine the session. selection: type: object properties: method: type: string enum: - deterministic - hinted - jev-preclassifier - uniform-sample - ordinary-sample description: Selection method. inclusionProbability: type: number minimum: 0 maximum: 1 description: Probability that this session was selected. required: - method - inclusionProbability description: Sampling details when this reader is not deterministic. required: - readerId - label - scoreDimensions - status - limitation - type: object properties: readerId: type: string description: Stable identifier of the evidence reader. label: type: string description: Human-readable reader name. scoreDimensions: type: array items: type: string enum: - outcome - reliability - cost - speed - safety description: Agent Score dimension informed by this evidence. description: Dimensions the reader can inform. status: type: string enum: - notApplicable required: - readerId - label - scoreDimensions - status SessionAssessmentItem: type: object properties: id: type: string description: Stable identifier for this assessment item. evidenceKey: type: string description: Stable identity of the underlying fact across recomputation. groupKey: type: string description: Stable identity used to group equivalent findings and linked judgments. label: type: string description: Short human-readable explanation of the evidence. description: type: string description: Additional explanation when available; never raw telemetry content. occurredAt: type: string format: date-time description: ISO-8601 timestamp for when the evidence occurred, when telemetry provides one. source: type: string enum: - metric - signal - flagger - score - moment description: Source that identified the fact. polarity: type: string enum: - negative - unknown - positive description: Whether the finding is harmful, beneficial, or requires interpretation. impactLevel: type: string enum: - low - medium - high description: Coarse impact level for ordering and display. metricId: type: string description: Canonical metric identifier when the item has benchmark semantics. signalIds: type: array items: type: string description: Signals linked to the same underlying fact. scoreIds: type: array items: type: string description: Scores linked to the same underlying fact. occurrenceCount: type: integer minimum: 0 exclusiveMinimum: true description: Number of equivalent occurrences represented by this item. effects: type: array items: $ref: '#/components/schemas/SessionAssessmentDimensionEffect' description: Dimension-specific interpretations of this evidence. anchors: type: array items: $ref: '#/components/schemas/SessionAssessmentEvidenceAnchor' description: Positions where the fact occurred, represented only by identifiers. destinations: type: array items: $ref: '#/components/schemas/SessionAssessmentEvidenceDestination' description: Authorized product records that a caller can open for the underlying details. required: - id - evidenceKey - groupKey - label - source - polarity - impactLevel - signalIds - scoreIds - occurrenceCount - effects - anchors - destinations SessionDetail: type: object properties: organizationId: type: string description: Organization that owns this session. projectId: type: string description: Project this session belongs to. sessionId: type: string description: Session identifier set by the SDK. Groups the traces of one conversation. traceCount: type: integer minimum: 0 description: Number of traces in the session. traceIds: type: array items: type: string description: Identifiers of the traces that make up the session. spanCount: type: integer minimum: 0 description: Total number of spans across the session's traces. errorCount: type: integer minimum: 0 description: Number of spans flagged with an error status. startTime: type: string description: ISO-8601 timestamp of the session's earliest span. endTime: type: string description: ISO-8601 timestamp of the session's latest span. lastActivityTime: type: string description: ISO-8601 timestamp of the session's most recent span start. durationNs: type: number description: Active execution time of the session in nanoseconds, not wall-clock. timeToFirstTokenNs: type: number description: Nanoseconds from the start of the first LLM span to its first emitted token. `0` if not measured. tokensInput: type: number description: Total input tokens across the session's LLM spans. tokensOutput: type: number description: Total output tokens across the session's LLM spans. tokensCacheRead: type: number description: Total tokens served from the provider's prompt cache. tokensCacheCreate: type: number description: Total tokens written to the provider's prompt cache. tokensReasoning: type: number description: Total reasoning tokens reported by the model. tokensTotal: type: number description: Sum of all token counters. costInputMicrocents: type: number description: Cost of input tokens in microcents (100,000,000 per USD). costOutputMicrocents: type: number description: Cost of output tokens in microcents (100,000,000 per USD). costTotalMicrocents: type: number description: Total cost in microcents (100,000,000 per USD). userId: type: string nullable: true description: End-user identifier set by the SDK. `null` when absent. userEmail: type: string nullable: true description: End-user email set by the SDK. `null` when absent. simulationId: type: string nullable: true description: CUID of the simulation that produced this session. `null` when not a simulation. tags: type: array items: type: string description: Free-form tags attached at ingest time. metadata: type: object additionalProperties: type: string description: Free-form metadata attached at ingest time. models: type: array items: type: string description: Model identifiers seen across the session's LLM spans. providers: type: array items: type: string description: LLM-provider identifiers seen across the session's spans. serviceNames: type: array items: type: string description: OpenTelemetry `service.name` values seen in the session. agentNames: type: array items: type: string description: Agent names seen across the session's spans. definedTools: type: array items: type: string description: Tool names declared available across the session's spans. rootSpanId: type: string nullable: true description: Identifier of the session's root span. `null` when no root span has been ingested. rootSpanName: type: string nullable: true description: '`name` attribute of the root span. `null` when no root span has been ingested.' latestTraceId: type: string nullable: true description: Identifier of the trace that produced the session's latest output. `null` when no trace produced output. conversation: type: array items: $ref: '#/components/schemas/GenAIMessage' description: 'Conversation of the session, in OpenTelemetry GenAI format: the system instructions, then the messages of the session''s latest LLM completion, followed by its generated output.' required: - organizationId - projectId - sessionId - traceCount - traceIds - spanCount - errorCount - startTime - endTime - lastActivityTime - durationNs - timeToFirstTokenNs - tokensInput - tokensOutput - tokensCacheRead - tokensCacheCreate - tokensReasoning - tokensTotal - costInputMicrocents - costOutputMicrocents - costTotalMicrocents - userId - userEmail - simulationId - tags - metadata - models - providers - serviceNames - agentNames - definedTools - rootSpanId - rootSpanName - latestTraceId - conversation SessionAnalyticsDuration: type: object properties: median: type: number description: Median session duration in seconds. buckets: type: array items: $ref: '#/components/schemas/SessionAnalyticsBucket' description: Median session duration per bucket in seconds. required: - median - buckets SessionAnalyticsSessions: type: object properties: total: type: number description: Number of sessions in the range. buckets: type: array items: $ref: '#/components/schemas/SessionAnalyticsBucket' description: Number of sessions per bucket. required: - total - buckets SessionMemoryChange: type: object properties: storeId: type: string description: Store the changed record belongs to. recordId: type: string description: Record that changed. kind: type: string enum: - added - updated - removed description: How the session changed the record. beforeBody: type: string nullable: true description: The record's body before the session's writes. `null` when added or when the prior body was not captured. afterBody: type: string nullable: true description: The record's body after the session's writes. `null` when removed or when the body was not captured. tokensAdded: type: integer minimum: 0 description: Tokens added by the session's writes. tokensRemoved: type: integer minimum: 0 description: Tokens removed by the session's writes. degraded: type: boolean description: '`true` when a side''s body was unavailable, so the diff is incomplete.' lastChangeSpanId: type: string nullable: true description: Span of the session's last write to this record. `null` when unknown. required: - storeId - recordId - kind - beforeBody - afterBody - tokensAdded - tokensRemoved - degraded - lastChangeSpanId SessionAnalyticsBucket: type: object properties: bucket: type: string description: ISO-8601 UTC timestamp of the bucket's start. value: type: number description: Metric value for this bucket. required: - bucket - value SessionAssessment: type: object properties: sessionId: type: string description: Session represented by this assessment. items: type: array items: $ref: '#/components/schemas/SessionAssessmentItem' description: Chronological page of deduplicated evidence items. nextCursor: type: string description: Opaque cursor for the next evidence page. Absent when there are no more items. dimensions: type: array items: $ref: '#/components/schemas/SessionAssessmentDimensionSummary' description: Complete summaries for all five Agent Score dimensions, repeated on every page. coverage: type: object properties: readers: type: array items: $ref: '#/components/schemas/SessionAssessmentReaderCoverage' description: Coverage status for each evidence reader. required: - readers description: Complete reader coverage for the session, repeated on every page. required: - sessionId - items - dimensions - coverage SessionSignal: type: object properties: id: type: string minLength: 24 maxLength: 24 description: Stable signal identifier. organizationId: type: string minLength: 24 maxLength: 24 description: Organization that owns this signal. projectId: type: string minLength: 24 maxLength: 24 description: Project this signal belongs to. slug: type: string description: URL-safe slug derived from `name`. Unique within the project. name: type: string description: Human-readable name. description: type: string description: Description of the signal. source: type: string enum: - annotation - flagger - custom description: Where the signal originated from. scoreEvidence: type: array items: $ref: '#/components/schemas/SignalScoreEvidence' description: Agent Score dimension and evidence-role pairs informed by this signal. An empty list means the signal is diagnostic only. states: type: array items: type: string enum: - new - escalating - ongoing - resolved - regressed - ignored description: Active lifecycle states. A signal may carry multiple states at once (e.g. `escalating` + `new`). resolvedAt: type: string nullable: true description: ISO-8601 timestamp at which the signal was resolved, or `null`. ignoredAt: type: string nullable: true description: ISO-8601 timestamp at which the signal was ignored, or `null`. regressedAt: type: string nullable: true description: ISO-8601 timestamp at which a new occurrence reopened the resolved signal, or `null`. mutedAt: type: string nullable: true description: ISO-8601 timestamp at which notifications were muted, or `null`. Muting only silences notifications; incidents still open. createdAt: type: string description: ISO-8601 timestamp of creation. updatedAt: type: string description: ISO-8601 timestamp of the last update. occurrences: type: integer minimum: 0 description: Number of occurrences within the session. firstSeenAt: type: string description: ISO-8601 timestamp of the earliest occurrence in the session. lastSeenAt: type: string description: ISO-8601 timestamp of the latest occurrence in the session. traceIds: type: array items: type: string description: Traces of the session where the signal occurred. required: - id - organizationId - projectId - slug - name - description - source - scoreEvidence - states - resolvedAt - ignoredAt - regressedAt - mutedAt - createdAt - updatedAt - occurrences - firstSeenAt - lastSeenAt - traceIds ListSessionsBody: type: object properties: cursor: type: string description: Opaque cursor returned in a previous response's `nextCursor`. Omit on the first page. limit: type: integer minimum: 1 maximum: 200 default: 50 description: Page size. Defaults to 50; max 200. sortBy: type: string enum: - lastActivity - startTime - duration - ttft - cost - spans - traceCount default: lastActivity description: Field to sort by. Defaults to `lastActivity` (most recently active first). sortDirection: type: string enum: - asc - desc default: desc description: Sort direction. Defaults to `desc` (most recent first). query: type: string maxLength: 500 description: Free-text semantic search across the sessions' traces (input and output messages). Combined with `filters` via AND. filters: $ref: '#/components/schemas/SessionFilterSet' SessionAnalyticsTraces: type: object properties: total: type: number description: Number of traces across the range's sessions. buckets: type: array items: $ref: '#/components/schemas/SessionAnalyticsBucket' description: Number of traces per bucket. required: - total - buckets SessionAssessmentEvidenceDestination: oneOf: - type: object properties: kind: type: string enum: - sessionMessage traceId: type: string description: Trace containing the destination message. messageIndex: type: integer minimum: 0 description: Zero-based message position to open. partIndex: type: integer minimum: 0 description: Zero-based content-part position to open. required: - kind - traceId - messageIndex - type: object properties: kind: type: string enum: - span traceId: type: string description: Trace containing the destination span. spanId: type: string description: Identifier of the destination span. required: - kind - traceId - spanId - type: object properties: kind: type: string enum: - toolCall traceId: type: string description: Trace containing the destination tool call. toolCallId: type: string description: Identifier of the destination tool call. required: - kind - traceId - toolCallId - type: object properties: kind: type: string enum: - memoryEvent memoryEventId: type: string description: Identifier of the destination memory event. required: - kind - memoryEventId - type: object properties: kind: type: string enum: - score scoreId: type: string description: Identifier of the destination score. required: - kind - scoreId - type: object properties: kind: type: string enum: - signal signalId: type: string description: Identifier of the destination signal. required: - kind - signalId Session: type: object properties: organizationId: type: string description: Organization that owns this session. projectId: type: string description: Project this session belongs to. sessionId: type: string description: Session identifier set by the SDK. Groups the traces of one conversation. traceCount: type: integer minimum: 0 description: Number of traces in the session. traceIds: type: array items: type: string description: Identifiers of the traces that make up the session. spanCount: type: integer minimum: 0 description: Total number of spans across the session's traces. errorCount: type: integer minimum: 0 description: Number of spans flagged with an error status. startTime: type: string description: ISO-8601 timestamp of the session's earliest span. endTime: type: string description: ISO-8601 timestamp of the session's latest span. lastActivityTime: type: string description: ISO-8601 timestamp of the session's most recent span start. durationNs: type: number description: Active execution time of the session in nanoseconds, not wall-clock. timeToFirstTokenNs: type: number description: Nanoseconds from the start of the first LLM span to its first emitted token. `0` if not measured. tokensInput: type: number description: Total input tokens across the session's LLM spans. tokensOutput: type: number description: Total output tokens across the session's LLM spans. tokensCacheRead: type: number description: Total tokens served from the provider's prompt cache. tokensCacheCreate: type: number description: Total tokens written to the provider's prompt cache. tokensReasoning: type: number description: Total reasoning tokens reported by the model. tokensTotal: type: number description: Sum of all token counters. costInputMicrocents: type: number description: Cost of input tokens in microcents (100,000,000 per USD). costOutputMicrocents: type: number description: Cost of output tokens in microcents (100,000,000 per USD). costTotalMicrocents: type: number description: Total cost in microcents (100,000,000 per USD). userId: type: string nullable: true description: End-user identifier set by the SDK. `null` when absent. userEmail: type: string nullable: true description: End-user email set by the SDK. `null` when absent. simulationId: type: string nullable: true description: CUID of the simulation that produced this session. `null` when not a simulation. tags: type: array items: type: string description: Free-form tags attached at ingest time. metadata: type: object additionalProperties: type: string description: Free-form metadata attached at ingest time. models: type: array items: type: string description: Model identifiers seen across the session's LLM spans. providers: type: array items: type: string description: LLM-provider identifiers seen across the session's spans. serviceNames: type: array items: type: string description: OpenTelemetry `service.name` values seen in the session. agentNames: type: array items: type: string description: Agent names seen across the session's spans. definedTools: type: array items: type: string description: Tool names declared available across the session's spans. rootSpanId: type: string nullable: true description: Identifier of the session's root span. `null` when no root span has been ingested. rootSpanName: type: string nullable: true description: '`name` attribute of the root span. `null` when no root span has been ingested.' required: - organizationId - projectId - sessionId - traceCount - traceIds - spanCount - errorCount - startTime - endTime - lastActivityTime - durationNs - timeToFirstTokenNs - tokensInput - tokensOutput - tokensCacheRead - tokensCacheCreate - tokensReasoning - tokensTotal - costInputMicrocents - costOutputMicrocents - costTotalMicrocents - userId - userEmail - simulationId - tags - metadata - models - providers - serviceNames - agentNames - definedTools - rootSpanId - rootSpanName SessionAnalyticsResponse: type: object properties: sessions: $ref: '#/components/schemas/SessionAnalyticsSessions' traces: $ref: '#/components/schemas/SessionAnalyticsTraces' cost: $ref: '#/components/schemas/SessionAnalyticsCost' duration: $ref: '#/components/schemas/SessionAnalyticsDuration' tokens: $ref: '#/components/schemas/SessionAnalyticsTokens' timeToFirstToken: $ref: '#/components/schemas/SessionAnalyticsTimeToFirstToken' spans: $ref: '#/components/schemas/SessionAnalyticsSpans' required: - sessions - traces - cost - duration - tokens - timeToFirstToken - spans SessionAnalyticsTimeToFirstToken: type: object properties: median: type: number description: Median time-to-first-token across LLM spans, in seconds. buckets: type: array items: $ref: '#/components/schemas/SessionAnalyticsBucket' description: Median time-to-first-token per bucket, in seconds. required: - median - buckets SessionFilterSet: type: object additionalProperties: type: array items: $ref: '#/components/schemas/FilterCondition' description: 'Filter set keyed by session field. Each entry holds an array of conditions ANDed together for that field; field-level groups are ANDed across the set. Valid fields: status, name, traceId, sessionId, simulationId, userId, tags, moments, topics, models, providers, serviceNames, tools, definedTools, duration, ttft, cost, spanCount, errorCount, tokensInput, tokensOutput, cacheHitRate, startTime, endTime; score-derived keys (score.passed, score.errored, score.value, score.source, score.sourceId, score.annotatorId, score.signalId, score.simulationId); and arbitrary metadata via `metadata.`. `moments` filters by conversation moment kind and `topics` by behavior topic id (a topic matches its whole subtree). `startTime`/`endTime` take ISO-8601 values (a session''s first span start / last span end). `gtePercentile` is only supported on duration/ttft/cost. Unknown fields are rejected rather than ignored.' SessionAssessmentEvidenceAnchor: oneOf: - type: object properties: kind: type: string enum: - message traceId: type: string description: Trace containing the referenced message. messageIndex: type: integer minimum: 0 description: Zero-based message position in the trace conversation. partIndex: type: integer minimum: 0 description: Zero-based content-part position within the message. contentHash: type: string description: Stable hash used to recognize the referenced message content. required: - kind - traceId - messageIndex - type: object properties: kind: type: string enum: - span traceId: type: string description: Trace containing the referenced span. spanId: type: string description: Identifier of the referenced span. required: - kind - traceId - spanId - type: object properties: kind: type: string enum: - toolCall traceId: type: string description: Trace containing the referenced tool call. toolCallId: type: string description: Provider or SDK identifier of the referenced tool call. toolName: type: string description: Name of the invoked tool when available. messageIndex: type: integer minimum: 0 description: Message position containing the tool call. required: - kind - traceId - toolCallId - type: object properties: kind: type: string enum: - memoryEvent memoryEventId: type: string description: Identifier of the referenced memory event. required: - kind - memoryEventId - type: object properties: kind: type: string enum: - score scoreId: type: string description: Identifier of the referenced score. required: - kind - scoreId - type: object properties: kind: type: string enum: - signal signalId: type: string description: Identifier of the referenced signal. required: - kind - signalId SessionMemoryChanges: type: object properties: records: type: array items: $ref: '#/components/schemas/SessionMemoryChange' description: Per-record before/after diffs for what the session changed. required: - records Trace: type: object properties: organizationId: type: string description: Organization that owns this trace. projectId: type: string description: Project this trace belongs to. traceId: type: string description: 32-character trace identifier. spanCount: type: integer minimum: 0 description: Total number of spans in the trace. errorCount: type: integer minimum: 0 description: Number of spans flagged with an error status. startTime: type: string description: ISO-8601 timestamp of the trace's earliest span. endTime: type: string description: ISO-8601 timestamp of the trace's latest span. durationNs: type: number description: Wall-clock duration of the trace in nanoseconds. timeToFirstTokenNs: type: number description: Nanoseconds from the start of the first LLM span to its first emitted token. `0` if not measured. tokensInput: type: number description: Total input tokens across LLM spans. tokensOutput: type: number description: Total output tokens across LLM spans. tokensCacheRead: type: number description: Total tokens served from the provider's prompt cache. tokensCacheCreate: type: number description: Total tokens written to the provider's prompt cache. tokensReasoning: type: number description: Total reasoning tokens reported by the model. tokensTotal: type: number description: Sum of all token counters. costInputMicrocents: type: number description: Cost of input tokens in microcents (100,000,000 per USD). costOutputMicrocents: type: number description: Cost of output tokens in microcents (100,000,000 per USD). costTotalMicrocents: type: number description: Total cost in microcents (100,000,000 per USD). sessionId: type: string nullable: true description: Conversation/session identifier set by the SDK. `null` when absent. userId: type: string nullable: true description: End-user identifier set by the SDK. `null` when absent. simulationId: type: string nullable: true description: CUID of the simulation that produced this trace. `null` when not a simulation. tags: type: array items: type: string description: Free-form tags attached at ingest time. models: type: array items: type: string description: Model identifiers seen across the trace's LLM spans. providers: type: array items: type: string description: LLM-provider identifiers seen across the trace's spans. serviceNames: type: array items: type: string description: OpenTelemetry `service.name` values seen in the trace. rootSpanId: type: string nullable: true description: Identifier of the trace's root span. `null` when no root span has been ingested. rootSpanName: type: string nullable: true description: '`name` attribute of the root span. `null` when no root span has been ingested.' positiveAnnotationCount: type: integer minimum: 0 description: Number of `passed = true` annotations attached to this trace. negativeAnnotationCount: type: integer minimum: 0 description: Number of `passed = false` annotations attached to this trace. required: - organizationId - projectId - traceId - spanCount - errorCount - startTime - endTime - durationNs - timeToFirstTokenNs - tokensInput - tokensOutput - tokensCacheRead - tokensCacheCreate - tokensReasoning - tokensTotal - costInputMicrocents - costOutputMicrocents - costTotalMicrocents - sessionId - userId - simulationId - tags - models - providers - serviceNames - rootSpanId - rootSpanName - positiveAnnotationCount - negativeAnnotationCount MemoryRecordSummary: type: object properties: storeId: type: string description: Store the record belongs to. recordId: type: string description: Record the metrics are for. readTokens: type: integer minimum: 0 description: Tokens read from this record across the session's retrievals. tokensAdded: type: integer minimum: 0 description: Tokens the session added to this record (endpoint diff). tokensRemoved: type: integer minimum: 0 description: Tokens the session removed from this record (endpoint diff). required: - storeId - recordId - readTokens - tokensAdded - tokensRemoved FilterCondition: type: object properties: op: type: string enum: - eq - neq - gt - gte - lt - lte - in - notIn - contains - notContains - gtePercentile description: Comparison operator applied to the field's value (e.g. `eq`, `neq`, `in`). The full operator list lives in the API reference. value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number description: Right-hand value compared against the field. Arrays are required for `in` / `notIn`-style operators. required: - op - value GenAIMessage: type: object additionalProperties: nullable: true description: Message in OpenTelemetry GenAI format (`role` + content parts + optional tool calls). PaginatedTraces: type: object properties: items: type: array items: $ref: '#/components/schemas/Trace' description: Page of items, in the requested sort order. nextCursor: type: string nullable: true description: Opaque cursor for fetching the next page. `null` when there are no more pages. Pass it back in `cursor` to continue. hasMore: type: boolean description: '`true` when there is at least one more page after this one.' required: - items - nextCursor - hasMore SessionAssessmentEvidenceImpact: oneOf: - type: object properties: kind: type: string enum: - taskOutcome verdict: type: string enum: - success - failure description: Observed task outcome. probability: type: number minimum: 0 maximum: 1 description: Estimated success probability when available. required: - kind - verdict - type: object properties: kind: type: string enum: - completion status: type: string enum: - usable - terminalFailure description: Whether the session delivered usable output. required: - kind - status - type: object properties: kind: type: string enum: - incident status: type: string enum: - recovered - unrecovered description: Whether execution recovered after the incident. sameSubjectRecovered: type: boolean description: Whether the same operation or tool later succeeded. required: - kind - status - type: object properties: kind: type: string enum: - spend observedMicrocents: type: number minimum: 0 description: Observed spend in microcents. avoidableMicrocents: type: number minimum: 0 description: Spend attributed as avoidable when measured. required: - kind - observedMicrocents - type: object properties: kind: type: string enum: - duration observedNs: type: number minimum: 0 description: Observed duration in nanoseconds. avoidableNs: type: number minimum: 0 description: Duration attributed as avoidable when measured. required: - kind - observedNs - type: object properties: kind: type: string enum: - outcomeAssociation probabilityChange: type: number minimum: -1 maximum: 1 description: Modeled change in success probability. required: - kind - type: object properties: kind: type: string enum: - safety status: type: string enum: - exposure - successfulDefense - confirmedHarm description: Observed safety result. findingKind: type: string description: Machine-readable safety finding category. A structured detector result is one of injectionAttempt, injectionDefense, injectionCompliance, piiExposure, or piiDisclosure; an item derived from a signal's assigned role instead names that signal's detector. required: - kind - status - findingKind - type: object properties: kind: type: string enum: - observation value: type: number description: Native numeric observation when available. unit: type: string description: Unit of the native observation when available. required: - kind description: Native structured impact carried by this evidence. SessionAssessmentCostFamilySummary: type: object properties: family: type: string enum: - spend - context - tools - memory - recovery description: 'Cost family this evidence belongs to: spend, context, tools, memory, or recovery.' measurementState: type: string enum: - measured - partial - unmeasured - notApplicable description: Aggregate measurement state across this family's metrics. This is not a health label. observedItemCount: type: integer minimum: 0 description: Evidence items carrying this family. metrics: type: array items: $ref: '#/components/schemas/SessionAssessmentCostMetricEvidence' description: Aggregate session-safe readings for this family's metrics. nativeImpact: allOf: - $ref: '#/components/schemas/SessionAssessmentEstimateRange' - description: Family impact in its own unit, when aggregated. required: - family - measurementState - observedItemCount - metrics SignalScoreEvidence: oneOf: - type: object properties: scoreDimension: type: string enum: - outcome description: Agent Score dimension this evidence informs. role: type: string enum: - taskOutcome description: How this evidence informs the dimension. required: - scoreDimension - role - type: object properties: scoreDimension: type: string enum: - reliability description: Agent Score dimension this evidence informs. role: type: string enum: - completionOutcome - operationalIncident description: How this evidence informs the dimension. required: - scoreDimension - role - type: object properties: scoreDimension: type: string enum: - cost description: Agent Score dimension this evidence informs. role: type: string enum: - spendEfficiency description: How this evidence informs the dimension. required: - scoreDimension - role - type: object properties: scoreDimension: type: string enum: - speed description: Agent Score dimension this evidence informs. role: type: string enum: - criticalPathEfficiency description: How this evidence informs the dimension. required: - scoreDimension - role - type: object properties: scoreDimension: type: string enum: - safety description: Agent Score dimension this evidence informs. role: type: string enum: - confirmedHarm - exposure description: How this evidence informs the dimension. required: - scoreDimension - role PaginatedSessions: type: object properties: items: type: array items: $ref: '#/components/schemas/Session' description: Page of items, in the requested sort order. nextCursor: type: string nullable: true description: Opaque cursor for fetching the next page. `null` when there are no more pages. Pass it back in `cursor` to continue. hasMore: type: boolean description: '`true` when there is at least one more page after this one.' required: - items - nextCursor - hasMore SessionAnalyticsCost: type: object properties: total: type: number description: Total session cost in USD. buckets: type: array items: $ref: '#/components/schemas/SessionAnalyticsBucket' description: Session cost per bucket in USD. required: - total - buckets securitySchemes: ApiKeyAuth: type: http scheme: bearer bearerFormat: API key description: 'Organization-scoped API key, sent as `Authorization: Bearer `.' x-fern-bearer: name: apiKey env: LATITUDE_API_KEY