API referenceInstance API
GUIDE & REFERENCE

Cognitive Memory

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

This reference covers 9 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/cognitive/queryMemory cognitive query
POST/v1/memory/cognitive/thoughtMemory cognitive thought
POST/v1/memory/cognitive/decisionMemory cognitive decision
POST/v1/memory/cognitive/interactionMemory cognitive interaction
POST/v1/memory/cognitive/sessionMemory cognitive session
POST/v1/memory/cognitive/resourceMemory cognitive resource
POST/v1/memory/cognitive/usageMemory cognitive usage
POST/v1/memory/cognitive/resourcesMemory cognitive resource store
POST/v1/memory/cognitive/resources/usageMemory cognitive resource usage

POST /v1/memory/cognitive/query

Memory cognitive query

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

JsonCognitiveQueryReq

FieldRust typeRequired on inputNotes
queryserde_json::ValueYes
struct CognitiveQueryReq {
    query: serde_json::Value,
}

JSON field accesses in handler: agent_id, end_time, include_decisions, include_interactions, include_sessions, include_thoughts, min_confidence, start_time. Nested lookups are included; this list alone does not establish requiredness.

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!({
        "thoughts": res.thoughts.len(),
        "decisions": res.decisions.len(),
        "interactions": res.interactions.len(),
        "sessions": res.sessions.len()
    })

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:7740. Registration: akasha-daemon/src/main.rs:4666.

POST /v1/memory/cognitive/thought

Memory cognitive thought

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

JsonCognitiveThoughtReq

FieldRust typeRequired on inputNotes
thoughtCognitiveThoughtYes
struct CognitiveThoughtReq {
    thought: CognitiveThought,
}

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!({"id": id})

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:7663. Registration: akasha-daemon/src/main.rs:4667.

POST /v1/memory/cognitive/decision

Memory cognitive decision

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

JsonCognitiveDecisionReq

FieldRust typeRequired on inputNotes
decisionCognitiveDecisionYes
struct CognitiveDecisionReq {
    decision: CognitiveDecision,
}

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!({"id": id})

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:7682. Registration: akasha-daemon/src/main.rs:4671.

POST /v1/memory/cognitive/interaction

Memory cognitive interaction

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

JsonCognitiveInteractionReq

FieldRust typeRequired on inputNotes
interactionAgentInteractionYes
struct CognitiveInteractionReq {
    interaction: AgentInteraction,
}

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!({"id": id})

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:7701. Registration: akasha-daemon/src/main.rs:4675.

POST /v1/memory/cognitive/session

Memory cognitive session

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

JsonCognitiveSessionReq

FieldRust typeRequired on inputNotes
agent_idStringYes
goalStringYes
struct CognitiveSessionReq {
    agent_id: String,
    goal: String,
}

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!({"session": sess})

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:7721. Registration: akasha-daemon/src/main.rs:4679.

POST /v1/memory/cognitive/resource

Memory cognitive resource

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

Jsonserde_json::Value

This handler accepts dynamic JSON. The field accesses below are source observations, not a fabricated required-field schema.

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!({"ok": true})

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:7806. Registration: akasha-daemon/src/main.rs:4683.

POST /v1/memory/cognitive/usage

Memory cognitive usage

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

Jsonserde_json::Value

This handler accepts dynamic JSON. The field accesses below are source observations, not a fabricated required-field schema.

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!({"ok": true})

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:7815. Registration: akasha-daemon/src/main.rs:4687.

POST /v1/memory/cognitive/resources

Memory cognitive resource store

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

Jsonserde_json::Value

This handler accepts dynamic JSON. The field accesses below are source observations, not a fabricated required-field schema.

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!({"ok": true})

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:7824. Registration: akasha-daemon/src/main.rs:4688.

POST /v1/memory/cognitive/resources/usage

Memory cognitive resource usage

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

Jsonserde_json::Value

This handler accepts dynamic JSON. The field accesses below are source observations, not a fabricated required-field schema.

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!({"ok": true})

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:7833. Registration: akasha-daemon/src/main.rs:4692.

On this page