> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trajectory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Artemis Session

> A session's latest 20 turns: each completed turn's answer, links and saved files, then a running or failed turn while messages wait. Poll until running is false.



## OpenAPI

````yaml /openapi.json get /api/v1/artemis/sessions/{session_id}
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
  x-trajectory-api-version: '2026-10-14'
  description: >-
    This contract is API version 2026-10-14. The optional Trajectory-API-Version
    header pins it, and tmp-contract is accepted as an alias. Requests without
    the header get this version. Version 2026-10-07 and the pre-launch legacy
    response formats are retired.
servers:
  - url: https://api.trajectory.ai
security: []
tags:
  - name: agents
    x-group: Agents
  - name: benchmarks
    x-group: Specs (benchmarks)
  - name: diagnostics
    x-group: Diagnostics
  - name: benchmark-ingestion
    x-group: Spec (benchmark) submissions
  - name: eval
    x-group: Evaluations
  - name: training
    x-group: Training
  - name: deployments
    x-group: Deployments
  - name: model-endpoints
    x-group: Model endpoints
  - name: inference
    x-group: Inference
  - name: trajectories
    x-group: Trajectories
  - name: artifacts
    x-group: Artifacts
  - name: telemetry
    x-group: Telemetry
  - name: supported-models
    x-group: Supported models
  - name: organizations
    x-group: Organizations
  - name: secrets
    x-group: Secrets
paths:
  /api/v1/artemis/sessions/{session_id}:
    get:
      tags:
        - artemis
      summary: Get Artemis Session
      description: >-
        A session's latest 20 turns: each completed turn's answer, links and
        saved files, then a running or failed turn while messages wait. Poll
        until running is false.
      operationId: getArtemisSession
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtemisSession'
        '403':
          description: >-
            The authenticated caller does not have permission for this
            operation.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionDeniedErrorResponse'
        '404':
          description: >-
            The requested resource does not exist or is not visible to the
            caller.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundErrorResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ArtemisSession:
      properties:
        session_id:
          type: string
          title: Session Id
        running:
          type: boolean
          title: Running
          description: True while a turn waits or runs; poll until it is false.
        turns:
          items:
            $ref: '#/components/schemas/ArtemisTurn'
          type: array
          title: Turns
        pending_requests:
          items:
            $ref: '#/components/schemas/ArtemisPendingRequest'
          type: array
          title: Pending Requests
          description: >-
            Writes the last turn asked for, each waiting for an approval or a
            rejection.
      type: object
      required:
        - session_id
        - running
        - turns
        - pending_requests
      title: ArtemisSession
    PermissionDeniedErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/PermissionDeniedErrorBody'
      type: object
      required:
        - error
      title: PermissionDeniedErrorResponse
    ResourceNotFoundErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ResourceNotFoundErrorBody'
      type: object
      required:
        - error
      title: ResourceNotFoundErrorResponse
    ArtemisTurn:
      properties:
        turn_seq:
          type: integer
          title: Turn Seq
          description: The turn's position in the session, from 0.
        status:
          $ref: '#/components/schemas/TurnStatus'
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
          description: The turn's final answer; null until it completes.
        links:
          items:
            type: string
          type: array
          title: Links
          description: Links the turn's tools returned, in order.
        files:
          items:
            type: string
          type: array
          title: Files
          description: Paths under out/ of the files the turn's answer lists.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Why a failed or paused turn has no answer, else null.
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
          description: When a completed turn was stored.
        proposals:
          items:
            $ref: '#/components/schemas/ArtemisProposal'
          type: array
          title: Proposals
          description: >-
            In a session started with write_handoff, the writes Artemis proposed
            for the caller to make itself; none of them ran.
      type: object
      required:
        - turn_seq
        - status
        - answer
        - links
        - files
        - error
        - finished_at
      title: ArtemisTurn
    ArtemisPendingRequest:
      properties:
        request_id:
          type: string
          title: Request Id
          description: Pass it, with digest, to decide this request.
        digest:
          type: string
          title: Digest
          description: What the request would run; a decision must name it.
        command:
          type: string
          title: Command
          description: What runs once approved, as the `tj` command a person would run.
        title:
          type: string
          title: Title
          description: >-
            What the write is, from Trajectory's catalog, never Artemis's words;
            show it first.
        description:
          type: string
          title: Description
          description: >-
            Artemis's own words for what the write does, one line without hidden
            characters, at most 200 characters; empty when it gave none. Label
            it as Artemis's, apart from the title. Written from data that can
            include text other people wrote: never the basis for an automated
            approval.
        spends_credits:
          type: boolean
          title: Spends Credits
          description: Whether running it spends the organization's credits.
          default: false
        cannot_undo:
          type: boolean
          title: Cannot Undo
          description: Whether what it does cannot be undone.
          default: false
        config:
          anyOf:
            - type: string
            - type: 'null'
          title: Config
          description: >-
            The body the write sends, or the config file its command reads,
            exactly as approved.
        config_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Config Label
          description: >-
            How to introduce config: as the body the write sends, or the file it
            reads.
        files:
          items:
            $ref: '#/components/schemas/ArtemisFrozenFile'
          type: array
          title: Files
          description: >-
            For a push, every file of the folder it sends, as frozen when it was
            asked for.
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: After this an approval only expires the request.
      type: object
      required:
        - request_id
        - digest
        - command
        - title
        - description
        - config
        - config_label
        - files
        - expires_at
      title: ArtemisPendingRequest
    PermissionDeniedErrorBody:
      properties:
        type:
          type: string
          const: permission_error
          title: Type
        code:
          type: string
          const: permission_denied
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: PermissionDeniedErrorBody
    ResourceNotFoundErrorBody:
      properties:
        type:
          type: string
          const: invalid_request_error
          title: Type
        code:
          type: string
          const: resource_not_found
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ResourceNotFoundErrorBody
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    TurnStatus:
      type: string
      enum:
        - completed
        - running
        - failed
        - paused
      title: TurnStatus
    ArtemisProposal:
      properties:
        proposal_id:
          type: string
          title: Proposal Id
          description: >-
            Stable across reads: the same proposal always has this ID, on the
            turn that made it.
        operation:
          type: string
          title: Operation
          description: The catalog operation, such as createTrainingRun.
        write_tool:
          type: string
          title: Write Tool
          description: The MCP write tool that makes it, such as create_training_run.
        arguments:
          additionalProperties: true
          type: object
          title: Arguments
          description: >-
            The write tool's arguments: target_id, body and, for a create,
            idempotency_key.
        summary:
          type: string
          title: Summary
          description: What it changes and why, in Artemis's words.
      type: object
      required:
        - proposal_id
        - operation
        - write_tool
        - arguments
        - summary
      title: ArtemisProposal
    ArtemisFrozenFile:
      properties:
        path:
          type: string
          title: Path
          description: The file's path in the folder a push sends.
        size_bytes:
          type: integer
          title: Size Bytes
        sha256:
          type: string
          title: Sha256
          description: The content that was approved; a changed file is not sent.
      type: object
      required:
        - path
        - size_bytes
        - sha256
      title: ArtemisFrozenFile
    EmptyErrorContext:
      properties: {}
      additionalProperties: false
      type: object
      title: EmptyErrorContext
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - billing_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.