> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Gentleman-Programming/engram/llms.txt
> Use this file to discover all available pages before exploring further.

# mem_save_prompt

> Save user prompts to persistent memory

## Overview

Record what the user asked — their intent, questions, and requests — so future sessions have context about the user's goals and communication patterns.

<Note>
  This tool is part of the **agent** profile and uses deferred loading to optimize performance.
</Note>

## Parameters

<ParamField path="content" type="string" required>
  The user's prompt text

  This should be the raw user input — what they asked for, described, or requested. Future sessions can search prompts to understand user intent and preferences.
</ParamField>

<ParamField path="session_id" type="string">
  Session ID to associate with the prompt

  **Default:** `manual-save-{project}` or `manual-save` if no project

  Links the prompt to a specific coding session for chronological context.
</ParamField>

<ParamField path="project" type="string">
  Project name

  Associates the prompt with a specific project for filtering and context.
</ParamField>

## Response

<ResponseField name="result" type="string">
  Confirmation message with truncated prompt preview (first 80 characters)
</ResponseField>

**Example:**

```
Prompt saved: "Add JWT authentication to the API and update the login endpoi..."
```

## Usage Examples

### Save User Request

```json theme={null}
{
  "content": "Add JWT authentication to the API and update the login endpoint to return tokens",
  "project": "my-api",
  "session_id": "session-2026-03-03-1430"
}
```

**Response:**

```
Prompt saved: "Add JWT authentication to the API and update the login endpoint to return t..."
```

### Save Without Session

```json theme={null}
{
  "content": "How does the search ranking algorithm work?",
  "project": "engram"
}
```

**Response:**

```
Prompt saved: "How does the search ranking algorithm work?"
```

## When to Use

* **At session start**: Capture the initial user request to provide context
* **On major requests**: When the user asks for something significant
* **For questions**: When users ask about how things work
* **Goal tracking**: Record what the user wanted to accomplish

## What Gets Stored

Prompts are stored separately from observations and include:

* Full prompt content (unlimited length)
* Associated session ID
* Project name
* Timestamp

They can be searched via the HTTP API `/api/prompts` endpoint.

## Privacy Considerations

<Warning>
  Prompts capture raw user input. Be mindful of:

  * Sensitive information in user messages
  * API keys or credentials mentioned in prompts
  * Personal data in requests

  Prompts follow the same project/personal scope as observations.
</Warning>

## Why Save Prompts?

Future sessions benefit from knowing:

* **User intent**: What were they trying to accomplish?
* **Communication style**: How do they describe problems?
* **Context evolution**: How did requirements change over time?
* **Repeated questions**: What concepts need better documentation?

## Related Tools

* [`mem_save`](/mcp/mem-save) - Save observations (outcomes and learnings)
* [`mem_session_start`](/mcp/mem-session-start) - Register session start
* [`mem_session_summary`](/mcp/mem-session-summary) - Save session summaries
