> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.chatbridge.mx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.chatbridge.mx/_mcp/server.

# List available agents

GET https://connect.chatbridge.mx/v1/omia/agents

Retrieves the conversational agents enabled for the account of the authenticated API Key. The response is minimalistic: identifier, name, status and the list of variables the agent needs to hold the conversation. Every variable listed must be covered when launching a call, either by the request or by a default value configured in the agent.

Reference: https://docs.chatbridge.mx/omia/agents/list-agents

## Authentication

- `x-api-key` header (required) — Account authentication key.
- `Authorization` header (bearer token, required) — OAuth 2.0 access token issued by `POST /api/oauth/token` (client-credentials). Takes precedence over `x-api-key` when both are sent. See the Authentication section.

## Response

### 200

List of agents.

- `list of Agent`

## Types

### Agent

- `id` (string, optional) — Unique identifier of the agent. It is used in the `agent` field when launching a call.
- `name` (string, optional) — Descriptive name of the agent.
- `status` (boolean, optional) — Indicates whether the agent is enabled.
- `variables` (list of string, optional) — Variables the agent needs to hold the conversation. Every variable must be covered when launching a call, either by the request or by a default value configured in the agent.

## Examples

**Response**

```json
[
  {
    "id": "66a1f0c2e4b0a1b2c3d4e5f6",
    "name": "Collections agent",
    "status": true,
    "variables": [
      "nombre",
      "monto",
      "fecha_limite"
    ]
  }
]
```

**SDK Code**

```python Agents_listAgents_example
import requests

url = "https://connect.chatbridge.mx/v1/omia/agents"

headers = {"x-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript Agents_listAgents_example
const url = 'https://connect.chatbridge.mx/v1/omia/agents';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Agents_listAgents_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://connect.chatbridge.mx/v1/omia/agents"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Agents_listAgents_example
require 'uri'
require 'net/http'

url = URI("https://connect.chatbridge.mx/v1/omia/agents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Agents_listAgents_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://connect.chatbridge.mx/v1/omia/agents")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Agents_listAgents_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://connect.chatbridge.mx/v1/omia/agents', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Agents_listAgents_example
using RestSharp;

var client = new RestClient("https://connect.chatbridge.mx/v1/omia/agents");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Agents_listAgents_example
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.chatbridge.mx/v1/omia/agents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```