Buildd Memory
API Reference

Memories

Create, read, update, delete, and search memories

Memories API

All endpoints require authentication. See Authentication.

Get Context

Load all memories formatted as markdown for agent injection.

GET /api/memories/context

Query Parameters

ParameterTypeDescription
projectstringFilter by project name

Response

{
  "markdown": "# Team Memories\n\n## Gotchas\n- ...",
  "count": 12
}

The markdown field contains pre-formatted content ready for injection into agent context.


Search Memories

Search memories with filters. Returns compact results (index only, no full content).

GET /api/memories/search

Query Parameters

ParameterTypeDescription
querystringText search query
typestringFilter by memory type
projectstringFilter by project
filesstringFilter by associated files (comma-separated)
limitnumberMax results (default: 20)
offsetnumberPagination offset

Response

{
  "results": [
    {
      "id": "mem_abc123",
      "title": "Neon doesn't support interactive transactions",
      "type": "gotcha",
      "project": "buildd",
      "tags": ["database", "neon"],
      "files": ["packages/core/db/schema.ts"]
    }
  ],
  "total": 1
}

Batch Get

Fetch full content for multiple memories by ID.

GET /api/memories/batch

Query Parameters

ParameterTypeDescription
idsstringComma-separated memory IDs (max 20)

Response

{
  "memories": [
    {
      "id": "mem_abc123",
      "type": "gotcha",
      "title": "Neon doesn't support interactive transactions",
      "content": "Use atomic UPDATE...WHERE with .returning() instead.",
      "project": "buildd",
      "tags": ["database"],
      "files": [],
      "source": "mcp-agent",
      "createdAt": "2025-01-15T00:00:00.000Z",
      "updatedAt": "2025-01-15T00:00:00.000Z"
    }
  ]
}

Create Memory

POST /api/memories

Request Body

{
  "type": "gotcha",
  "title": "API rate limits are per-key",
  "content": "Rate limiting is applied per API key, not per IP address.",
  "project": "buildd",
  "tags": ["api", "rate-limiting"],
  "files": ["src/middleware.ts"],
  "source": "mcp-agent"
}
FieldTypeRequiredDescription
typestringYesOne of: gotcha, architecture, pattern, decision, discovery, summary
titlestringYesShort descriptive title
contentstringYesFull memory content (markdown supported)
projectstringNoProject name for scoping
tagsstring[]NoCategorization tags
filesstring[]NoAssociated file paths
sourcestringNoOrigin identifier (e.g., mcp-agent, manual)

Response

{
  "memory": {
    "id": "mem_abc123",
    "title": "API rate limits are per-key"
  }
}

Get Memory

GET /api/memories/:id

Response

{
  "memory": {
    "id": "mem_abc123",
    "type": "gotcha",
    "title": "API rate limits are per-key",
    "content": "Rate limiting is applied per API key, not per IP address.",
    "project": "buildd",
    "tags": ["api", "rate-limiting"],
    "files": ["src/middleware.ts"],
    "source": "mcp-agent",
    "createdAt": "2025-01-15T00:00:00.000Z",
    "updatedAt": "2025-01-15T00:00:00.000Z"
  }
}

Update Memory

PATCH /api/memories/:id

Request Body

Include only the fields you want to update:

{
  "title": "Updated title",
  "content": "Updated content",
  "tags": ["updated-tag"]
}

All fields from the create endpoint are supported except type.

Response

{
  "memory": {
    "id": "mem_abc123",
    "title": "Updated title"
  }
}

Delete Memory

DELETE /api/memories/:id

Response

{
  "deleted": true
}

On this page