> Full documentation index: [llms.txt](https://docs.qualitymax.io/llms.txt)

# Project memory

`get_project_memory` is the entry point for durable project memory. Its own description tells an agent exactly when to use it: *"Call this before generating or repairing tests for an existing project; then call `get_script` only for the most relevant verified script to keep context and cost low."*

## Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `project_id` | integer | Yes | Project whose memory should be recalled |
| `test_case_id` | integer | No | Filter to the most relevant verified runs for one case |
| `limit` | integer | No | Max verified scripts and MCP sessions returned (default 10, max 20) |
| `query` | string | No | Bounded task query used to recall relevant semantic learnings and agent episodes |
| `intent` | string | No | One of `generate`, `repair`, `diagnose`, `inspect` — only valid together with `query` |
| `downstream_reuse` | boolean | No | Client-reported outcome for a previously recalled memory, used only for aggregate telemetry |

## What comes back

The response has a stable core plus additive reuse fields — older callers keep working unchanged as the contract grows.

**Verified scripts** — each entry carries `script_id`, `framework`, `latest_passed_at`, `latest_execution_id`, and a computed `verification_status`: `current` if the script hasn't been edited since its last pass, or `stale_after_edit` if it has. An agent should re-run a `stale_after_edit` script before trusting it as verified.

**Recent MCP sessions** — prior negotiation sessions scoped to this project, with `client_name`, `origin`, `tool_call_count`, `failed_tool_call_count`, and the script IDs they touched.

**Verification provenance** — a plain-language sentence per verified script, for example *"Last verified by Claude Code via mcp_stdio on 2026-07-09."* When no matching session exists it says so explicitly rather than guessing.

**Project learnings** — free-form notes attached to the project, plus a gated `grounded_project_learnings` view that only keeps lines anchored to something a verified run actually observed. See [grounded learnings & evidence](/memory-grounding-grounded-learnings/) for how that gate works.

## Built-in guidance

The response embeds its own usage instructions rather than leaving an agent to infer them: `recall_guidance` says to reuse `project_learnings` first, call `get_script` for only the one matching script, and re-verify anything `stale_after_edit`. `memory_reuse_guidance` adds the same rule for the ranked-session and traversal paths — *"Do not rediscover locators that held across passing runs."*

## Recalling by query

Passing `query` (optionally with `intent`) additionally searches semantic learnings and past agent episodes — see [recall & retrieval](/memory-grounding-recall-intents/) for how that search works and what its confidence fields mean.
