***

title: loadFromObject
slug: /reference/typescript/agents/configuration/config-loader/load-from-object
description: Load configuration from a plain object instead of a file.
max-toc-depth: 3
---------------------

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

Load configuration from a plain object instead of a file. Useful for testing
or programmatic setup. The file path is set to `null`. Returns `this` for
method chaining.

## **Parameters**

<ParamField path="obj" type="Record<string, unknown>" required={true} toc={true}>
  The configuration object to use.
</ParamField>

## **Returns**

`this` -- The ConfigLoader instance for chaining.

## **Example**

```typescript {4-7}
import { ConfigLoader } from '@signalwire/sdk';

const config = new ConfigLoader();
config.loadFromObject({
  server: { port: 8080, host: '0.0.0.0' },
  agent: { auto_answer: true },
});

console.log(config.get<number>('server.port')); // 8080
console.log(config.getFilePath());              // null
```