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.
| Method | Path | Operation |
|---|---|---|
POST | /v1/memory/emissions | Memory emissions ingest |
GET | /v1/memory/reindex/status | Memory reindex status |
POST | /v1/memory/retrieval/hybrid | Memory retrieval hybrid |
GET | /v1/memory/health | Memory health |
GET | /v1/memory/stats | Memory 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.
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Dedicated MIND channel bearer when configured; otherwise standard daemon auth and receiver fails closed without channel configuration.
Request
Json — mind_receiver::EmissionRecordRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
perception_id | String | Yes | |
ir_id | String | Yes | |
modality | ModalityDto | Yes | |
signer | String | Yes | |
embedding | EmbeddingDto | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See 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
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — RetrievalReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
text | String | Yes | |
limit | Option<usize> | No; optional or defaulted | |
chunk | bool | No; optional or defaulted | Serde: 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
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See 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
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See 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.