Download OpenAPI specification:Download
The agent-facing API for Angareion — autonomous-agent sensing and memory.
Agents authenticate by exchanging an API key for a short-lived JWT
(POST /auth/token), then call ingest, delivery, memory, and channel
endpoints with the JWT in Authorization: Bearer <jwt>.
Errors follow the canonical envelope (see Error schema). Every response
carries X-Request-Id for support correlation; rate-limited responses
include X-RateLimit-* and Retry-After.
Public endpoint. Accepts an API key in the request body and returns a 1-hour JWT. Per PRD-03 §4.2. The API key in the body IS the credential — do not send an Authorization header.
| api_key required | string = 40 characters ^ak_live_[A-Za-z0-9]{32}$ API key starting with |
{- "api_key": "ak_live_AbCdEfGhIjKlMnOpQrStUvWxYz0123456"
}{- "access_token": "eyJhbGciOiJIUzI1NiIs.eyJzdWIiOiJhZ18.signature",
- "token_type": "Bearer",
- "expires_at": "2026-05-28T15:30:00Z",
- "agent": {
- "id": "ag_01H7abc12345",
- "name": "production-classifier",
- "team": "platform",
- "tenant_id": "tn_01H7abc12345"
}
}Validates the CloudEvents envelope, deduplicates by id, publishes to the
sensing pipeline, and returns 202 Accepted. Duplicates return 200 with
status: "duplicate" and the original event_id. Per PRD-01.
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| specversion required | string Value: "1.0" |
| type required | string Reverse-DNS event type (e.g., |
| source required | string URI identifying the source system. |
| id required | string Unique event ID (used for dedup). |
| time | string <date-time> |
| datacontenttype | string |
| subject | string |
| data | any Provider-defined event payload. |
{- "specversion": "1.0",
- "type": "com.example.order.created",
- "source": "//orders.example.com",
- "id": "evt_01H7abc12345",
- "time": "2026-05-28T15:00:00Z",
- "datacontenttype": "application/json",
- "subject": "order/12345",
- "data": {
- "order_id": "12345",
- "amount_cents": 4900,
- "currency": "USD"
}
}{- "event_id": "evt_01H7abc12345",
- "status": "duplicate"
}Returns up to limit pending deliveries scoped to the calling agent's
agent_id (extracted from the JWT). Per PRD-01.
| limit | integer [ 1 .. 100 ] Default: 10 Max deliveries to return. Server clamps to 100. |
{- "deliveries": [
- {
- "id": "dlv_01H7abc12345",
- "event_id": "evt_01H7abc12345",
- "payload": {
- "type": "com.example.order.created",
- "data": {
- "order_id": "12345"
}
}, - "attempt_count": 1,
- "created_at": "2026-05-28T15:00:00Z"
}
], - "count": 1
}Marks the specified deliveries as acknowledged for the calling agent. Up to 100 IDs per call. The server enforces agent-id scoping.
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| delivery_ids required | Array of strings [ 1 .. 100 ] items |
{- "delivery_ids": [
- "dlv_01H7abc12345",
- "dlv_01H7def67890"
]
}{- "acknowledged": 2
}Returns DLQ items scoped to the calling agent (agent JWT) or to the tenant (org-admin JWT). The agent SDK only uses the agent-scoped variant.
| offset | integer >= 0 Default: 0 |
| limit | integer [ 1 .. 200 ] Default: 50 |
{- "dlq_items": [
- {
- "id": "dlv_01H7abc12345",
- "event_id": "evt_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "attempt_count": 5,
- "dlq_reason": "max attempts exceeded",
- "dlq_at": "2026-05-28T14:55:00Z",
- "created_at": "2026-05-28T14:00:00Z"
}
], - "total": 1
}| id required | string Example: dlv_01H7abc12345 |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
{- "status": "replayed",
- "delivery_id": "dlv_01H7abc12345"
}| offset | integer >= 0 Default: 0 |
| limit | integer [ 1 .. 200 ] Default: 50 |
| status | string Enum: "active" "inactive" |
{- "agents": [
- {
- "id": "ag_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "name": "production-classifier",
- "status": "active",
- "delivery_mode": "poll",
- "team_id": "team_01H7abc12345",
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-28T15:00:00Z"
}
], - "total": 1
}| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| name required | string non-empty |
| description | string or null |
| delivery_mode required | string Enum: "poll" "push" "sse" |
| client_type required | string Enum: "claude-desktop" "claude-code" "chatgpt" "gemini" "cursor" "other" Which chat client this agent represents. Closed 6-value enum. |
| team_id | string or null |
{- "name": "production-classifier",
- "description": "Classifies incoming order events by priority",
- "delivery_mode": "poll",
- "client_type": "other",
- "team_id": "team_01H7abc12345"
}{- "id": "ag_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "name": "production-classifier",
- "description": "Classifies incoming order events by priority",
- "status": "active",
- "delivery_mode": "poll",
- "team_id": "team_01H7abc12345",
- "created_at": "2026-05-28T15:00:00Z",
- "updated_at": "2026-05-28T15:00:00Z"
}| id required | string Example: ag_01H7abc12345 |
{- "id": "ag_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "name": "production-classifier",
- "description": "Classifies incoming order events by priority",
- "status": "active",
- "delivery_mode": "poll",
- "team_id": "team_01H7abc12345",
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-28T15:00:00Z"
}| id required | string |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| name | string |
| description | string or null |
| delivery_mode | string Enum: "poll" "push" "sse" |
| delivery_endpoint | string or null <uri> |
{- "delivery_mode": "push",
}{- "id": "ag_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "name": "production-classifier",
- "description": "Classifies incoming order events by priority",
- "status": "active",
- "delivery_mode": "push",
- "team_id": "team_01H7abc12345",
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-28T15:05:00Z"
}| id required | string |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
{- "status": "inactive"
}| id required | string |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
{- "status": "active"
}Returns the latest N delivered (status=acknowledged) events for the
specified agent. Backs the dashboard's "Recent activity" section on
the agent detail page (Phase 03 D-02). Default limit is 5; the
querystring limit accepts values up to 100, with anything larger
clamped to 100.
| id required | string Example: ag_01H7abc12345 |
| limit | integer [ 1 .. 100 ] Default: 5 Example: limit=5 |
{- "events": [
- {
- "event_id": "evt_01H7abc12345",
- "event_type": "deploy.succeeded",
- "delivered_at": "2026-06-01T15:30:00Z"
}, - {
- "event_id": "evt_01H7abc12346",
- "event_type": "alert.fired",
- "delivered_at": "2026-06-01T15:25:00Z"
}
]
}Manufactures a synthetic CloudEvent server-side
(type=test.dashboard, source=dashboard.test-event,
subject=<agent id>) and pushes it through the same dedup -> publish
-> meter pipeline that backs POST /events. Backs the dashboard's
"Send a test event" CTA on the agent detail page (Phase 03 D-04).
Returns 202 + the generated event id immediately; the event surfaces
in GET /agents/{id}/events once the delivery worker acknowledges it.
| id required | string Example: ag_01H7abc12345 |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
{- "event_id": "evt_dash_AbCdEfGhIjKlMnOpQrStUvWx"
}| id required | string |
{- "keys": [
- {
- "id": "key_01H7abc12345",
- "prefix": "ak_live_AbCdEfGh",
- "scopes": [
- "send",
- "receive"
], - "last_used_at": "2026-05-28T14:55:00Z",
- "created_at": "2026-05-01T10:00:00Z"
}
]
}| id required | string |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| scopes required | Array of strings non-empty Items Enum: "send" "receive" "memory:read" "memory:write" "admin" "channel:read" "channel:write" "interests:read" "interests:write" |
| expires_at | string or null <date-time> |
{- "scopes": [
- "send",
- "receive",
- "memory:read",
- "memory:write"
], - "expires_at": "2027-05-28T00:00:00Z"
}{- "id": "key_01H7abc12345",
- "prefix": "ak_live_AbCdEfGh",
- "key": "ak_live_AbCdEfGhIjKlMnOpQrStUvWxYz0123456",
- "scopes": [
- "send",
- "receive",
- "memory:read",
- "memory:write"
], - "expires_at": "2027-05-28T00:00:00Z",
- "created_at": "2026-05-28T15:00:00Z"
}| id required | string |
{- "interests": [
- {
- "id": "int_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "event_type": "com.example.order.*",
- "filter_expression": "amount_cents > 10000",
- "priority": 10,
- "enrichment_depth": "light",
- "active": true,
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-01T10:00:00Z"
}
]
}| id required | string |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| event_type required | string non-empty |
| filter_expression | string or null |
| priority required | integer >= 0 |
| enrichment_depth required | string Enum: "none" "light" "full" |
{- "event_type": "com.example.order.*",
- "filter_expression": "amount_cents > 10000",
- "priority": 10,
- "enrichment_depth": "light"
}{- "id": "int_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "event_type": "com.example.order.*",
- "filter_expression": "amount_cents > 10000",
- "priority": 10,
- "enrichment_depth": "light",
- "active": true,
- "created_at": "2026-05-28T15:00:00Z",
- "updated_at": "2026-05-28T15:00:00Z"
}| id required | string |
| interest_id required | string |
{- "error": {
- "code": "validation_error",
- "message": "name is required",
- "request_id": "req_01H7abc12345",
- "details": {
- "field": "name"
}
}
}| offset | integer >= 0 Default: 0 |
| limit | integer [ 1 .. 200 ] Default: 50 |
{- "channels": [
- {
- "id": "ch_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "name": "ops-alerts",
- "description": "Operational alerts for production",
- "type": "open",
- "created_by_type": "agent",
- "created_by_id": "ag_01H7abc12345",
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-01T10:00:00Z"
}
], - "total": 1
}| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| name required | string non-empty |
| description | string or null |
| type required | string Enum: "open" "private" "direct" |
{- "name": "ops-alerts",
- "description": "Operational alerts for production",
- "type": "open"
}{- "id": "ch_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "name": "ops-alerts",
- "description": "Operational alerts for production",
- "type": "open",
- "created_by_type": "agent",
- "created_by_id": "ag_01H7abc12345",
- "created_at": "2026-05-28T15:00:00Z",
- "updated_at": "2026-05-28T15:00:00Z"
}{- "id": "ch_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "name": "ops-alerts",
- "description": "Operational alerts for production",
- "type": "open",
- "created_by_type": "agent",
- "created_by_id": "ag_01H7abc12345",
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-01T10:00:00Z"
}{- "members": [
- {
- "id": "mbr_01H7abc12345",
- "channel_id": "ch_01H7abc12345",
- "participant_type": "agent",
- "participant_id": "ag_01H7abc12345",
- "role": "owner",
- "joined_at": "2026-05-01T10:00:00Z"
}
]
}| id required | string |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| participant_type required | string Enum: "agent" "org_admin" |
| participant_id required | string |
| role | string Default: "member" Enum: "owner" "admin" "member" |
{- "participant_type": "agent",
- "participant_id": "ag_01H7def67890",
- "role": "member"
}{- "id": "mbr_01H7def67890",
- "channel_id": "ch_01H7abc12345",
- "participant_type": "agent",
- "participant_id": "ag_01H7def67890",
- "role": "member",
- "joined_at": "2026-05-28T15:00:00Z"
}| id required | string |
| participant_type required | string Enum: "agent" "org_admin" |
| participant_id required | string |
{- "error": {
- "code": "validation_error",
- "message": "name is required",
- "request_id": "req_01H7abc12345",
- "details": {
- "field": "name"
}
}
}| id required | string |
{- "feeds": [
- {
- "id": "feed_01H7abc12345",
- "channel_id": "ch_01H7abc12345",
- "event_type_glob": "com.example.order.*",
- "filter_expression": "amount_cents > 10000",
- "active": true,
- "created_at": "2026-05-01T10:00:00Z"
}
]
}| id required | string |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| event_type_glob required | string non-empty |
| filter_expression | string or null |
{- "event_type_glob": "com.example.order.*",
- "filter_expression": "amount_cents > 10000"
}{- "id": "feed_01H7abc12345",
- "channel_id": "ch_01H7abc12345",
- "event_type_glob": "com.example.order.*",
- "filter_expression": "amount_cents > 10000",
- "active": true,
- "created_at": "2026-05-28T15:00:00Z"
}| offset | integer >= 0 Default: 0 |
| limit | integer [ 1 .. 200 ] Default: 50 |
| type | string Enum: "episodic" "semantic" "procedural" "entity" "reflection" "reasoning" |
| scope | string Enum: "agent" "team" "institutional" |
| search | string Substring match against title and content (handler-side LIKE). |
{- "memories": [
- {
- "id": "mem_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "scope": "agent",
- "type": "semantic",
- "status": "active",
- "title": "Customer prefers async support",
- "content": "Customer cs_42 historically responds to email within 6h...",
- "confidence": 0.85,
- "importance": 0.6,
- "metadata": { },
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-01T10:00:00Z",
- "accessed_at": "2026-05-28T14:00:00Z"
}
], - "total": 1
}| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| title required | string non-empty |
| content required | string [ 1 .. 32768 ] characters |
| type required | string Enum: "episodic" "semantic" "procedural" "entity" "reflection" "reasoning" |
| scope required | string Enum: "agent" "team" "institutional" |
| team_id | string or null Required if scope=team and not in JWT context. |
| project_id | string or null |
| confidence | number [ 0 .. 1 ] |
| importance | number [ 0 .. 1 ] |
object | |
| source_type | string or null |
| source_id | string or null |
| source_url | string or null <uri> |
| source_event_id | string or null |
| freshness_date | string or null <date-time> |
| expires_at | string or null <date-time> |
{- "title": "Customer prefers async support",
- "content": "Customer cs_42 historically responds to email within 6h...",
- "type": "semantic",
- "scope": "agent",
- "confidence": 0.85,
- "importance": 0.6,
- "source_event_id": "evt_01H7abc12345"
}{- "id": "mem_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "scope": "agent",
- "type": "semantic",
- "status": "active",
- "title": "Customer prefers async support",
- "content": "Customer cs_42 historically responds to email within 6h...",
- "confidence": 0.85,
- "importance": 0.6,
- "metadata": { },
- "source_event_id": "evt_01H7abc12345",
- "created_at": "2026-05-28T15:00:00Z",
- "updated_at": "2026-05-28T15:00:00Z",
- "accessed_at": "2026-05-28T15:00:00Z"
}| id required | string <uuid> Example: mem_01H7abc12345 |
{- "id": "mem_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "scope": "agent",
- "type": "semantic",
- "status": "active",
- "title": "Customer prefers async support",
- "content": "Customer cs_42 historically responds to email within 6h...",
- "confidence": 0.85,
- "importance": 0.6,
- "metadata": { },
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-01T10:00:00Z",
- "accessed_at": "2026-05-28T14:00:00Z"
}| id required | string <uuid> |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| title | string |
| content | string <= 32768 characters |
| confidence | number [ 0 .. 1 ] |
| importance | number [ 0 .. 1 ] |
object | |
| expires_at | string or null <date-time> |
| freshness_date | string or null <date-time> |
{- "confidence": 0.9,
- "importance": 0.7
}{- "id": "mem_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "scope": "agent",
- "type": "semantic",
- "status": "active",
- "title": "Customer prefers async support",
- "content": "Customer cs_42 historically responds to email within 6h...",
- "confidence": 0.9,
- "importance": 0.7,
- "metadata": { },
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-28T15:05:00Z",
- "accessed_at": "2026-05-28T15:05:00Z"
}Per PRD-02. Performs scope-aware semantic search across the caller's accessible memories (agent → team → institutional ascending). Results are ranked by composite score combining semantic similarity, confidence, and recency. The exact ranking signals may evolve; the request/response keys documented here are stable.
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| query required | string non-empty Natural-language search query. |
| scope | string Enum: "agent" "team" "institutional" Limit results to a specific scope. Default searches all accessible scopes. |
| type | string Enum: "episodic" "semantic" "procedural" "entity" "reflection" "reasoning" |
| limit | integer [ 1 .. 100 ] Default: 10 |
| min_confidence | number [ 0 .. 1 ] Minimum confidence score (0..1) for returned memories. |
{- "query": "customer support preferences",
- "scope": "agent",
- "type": "semantic",
- "limit": 10,
- "min_confidence": 0.5
}{- "results": [
- {
- "memory": {
- "id": "mem_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "scope": "agent",
- "type": "semantic",
- "status": "active",
- "title": "Customer prefers async support",
- "content": "Customer cs_42 historically responds to email within 6h...",
- "confidence": 0.85,
- "importance": 0.6,
- "metadata": { },
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-01T10:00:00Z",
- "accessed_at": "2026-05-28T14:00:00Z"
}, - "score": 0.92
}
], - "total": 1
}Creates a directed relationship from the memory in the path (id) to
another memory (target_memory_id). The server enforces a closed enum
for relationship_type — values outside the enum are rejected with
HTTP 400 validation_error. Backed by MemoryHandler.CreateRelationship
in api/internal/handlers/memory.go.
Valid relationship_type values:
strength and metadata are optional. If strength is omitted the
server applies a default; if metadata is omitted it is stored as null.
| id required | string Example: mem_01H7abc12345 Source memory id. |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| target_memory_id required | string <uuid> Target memory id (UUID). The source memory id is taken from the path parameter. |
| relationship_type required | string Enum: "caused_by" "related_to" "contradicts" "supports" "derived_from" "part_of" Closed enum. The server validates this value against the list below and rejects any other value with HTTP 400 validation_error. |
| strength | number <double> [ 0 .. 1 ] Optional edge weight in [0, 1]. Server applies a default if omitted
(handler stores |
object or null Optional freeform JSON object attached to the edge. May be omitted (sent as null) — the server stores either the object or no metadata. |
{- "target_memory_id": "mem_neighbor1234",
- "relationship_type": "derived_from",
- "strength": 0.85,
- "metadata": {
- "confidence": 0.9,
- "source": "manual"
}
}{- "id": "rel_01H7abc12345",
- "tenant_id": "ten_01H7abc12345",
- "source_memory_id": "mem_01H7abc12345",
- "target_memory_id": "mem_neighbor1234",
- "relationship_type": "derived_from",
- "strength": 0.85,
- "metadata": {
- "confidence": 0.9,
- "source": "manual"
}, - "created_at": "2026-06-01T12:34:56Z"
}Performs a breadth-first traversal of the memory graph starting at id
and returns each reached memory along with its hop depth and the
cumulative product of edge strengths along the traversal path.
Backed by MemoryHandler.ListRelationships in
api/internal/handlers/memory.go. Returns the items the caller's tenant
is permitted to see; tenant scoping is enforced server-side.
The count field is the number of items returned, not a paginated total.
| id required | string <uuid> Example: mem_01H7abc12345 Source memory id (UUID). |
| depth | integer [ 1 .. 3 ] Default: 1 Example: depth=1 Number of relationship hops to traverse. Server clamps to [1, 3]; values <= 0 default to 1, values > 3 are capped at 3. |
{- "relationships": [
- {
- "memory_id": "mem_neighbor1234",
- "depth": 1,
- "strength_product": 0.85
}, - {
- "memory_id": "mem_far_neighb56",
- "depth": 2,
- "strength_product": 0.42
}
], - "count": 2
}Removes a single directed relationship by its server-assigned id.
Backed by MemoryHandler.DeleteRelationship in
api/internal/handlers/memory.go. Tenant scoping is enforced
server-side; the caller must be authenticated as an agent in the
owning tenant.
| id required | string <uuid> Example: mem_01H7abc12345 Source memory id (UUID). |
| rel_id required | string <uuid> Example: rel_01H7abc12345 Relationship id returned by createMemoryRelationship. |
{- "error": {
- "code": "validation_error",
- "message": "invalid relationship ID format",
- "request_id": "req_01H7abc12345"
}
}| id required | string <uuid> |
| Idempotency-Key | string <= 255 characters Example: idem_01H7abc12345 Client-supplied key making POST/PATCH operations idempotent (per PRD-03 §4.1). Repeated requests with the same key return the original response without executing again. Server retains the key for at least 24 hours. |
| scope required | string Enum: "team" "institutional" Target scope. Cannot be "agent" (only promotion supported). |
| team_id | string or null Required when scope=team. |
{- "scope": "team",
- "team_id": "team_01H7abc12345"
}{- "id": "mem_01H7abc12345",
- "tenant_id": "tn_01H7abc12345",
- "agent_id": "ag_01H7abc12345",
- "scope": "team",
- "team_id": "team_01H7abc12345",
- "type": "semantic",
- "status": "active",
- "title": "Customer prefers async support",
- "content": "Customer cs_42 historically responds to email within 6h...",
- "confidence": 0.85,
- "importance": 0.6,
- "metadata": { },
- "created_at": "2026-05-01T10:00:00Z",
- "updated_at": "2026-05-28T15:10:00Z",
- "accessed_at": "2026-05-28T15:10:00Z"
}