# ensureAgentDir

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

```ts
function ensureAgentDir(home): Promise<string>;
```

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

Creates `~/.uncage` (0700), tightening an existing, group/world-accessible one. On Windows a newly
created folder gets a user-only ACL (icacls); an existing one is left as it is.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `home` | `string` |

## Returns

`Promise`\<`string`\>
