> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Project Memory Settings

> Set or clear the instruction that decides what a project's memory records

```
PATCH /openapi/memorylake/api/v3/workspaces/{workspaceId}/projects/{projectId}/settings
```

Partially updates a project's memory settings. Fields you leave out stay unchanged.

A new `fact_instruction` replaces the current one whole; it is not appended to. It takes effect the next time facts are extracted into the project. Facts already recorded stay as they are.

<Note>
  **Permission required:** `project:modify`
</Note>

### Path Parameters

<ParamField path="workspaceId" type="string" required>
  Workspace identifier
</ParamField>

<ParamField path="projectId" type="string" required>
  Project identifier
</ParamField>

### Request Body

<ParamField body="fact_instruction" type="string">
  What this memory is about and what it is not, in Markdown, at most 2,000 characters. Send an empty string to clear it and put the built-in default back in effect. [Draft Project Fact Instruction](/features/memorylake/api-reference/memory-settings/draft-project-fact-instruction) can write one for you.
</ParamField>

<RequestExample>
  ```bash Set the instruction theme={null}
  curl -X PATCH 'https://app.memorylake.ai/openapi/memorylake/api/v3/workspaces/ws-8001856949ad4f6a5b6226f415ffa877/projects/proj-b93e8d95a8705bcc4ec42a65ba4cc7f8/settings' \
    -H 'Authorization: Bearer sk_xxxxxx' \
    -H 'Content-Type: application/json' \
    -d '{
      "fact_instruction": "Records how the docs and the CLI are used.\n\n## Include\n- Commands people run and the options they pass\n- Docs pages people read and the questions they bring\n\n## Exclude\n- Anyone'\''s personal preferences"
    }'
  ```

  ```bash Clear the instruction theme={null}
  curl -X PATCH 'https://app.memorylake.ai/openapi/memorylake/api/v3/workspaces/ws-8001856949ad4f6a5b6226f415ffa877/projects/proj-b93e8d95a8705bcc4ec42a65ba4cc7f8/settings' \
    -H 'Authorization: Bearer sk_xxxxxx' \
    -H 'Content-Type: application/json' \
    -d '{
      "fact_instruction": ""
    }'
  ```
</RequestExample>

### Response

Returns the memory settings after the update.

<ResponseField name="data" type="object">
  <Expandable title="Memory settings object">
    <ResponseField name="fact_instruction" type="string">What this memory is about and what it is not, in Markdown. An empty string means none has been set and the built-in default is in effect.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "data": {
      "fact_instruction": "Records how the docs and the CLI are used.\n\n## Include\n- Commands people run and the options they pass\n- Docs pages people read and the questions they bring\n\n## Exclude\n- Anyone's personal preferences"
    }
  }
  ```

  ```json Too long (400) theme={null}
  {
    "success": false,
    "message": "fact_instruction Fact instruction must not exceed 2000 characters",
    "error_code": "INVALID_ARGUMENT"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.