# updateAgentSites

<!-- https://uncage.vercel.app/docs/api/agent/functions/updateagentsites/ -->

```ts
function updateAgentSites(home, fn): Promise<object[]>;
```

Defined in: agent/src/config.ts:277

Re-reads the file, applies `fn` to its `sites`, and writes it back atomically, user-only (0600 / ACL),
under the agent.yaml lock. Comments, `localPolicy` and `runtimes` (hand-edited by the user) are preserved.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `home` | `string` |
| `fn` | (`sites`) => `object`[] |

## Returns

`Promise`\<`object`[]\>
