memory

Remember

Store new memory with 3-layer architecture.

Issue #1 specification:

  • Layer 1: summary (Embedding化、検索用)
  • Layer 2: context_summary (文脈説明)
  • Layer 3: content + details (完全詳細)

Request: { "summary": "認証エラー修正。JWTトークン有効期限チェック追加。", "context_summary": "ユーザーからログイン失敗の報告があり...", "content": "auth.pyのverify_token関数にexpired_atの検証を追加", "details": {"code_diff": "...", "test_results": "..."}, "type": "code", "importance": 0.8, "tags": ["python", "authentication"], "context": {"context_id": "my-context"} }

Response: { "status": "success", "memory_id": "uuid", "scope": "working", "persistence": { "scope": "working", "committed": true, "promotes_via": "sleep_consolidation", "consolidation_archive_min_age_days": 30, "detail": "..." } }

The memory is committed before this returns; scope selects the consolidation lifecycle, not whether it was stored. persistence describes that lifecycle for this deployment and is null when the scope cannot be classified. Its age floor is scoped to consolidation and is not a retention guarantee — see services.persistence.

Example: POST /api/v1/memory/remember Authorization: Bearer <session_token>

post/api/v1/memory/remember

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/api/v1/memory/remember
  • Auth: none declared

Headers

authorizationstring nullable

Request body

summarystring required

検索用サマリー

context_summarystring nullable

背景・文脈説明

contentstring required

基本内容

detailsobject nullable

完全詳細(JSONB)

typestring required

メモリタイプ

importancenumber

重要度 (0.0-1.0)

tagsstring[]

タグ

contextobject nullable

コンテキスト情報

delivery_mode'always' | 'on_recall' | 'on_trigger'

Delivery mode: always (pin, load every turn) | on_recall (default) | on_trigger

source_uristring nullable

Origin URI: file://, http(s)://, vault://, obsidian://

source_type'file' | 'url' | 'vault' | 'api' | 'manual' nullable

Origin type

linked_memory_idsstring[] nullable

Explicit links to existing memories (creates declared_link edges)

linked_source_urisstring[] nullable

Explicit links by source_uri (resolved at remember time, unresolved silently skipped)

supersedesstring uuid nullable

Memory ID this new memory supersedes (old one is shadowed, not deleted)

Response

Successful Response

statusstring
memory_idstring uuid required
scopestring required
versioninteger

Changes

No recorded changes to this operation across all 1 revision of this API.