## Get AI Agents Nodes

Fetch the complete documentation index at: [/llms.txt](https://docs.cognigy.com/llms.txt)
Use this file to discover all available pages before exploring further.

### Request

**GET** `/v2.0/flows/{flowId}/chart/nodes/aiagents`

**Try it**

### Example cURL Request

```bash
curl --request GET \
  --url https://api-trial.cognigy.ai/new/v2.0/flows/{flowId}/chart/nodes/aiagents \
  --header 'X-API-Key: <api-key>'
```

### Example Python Request

```python
import requests

url = "https://api-trial.cognigy.ai/new/v2.0/flows/{flowId}/chart/nodes/aiagents"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

### Example JavaScript Request

```javascript
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api-trial.cognigy.ai/new/v2.0/flows/{flowId}/chart/nodes/aiagents', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Expected Responses

**200 OK** - Returns AI Agents used in the Flow:

```json
{
  "items": [
    {
      "_id": "<string>",
      "type": "if",
      "referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "extension": "@cognigy/basic-nodes",
      "label": "A new Node",
      "analyticsLabel": "Step name",
      "comment": "this is a very important node",
      "commentColor": "#ff8a80",
      "isCollapsed": false,
      "isEntryPoint": false,
      "isDisabled": false,
      "name": "Cognigy AI Agent",
      "image": "https://cognigy.com/ai-agent.png",
      "imageOptimizedFormat": true,
      "knowledgeReferenceId": "c7b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
      "description": "I am a virtual assistant that can help you with your questions.",
      "speakingStyle": {
        "completeness": "concise",
        "formality": "formal"
      },
      "voiceConfigs": {
        "ttsVoice": "Xb7hH8MSUJpSbSDYk0k2",
        "ttsLanguage": "zh",
        "ttsVendor": "Elevenlabs",
        "ttsModel": "eleven_multilingual_v2",
        "ttsLabel": "microsoft US",
        "ttsDisableCache": false
      },
      "enableVoiceConfigs": false,
      "enableAutoLanguageDetection": true,
      "safetySettings": {
        "avoidHarmfulContent": true,
        "avoidUngroundedContent": true,
        "avoidCopyrightInfringements": true,
        "preventJailbreakAndManipulation": true
      },
      "contactProfilesOption": "selectedProfileFields",
      "contactProfilesSelected": [
        "name",
        "email"
      ],
      "instructions": "I can help you with your questions, provide information and much more.",
      "createdAt": 1694518620,
      "lastChanged": 1694518620,
      "createdBy": "<string>",
      "lastChangedBy": "<string>",
      "nodeId": "<string>"
    }
  ],
  "total": 2
}
```

### Error Responses

**400 Bad Request** - Validation failed. Missing payload.

```json
{
  "type": "Bad Request",
  "title": "Bad Request Error",
  "status": 400,
  "detail": "Validation failed. Missing payload.",
  "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
  "code": 1000,
  "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
  "details": {}
}
```

**401 Unauthorized** - Invalid API Key specified.

```json
{
  "type": "Unauthorized",
  "title": "Unauthorized Error",
  "status": 401,
  "detail": "<string>",
  "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
  "code": 401,
  "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
  "details": {}
}
```

---

### Authorizations

- `X-API-Key` (header, required) - Supply the API Key in the HTTP header.
