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

# Assistant Get API

> Details eines vorhandenen Assistenten abrufen

Ruft die vollständige Konfiguration und Details eines vorhandenen Assistenten in deinem Workspace ab.

<Info>
  Erfordert einen API-Schlüssel mit dem `AGENT_API` Scope und Zugriff auf den Assistenten, den du abrufen möchtest.
</Info>

<Warning>
  **Die Assistants API wird am 16. August eingestellt.**

  Für neue Systeme empfehlen wir die [Agents API](/de/developer/agents-api/agent-get). Die Agents API bietet native Vercel AI SDK Kompatibilität und entfernt benutzerdefinierte Transformationen.

  Siehe den [Migrations-Guide](/de/developer/assistants-api/assistant-to-agent-migration) für Details zu den Unterschieden.
</Warning>

## Query-Parameter

| Parameter     | Typ    | Erforderlich | Beschreibung                      |
| ------------- | ------ | ------------ | --------------------------------- |
| `assistantId` | string | Ja           | UUID des abzurufenden Assistenten |

## Beispiele

### Einfacher Abruf

```javascript theme={null}
const axios = require("axios");

async function getAssistant() {
  const response = await axios.get(
    "https://api.langdock.com/assistant/v1/get",
    {
      params: {
        assistantId: "550e8400-e29b-41d4-a716-446655440000"
      },
      headers: {
        Authorization: "Bearer YOUR_API_KEY"
      }
    }
  );

  console.log("Assistenten-Details:", response.data.assistant);
}
```

## Validierungsregeln

Die API wendet folgende Validierungsregeln an:

* **Assistenten-Zugriff** - Dein API-Schlüssel muss Zugriff auf den Assistenten haben
* **Workspace-Übereinstimmung** - Der Assistent muss zum selben Workspace wie dein API-Schlüssel gehören

## Antwortformat

### Erfolgreiche Antwort (200 OK)

```typescript theme={null}
{
  status: "success";
  assistant: {
    id: string;
    name: string;
    description: string;
    instruction: string;
    emojiIcon: string;
    model: string;
    temperature: number;
    conversationStarters: string[];
    inputType: "PROMPT" | "STRUCTURED";
    webSearchEnabled: boolean;
    imageGenerationEnabled: boolean;
    canvasEnabled: boolean;
    extendedThinking: boolean;
    actions: Array<{
      actionId: string;
      requiresConfirmation: boolean;
    }>;
    inputFields: Array<{
      slug: string;
      type: string;
      label: string;
      description: string;
      required: boolean;
      order: number;
      options: string[];
      fileTypes: string[] | null;
    }>;
    attachments: string[];
    createdAt: string;
    updatedAt: string;
  };
}
```

## Fehlerbehandlung

```typescript theme={null}
try {
  const response = await axios.get('https://api.langdock.com/assistant/v1/get', ...);
} catch (error) {
  if (error.response) {
    switch (error.response.status) {
      case 400:
        console.error('Ungültiges Assistenten-ID-Format');
        break;
      case 401:
        console.error('Ungültiger oder fehlender API-Schlüssel');
        break;
      case 403:
        console.error('Unzureichende Berechtigungen - kein Zugriff auf diesen Assistenten');
        break;
      case 404:
        console.error('Assistent nicht gefunden');
        break;
      case 500:
        console.error('Server-Fehler');
        break;
    }
  }
}
```

## Migration zur Agents API

Die neue Agents API bietet verbesserte Kompatibilität mit modernen AI SDKs. Der Get-Endpunkt hat ähnliche Funktionalität mit aktualisierten Parameternamen.

Siehe den entsprechenden Endpunkt in der Agents API:

* [Agent Get API](/de/developer/agents-api/agent-get) - Verwendet `agentId` statt `assistantId`

<Info>
  Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in unserem Guide zu [Best Practices für API-Schlüssel](/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices).
</Info>


## OpenAPI

````yaml GET /assistant/v1/get
openapi: 3.0.0
info:
  title: Langdock API
  version: 3.0.0
servers:
  - url: https://api.langdock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /assistant/v1/get:
    get:
      tags:
        - Assistant Build
      summary: '[Deprecated] Retrieves details of an existing assistant'
      description: >-
        This endpoint is deprecated. Please use /agent/v1/get for new
        integrations. Retrieves the complete configuration and details of an
        existing assistant.
      operationId: getAgent
      parameters:
        - name: assistantId
          in: query
          required: true
          description: UUID of the agent to retrieve
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Agent details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - agent
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  assistant:
                    $ref: '#/components/schemas/AssistantDetails'
        '400':
          description: Invalid assistant ID format
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '403':
          description: Insufficient permissions - no access to this agent
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      deprecated: true
components:
  schemas:
    AssistantDetails:
      type: object
      required:
        - id
        - name
        - emojiIcon
        - model
        - temperature
        - inputType
        - webSearchEnabled
        - imageGenerationEnabled
        - canvasEnabled
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the agent
        name:
          type: string
          description: Name of the agent
        description:
          type: string
          nullable: true
          description: Description of what the agent does
        instruction:
          type: string
          nullable: true
          description: System prompt/instructions for the agent
        emojiIcon:
          type: string
          nullable: true
          description: Emoji icon for the agent
        model:
          type: string
          description: Model ID to use (see Models for Agent API)
        temperature:
          type: number
          minimum: 0
          maximum: 1
          description: Temperature/creativity setting for response generation
        conversationStarters:
          type: array
          items:
            type: string
          description: Array of suggested prompts to help users get started
        inputType:
          type: string
          enum:
            - PROMPT
            - STRUCTURED
          description: Input type for the agent
        webSearchEnabled:
          type: boolean
          description: Whether web search capability is enabled
        imageGenerationEnabled:
          type: boolean
          description: Whether image generation capability is enabled
        canvasEnabled:
          type: boolean
          description: Whether canvas capability is enabled
        extendedThinking:
          type: boolean
          description: >-
            Whether extended thinking is enabled. Only supported on models that
            expose this capability; enabling it on an unsupported model returns
            a 400 error.
        actions:
          type: array
          items:
            type: object
            required:
              - actionId
              - requiresConfirmation
            properties:
              actionId:
                type: string
                format: uuid
                description: UUID of the action from an enabled integration
              requiresConfirmation:
                type: boolean
                description: Whether user confirmation is required before executing
          description: Array of action objects for custom integrations
        inputFields:
          type: array
          items:
            type: object
            required:
              - slug
              - type
              - label
              - required
              - order
            properties:
              slug:
                type: string
                description: Unique identifier for the field
              type:
                type: string
                enum:
                  - TEXT
                  - MULTI_LINE_TEXT
                  - NUMBER
                  - CHECKBOX
                  - FILE
                  - SELECT
                  - DATE
                description: Field type
              label:
                type: string
                description: Display label for the field
              description:
                type: string
                description: Help text for the field
              required:
                type: boolean
                description: Whether the field is required
              order:
                type: integer
                minimum: 0
                description: Display order (0-indexed)
              options:
                type: array
                items:
                  type: string
                description: Options for SELECT type fields
              fileTypes:
                type: array
                items:
                  type: string
                nullable: true
                description: Allowed file types for FILE type fields
          description: Array of form field definitions (for STRUCTURED input type)
        attachments:
          type: array
          items:
            type: string
            format: uuid
          description: Array of attachment UUIDs associated with the agent
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the agent was created
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the agent was last updated
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"

````