API referenceInstance API
GUIDE & REFERENCE

Memory

Every registered memory instance operation, with source-derived inputs, outputs, access policy, and errors.

This reference covers 5 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.

MethodPathOperation
POST/v1/memory/emissionsMemory emissions ingest
GET/v1/memory/reindex/statusMemory reindex status
POST/v1/memory/retrieval/hybridMemory retrieval hybrid
GET/v1/memory/healthMemory health
GET/v1/memory/statsMemory stats composite

POST /v1/memory/emissions

Nous → Akasha MIND emission receiver (FINAL_SPEC §6.6 GAP 1). Channel authentication is the configured shared-secret bearer (AKASHA_MIND_EMISSION_TOKEN), verified by the receiver in constant time; the route fails closed (503) when unconfigured. Payloads are schema-validated against the nous_mind::EmissionRecord wire shape and landed via AkashaDB::mind_emission_ingest.

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

Access: Dedicated MIND channel bearer when configured; otherwise standard daemon auth and receiver fails closed without channel configuration.

Request

Jsonmind_receiver::EmissionRecordRequest

FieldRust typeRequired on inputNotes
perception_idStringYes
ir_idStringYes
modalityModalityDtoYes
signerStringYes
embeddingEmbeddingDtoYes
struct EmissionRecordRequest {
    pub perception_id: String,
    pub ir_id: String,
    pub modality: ModalityDto,
    pub signer: String,
    pub embedding: EmbeddingDto,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({
        "status": "accepted",
        "perception_id": validated.perception_hex,
        "deduplicated": outcome.deduplicated,
        "item_id": outcome.item_id.to_string(),
        "vector_id": outcome.vector_id.to_string(),
        "vector_index": outcome.vector_index,
        "episodic_id": outcome.episodic_id.map(|id| id.to_string()),
    })

Errors and validation

Directly referenced error variants: Forbidden, Internal, InvalidRequest, ServiceDisabled, Unauthorized. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:7389. Registration: akasha-daemon/src/main.rs:4631.

GET /v1/memory/reindex/status

Memory reindex status

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

MemoryReindexStatusResponse {
        components: db.memory_reindex_progress(),
    }

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:3352. Registration: akasha-daemon/src/main.rs:4696.

POST /v1/memory/retrieval/hybrid

Memory retrieval hybrid

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

JsonRetrievalReq

FieldRust typeRequired on inputNotes
textStringYes
limitOption<usize>No; optional or defaulted
chunkboolNo; optional or defaultedSerde: default
struct RetrievalReq {
    text: String,
    limit: Option<usize>,
    #[serde(default)]
    chunk: bool,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({
            "rows": all_rows,
            "chunks_queried": chunks.len(),
        })
serde_json::json!({"rows": rows})

Errors and validation

Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:7854. Registration: akasha-daemon/src/main.rs:4697.

GET /v1/memory/health

Memory health

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

Serialization is delegated or the handler returns a raw response. Consult the exact handler below; the OpenAPI response intentionally remains unconstrained.

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:10293. Registration: akasha-daemon/src/main.rs:4699.

GET /v1/memory/stats

Memory stats composite

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({
        "episodicCount": episodic_count,
        "proceduralCount": procedural_count,
        "resourceCount": resource_count,
        "vaultCount": vault_count,
        "totalSizeBytes": 0,
        "oldestMemory": "",
        "newestMemory": "",
        "activeAgents": 0
    })

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:10480. Registration: akasha-daemon/src/main.rs:4700.

On this page