# Recall memory

> Search what the project and its workspace remember, by words in any order, or list it all without a query.

<div class="g1t-endpoint"><span class="g1t-method" data-method="get">GET</span><code>/repos/{owner}/{name}/memory</code></div>

Pinned memories come first, then the most recently used. Members of the workspace and g1t's agents only.

Anyone who can read the repository gets its project memory; `workspace` is filled only for members of the workspace, and is empty for anyone else. Each memory returned is marked used, which keeps it near the front of what agents are given.

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`memory`](/reference/mcp/#memory) with `action` `recall`, and the same inputs
- **Scope:** An access token needs [`memory:read`](/guides/authentication/#scopes).

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `owner` | string | Yes | The workspace that owns the repository. |
| `name` | string | Yes | The repository's name. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | No | Words to look for. Leave out for everything. |
| `limit` | integer | No | At most 100 of each level; 20 if not given. |

## Example request

```sh
curl "https://api.g1t.sh/repos/flagon-io/hello/memory?q=pnpm" \
  -H "Authorization: Bearer $G1T_TOKEN"
```

## Example response

A successful request answers `200` with:

```json
{
  "project": [],
  "workspace": [
    {
      "id": "mem_01m43t0a1s2d3f4g5h6j7k8l9z",
      "scope": "workspace",
      "workspace": "flagon-io",
      "repo": null,
      "text": "We use pnpm everywhere, never npm or yarn.",
      "kind": "convention",
      "source": {
        "kind": "person",
        "run_id": null,
        "repo": null,
        "number": null
      },
      "created_by": "syntaqx",
      "pinned": true,
      "created_at": "2026-10-01T18:40:12.000Z",
      "updated_at": "2026-10-01T18:40:12.000Z",
      "last_used_at": null
    }
  ]
}
```

## Errors

A failed request answers with one of these statuses and a body like `{"error": {"code": "not_found", "message": "Repository not found."}}`. See [errors](/reference/api/#errors).

| Status | Code | When |
| --- | --- | --- |
| 401 | `unauthenticated` | A token is required, or the one sent is not valid. |
| 403 | `forbidden` | The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | `not_found` | It does not exist, or you cannot see it. |
| 422 | `invalid` | The input is not valid. `message` says which field and why. |
