***

title: search
slug: /reference/typescript/agents/configuration/config-loader/search
description: Search for a config file in standard locations and load it if found.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Static method that searches for a config file in standard locations: the
current working directory, `./config/`, and `~/.signalwire/`. Returns a
loaded `ConfigLoader` if found, or `null` if the file does not exist in
any search path.

## **Parameters**

<ParamField path="filename" type="string" required={true} toc={true}>
  The config file name to search for (e.g., `"config.json"`).
</ParamField>

## **Returns**

`ConfigLoader | null` -- A loaded ConfigLoader instance, or `null` if not found.

## **Example**

```typescript {3}
import { ConfigLoader } from '@signalwire/sdk';

const config = ConfigLoader.search('agent-config.json');
if (config) {
  console.log('Config found at:', config.getFilePath());
  console.log('Port:', config.get<number>('server.port', 3000));
} else {
  console.log('No config file found');
}
```