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

# Instruct the agent on a case

> A person's instruction in plain language. It goes on the case's
timeline, where the next round of the agent reads it before anything
else, and (unless ``propose_rule`` is false) opens a proposed rule for
the agent in Improvements, to be adopted by a person.



## OpenAPI

````yaml /setup/internal-openapi.json post /v1/process/cases/{case_id}/instruct
openapi: 3.1.0
info:
  title: n:lead Scheduling Bridge — Internal API
  version: 0.4.0
  description: >-
    Internal API of the n:lead scheduling bridge: the process endpoints that
    drive the day-ahead pipeline (aggregate, publish the open position, submit
    schedules, generate forecasts, orchestrate), the operator console endpoints,
    and the read-only operator-app endpoints under /v1/mobile. The process and
    console endpoints require the process API key, /v1/mobile a device key of
    the mobile scope; not for customer use.
servers:
  - url: https://{host}
    description: Deployed service
    variables:
      host:
        default: api.energy.nlead.ch
        description: >-
          The service hostname - n:lead provides it (see the Base URL on the API
          introduction page)
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /v1/process/cases/{case_id}/instruct:
    post:
      summary: Instruct the agent on a case
      description: |-
        A person's instruction in plain language. It goes on the case's
        timeline, where the next round of the agent reads it before anything
        else, and (unless ``propose_rule`` is false) opens a proposed rule for
        the agent in Improvements, to be adopted by a person.
      operationId: post_case_instruct_v1_process_cases__case_id__instruct_post
      parameters:
        - name: case_id
          in: path
          required: true
          schema:
            type: string
            title: Case Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaseInstructRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Post Case Instruct V1 Process Cases  Case Id 
                  Instruct Post
        '404':
          description: No such case or agent.
        '409':
          description: The case is closed.
        '422':
          description: No agent carries the case's check; name one.
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    CaseInstructRequest:
      properties:
        text:
          type: string
          maxLength: 2000
          minLength: 1
          title: Text
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
          description: >-
            The agent it is for; default: the one whose skills carry the case's
            check
        propose_rule:
          type: boolean
          title: Propose Rule
          default: true
      type: object
      required:
        - text
      title: CaseInstructRequest
      description: |-
        A person's instruction to the agent on a case: on the timeline,
        where the next round reads it first, and - unless ``propose_rule`` is
        false - a proposed rule in Improvements.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      description: OIDC access token (Auth0 M2M)
      scheme: bearer

````

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