Skip to main content

Projects

Projects let you scope memories, decisions, and patterns to specific codebases or initiatives. Each project has a unique slug used as a human-readable identifier throughout the API.

Register Project

POST /v1/projects

Request Body

FieldTypeRequiredDescription
namestringYesHuman-readable project name (1-255 characters)
slugstringYesURL-safe identifier, lowercase alphanumeric + hyphens (1-100 characters, e.g. my-api)
descriptionstringNoProject description (max 5,000 characters)
stackobjectNoTechnical stack metadata (max 10KB). Example: {"languages": ["python"], "frameworks": ["fastapi"]}
repo_urlstringNoRepository URL (max 500 characters)
metadataobjectNoCustom metadata (max 10KB)

Response 201 Created

{
"id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"slug": "my-api",
"name": "My API Service",
"description": "Production REST API for memory management",
"stack": {
"languages": ["python"],
"frameworks": ["fastapi"],
"databases": ["postgresql"]
},
"repo_url": "https://github.com/org/my-api",
"metadata": {},
"memory_count": 0,
"created_at": "2026-03-17T10:00:00Z",
"updated_at": "2026-03-17T10:00:00Z"
}

curl

curl -X POST https://api.memoryrelay.net/v1/projects \
-H "Authorization: Bearer $MEMORYRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "my-api",
"name": "My API Service",
"description": "Production REST API for memory management",
"stack": {
"languages": ["python"],
"frameworks": ["fastapi"],
"databases": ["postgresql"]
},
"repo_url": "https://github.com/org/my-api"
}'

Python SDK

from memoryrelay import MemoryRelay

client = MemoryRelay(api_key="mem_prod_...")

project = client.projects.create(
slug="my-api",
name="My API Service",
description="Production REST API for memory management",
stack={"languages": ["python"], "frameworks": ["fastapi"]},
repo_url="https://github.com/org/my-api",
)
print(project.id)

List Projects

GET /v1/projects

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Results per page (1-100)
offsetinteger0Number of results to skip

Response

{
"data": [
{
"id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"slug": "my-api",
"name": "My API Service",
"description": "Production REST API for memory management",
"stack": {
"languages": ["python"],
"frameworks": ["fastapi"]
},
"repo_url": "https://github.com/org/my-api",
"metadata": {},
"memory_count": 42,
"created_at": "2026-03-17T10:00:00Z",
"updated_at": "2026-03-17T10:00:00Z"
}
],
"next_cursor": null,
"has_more": false,
"total_count": 1
}

curl

curl "https://api.memoryrelay.net/v1/projects?limit=20" \
-H "Authorization: Bearer $MEMORYRELAY_API_KEY"

Python SDK

projects = client.projects.list()
for p in projects.data:
print(f"{p.slug}: {p.name} ({p.memory_count} memories)")

Get Project

GET /v1/projects/{id}

Path Parameters

ParameterTypeDescription
idUUIDProject ID

Response

Returns a single project object.

curl

curl https://api.memoryrelay.net/v1/projects/c1d2e3f4-a5b6-7890-cdef-123456789012 \
-H "Authorization: Bearer $MEMORYRELAY_API_KEY"

Python SDK

project = client.projects.get("c1d2e3f4-a5b6-7890-cdef-123456789012")
print(f"{project.name}: {project.description}")

Update Project

PATCH /v1/projects/{id}

Path Parameters

ParameterTypeDescription
idUUIDProject ID

Request Body

FieldTypeRequiredDescription
namestringNoUpdated name (max 255 characters)
descriptionstringNoUpdated description (max 5,000 characters)
stackobjectNoUpdated tech stack metadata
repo_urlstringNoUpdated repository URL
metadataobjectNoUpdated metadata

Response

Returns the updated project object.

curl

curl -X PATCH https://api.memoryrelay.net/v1/projects/c1d2e3f4-a5b6-7890-cdef-123456789012 \
-H "Authorization: Bearer $MEMORYRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stack": {
"languages": ["python"],
"frameworks": ["fastapi"],
"databases": ["postgresql"],
"infrastructure": ["docker", "nginx"]
}
}'

Python SDK

updated = client.projects.update(
"c1d2e3f4-a5b6-7890-cdef-123456789012",
stack={"languages": ["python"], "frameworks": ["fastapi"], "databases": ["postgresql"]},
)

Delete Project

DELETE /v1/projects/{id}

Soft-delete a project. Memories scoped to this project are preserved but the project is excluded from listings.

Path Parameters

ParameterTypeDescription
idUUIDProject ID

Response

Returns 204 No Content on success.

curl

curl -X DELETE https://api.memoryrelay.net/v1/projects/c1d2e3f4-a5b6-7890-cdef-123456789012 \
-H "Authorization: Bearer $MEMORYRELAY_API_KEY"

Python SDK

client.projects.delete("c1d2e3f4-a5b6-7890-cdef-123456789012")

Get Project Context

GET /v1/projects/{slug}/context

Retrieve aggregated context for a project, including recent memories, active decisions, and adopted patterns. This is the primary endpoint for building a project-aware prompt for your AI agent.

Path Parameters

ParameterTypeDescription
slugstringProject slug (e.g. my-api)

Response

{
"project": {
"id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"slug": "my-api",
"name": "My API Service",
"stack": {
"languages": ["python"],
"frameworks": ["fastapi"]
}
},
"memories": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"content": "API uses FastAPI with async SQLAlchemy 2.0",
"memory_type": "fact",
"importance": 0.8,
"created_at": 1710672000
}
],
"decisions": [
{
"id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
"title": "Use PostgreSQL instead of MongoDB",
"status": "active"
}
],
"patterns": [
{
"id": "b1c2d3e4-f5a6-7890-bcde-f12345678901",
"title": "Zod validation at API boundaries",
"category": "validation"
}
]
}

curl

curl https://api.memoryrelay.net/v1/projects/my-api/context \
-H "Authorization: Bearer $MEMORYRELAY_API_KEY"

Python SDK

context = client.projects.context("my-api")
print(f"Project: {context.project.name}")
print(f" {len(context.memories)} memories")
print(f" {len(context.decisions)} active decisions")
print(f" {len(context.patterns)} adopted patterns")
Agent Bootstrapping

Call GET /v1/projects/{slug}/context at the start of every agent session to load the project's accumulated knowledge. This gives your agent immediate access to past decisions, established patterns, and relevant memories without having to search for them individually.