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

# Generate follow-up suggestions

> Generates up to three short follow-up prompts based on the most recent conversation exchange. Requires `suggestions_enabled` to be set on the agent; returns 400 otherwise. This call is stateless — it does not read from or write to a session. The agent's `rights_mode` controls whether authentication is required.



## OpenAPI

````yaml /openapi/openapi.json post /agents/suggestions/{agentId}
openapi: 3.1.0
info:
  title: IMP REST API
  version: 1.0.0
  description: >-
    REST endpoints of the IMP backend. GraphQL covers entity CRUD; REST covers
    agent runs, media, files, and system utilities. All requests require
    authentication unless the agent is public.
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: http://localhost:9001
        description: >-
          Base URL of your IMP backend. Self-hosted deployments typically run on
          port 9001.
security:
  - apiKey: []
  - bearer: []
tags:
  - name: Agents
    description: Endpoints for running, compacting, and querying agent instances.
  - name: Sessions
    description: Endpoints for managing files attached to agent sessions.
  - name: Media
    description: Transcription, speech synthesis, and image generation.
  - name: System
    description: Platform health and configuration utilities.
  - name: Budgets
    description: >-
      LiteLLM tag-budget management for users, roles, teams, projects, agents,
      and routines. Access requires `super_admin` or a role with
      `budget_management` write scope.
  - name: Skills
    description: >-
      Skills are versioned bundles of files (markdown, scripts, assets) mounted
      into the agent sandbox. These endpoints manage the skill registry and
      individual skill files.
  - name: Uploads
    description: >-
      Uppy-compatible S3 companion routes for single-part and multipart file
      uploads. Accept the standard API key. The `internal-key` header (set to
      `INTERNAL_SECRET`) is accepted only on `/s3/delete`, `/s3/download`,
      `/s3/list`, and `/s3/object` — it does **not** work on `/s3/sign` or the
      `/s3/multipart` routes.
  - name: Compliance
    description: >-
      GDPR / DSGVO operator endpoints for data-subject access (export) and
      erasure. Both require `super_admin`.
  - name: Artifacts
    description: >-
      Shareable artifact links — create, list, and revoke share links for files
      stored in S3.
paths:
  /agents/suggestions/{agentId}:
    post:
      tags:
        - Agents
      summary: Generate follow-up suggestions
      description: >-
        Generates up to three short follow-up prompts based on the most recent
        conversation exchange. Requires `suggestions_enabled` to be set on the
        agent; returns 400 otherwise. This call is stateless — it does not read
        from or write to a session. The agent's `rights_mode` controls whether
        authentication is required.
      operationId: getAgentSuggestions
      parameters:
        - name: agentId
          in: path
          required: true
          description: Agent ID (UUID).
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - messages
              properties:
                messages:
                  type: array
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/UIMessage'
                  description: >-
                    The conversation history (at minimum the last user +
                    assistant pair) to base suggestions on.
      responses:
        '200':
          description: Array of up to three suggested follow-up strings.
          content:
            application/json:
              schema:
                type: object
                properties:
                  suggestions:
                    type: array
                    items:
                      type: string
                    maxItems: 3
                required:
                  - suggestions
              example:
                suggestions:
                  - Can you break that down by region?
                  - What were the main drivers of growth?
                  - How does this compare to last year?
        '400':
          description: >-
            Missing `agentId`, empty `messages` array, suggestions not enabled
            on the agent, or no model configured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed or caller lacks read access to the agent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Model not permitted for the calling user or agent-scoped key
            mismatch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Agent not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UIMessage:
      type: object
      description: >-
        An AI SDK UIMessage object. Contains an `id` string, a `role` string
        (`user` | `assistant` | `system` | `tool`), and a `parts` array of part
        objects (text, tool-call, tool-result, image, etc.).
      properties:
        id:
          type: string
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - tool
        parts:
          type: array
          items:
            type: object
      required:
        - id
        - role
        - parts
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message.
        message:
          type: string
          description: Human-readable error message (alternate key used on some endpoints).
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Organisation API key. Format: `sk_<secret>/<keyname>` — the secret
        portion, a literal slash, and the human-readable key name. The header
        `exulu-api-key` is accepted as an alias. A `Bearer ` prefix is tolerated
        and stripped. Keys with an agent scope are only valid for the scoped
        agent instance.
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        NextAuth session JWT (HS256, signed with `NEXTAUTH_SECRET`). This is the
        token the IMP frontend uses automatically.

````