Remember something
Save something to memory that the next agent working here should know: how to build or test, a convention, a decision and why, a trap. scope project is for this codebase; scope workspace is for what holds across all of the workspace's projects, such as "we use pnpm everywhere" or where staging lives.
/repos/{owner}/{name}/memoryOne short fact per memory. Every g1t agent run is given memory at its start, pinned first. Never save a secret, key, token or password: text that looks like one is refused. Members of the workspace and g1t’s agents only.
Text that looks like a key, a token or a password is refused with invalid: memory is read by every agent in the workspace. Saving the same text again in the same scope returns the memory already kept.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
remember, with the same inputs
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
owner |
string | Yes | The workspace that owns the repository. |
name |
string | Yes | The repository’s name. |
Body parameters
Section titled “Body parameters”Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | What to remember, in one or two sentences. At most 1000 characters. |
scope |
string | No | project: about this codebase. workspace: true across the workspace’s projects. Defaults to project. One of project, workspace. |
kind |
string | No | Defaults to fact. One of fact, convention, decision, gotcha. |
from_number |
integer | No | For an agent: the pull request you are working on, recorded as where it was learned. |
Example request
Section titled “Example request”curl -X POST https://api.g1t.sh/repos/flagon-io/hello/memory \ -H "Authorization: Bearer $G1T_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "text": "The tests need TZ=UTC or the date tests fail.", "scope": "project", "kind": "gotcha", "from_number": 14 }'Example response
Section titled “Example response”A successful request answers 200 with:
{ "id": "mem_01m43v8q2w3e4r5t6y7u8i9o0p", "scope": "project", "workspace": "flagon-io", "repo": { "namespace": "flagon-io", "name": "hello" }, "text": "The tests need TZ=UTC or the date tests fail.", "kind": "gotcha", "source": { "kind": "run", "run_id": "arn_01m43v2c1p9k8d7e6f5a4b3c2d", "repo": { "namespace": "flagon-io", "name": "hello" }, "number": 14 }, "created_by": "g1t-agent", "pinned": false, "created_at": "2026-10-01T18:40:12.000Z", "updated_at": "2026-10-01T18:40:12.000Z", "last_used_at": null}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See 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. |
| 409 | conflict |
The request conflicts with the current state. |
| 422 | invalid |
The input is not valid. message says which field and why. |