Skip to content
Select themeSelect language

#1306 slice 4 — the persisted profile↔memory hub links of the workspace. Every returned link carries its `agent_profile_id`, so the workspace-wide view still shows WHICH profile owns each row.

GET
/api/memories/profile-links
curl --request GET \
--url https://example.com/api/memories/profile-links
profile
string format: uuid

Optional profile id; when omitted the workspace-wide hub is returned.

The profile↔memory hub links of the workspace (every profile, or one when profile is set)

Media typeapplication/json
Array<object>

One profile link as the API returns it: the memory/skill arm, the measured weight, and the profile that owns the link (the attribution axis). memory_id is set for the memory / harness_memory arms; the capability pair for the skill arm. agent_profile_id is what makes two profiles linking the SAME memory distinguishable in the workspace-wide response.

object
agent_profile_id
required
string format: uuid
capability_kind
string | null
capability_name
string | null
last_used_at
string | null format: date-time
memory_id
string | null format: uuid
target_kind
required

The typed lens for the profile_memory_links.target_kind column. The column stays raw String; this enum is how the service layer names the three arms without scattering the magic strings ("memory" / "harness_memory" / "skill"). The serde/utoipa derives expose the SAME three tokens on the API contract, so the FE zod type is the closed set rather than a bare string.

string
Allowed values: memory harness_memory skill
use_count
required
integer format: int64
Example
[
{
"target_kind": "memory"
}
]

Structured client error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Permission denied

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}