API referenceInstance API
GUIDE & REFERENCE

Reasoning

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

This reference covers 10 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/ns/retrieveNs retrieve
POST/v1/ns/retrieve_with_modeNs retrieve with mode
POST/v1/ns/paths/findNs paths find
POST/v1/ns/prefetch/startNs prefetch start
POST/v1/ns/prefetch/stopNs prefetch stop
GET/v1/ns/cache/statsNs cache stats
GET/v1/ns/historyNs history
GET/v1/ns/rulesNs rules
POST/v1/ns/rules/toggleNs rules toggle
GET/v1/ns/statsNs stats

POST /v1/ns/retrieve

Ns retrieve

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
Handler dependenciesSee handler source and return expressions.

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

Request

JsonNsRetrieveReq

FieldRust typeRequired on inputNotes
textStringYes
modeOption<String>No; optional or defaulted
kOption<usize>No; optional or defaulted
struct NsRetrieveReq {
    text: String,
    mode: Option<String>,
    k: Option<usize>,
}

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.

result

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

POST /v1/ns/retrieve_with_mode

Ns retrieve with mode

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
Handler dependenciesSee handler source and return expressions.

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

Request

JsonNsRetrieveReq

FieldRust typeRequired on inputNotes
textStringYes
modeOption<String>No; optional or defaulted
kOption<usize>No; optional or defaulted
struct NsRetrieveReq {
    text: String,
    mode: Option<String>,
    k: Option<usize>,
}

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.

req

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

POST /v1/ns/paths/find

Ns paths find

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
Handler dependenciesSee handler source and return expressions.

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

Request

JsonNsPathsFindReq

FieldRust typeRequired on inputNotes
startStringYes
endStringYes
struct NsPathsFindReq {
    start: String,
    end: 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.

r

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

POST /v1/ns/prefetch/start

Ns prefetch start

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
Handler dependenciesSee handler source and return expressions.

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

Request

JsonNsPrefetchReq

FieldRust typeRequired on inputNotes
queryStringYes
struct NsPrefetchReq {
    #[allow(dead_code)]
    query: 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!({"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:9545. Registration: akasha-daemon/src/main.rs:4505.

POST /v1/ns/prefetch/stop

Ns prefetch stop

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
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!({"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:9551. Registration: akasha-daemon/src/main.rs:4506.

GET /v1/ns/cache/stats

Ns cache stats

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
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!({"hit_rate": 0.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:9555. Registration: akasha-daemon/src/main.rs:4507.

GET /v1/ns/history

Ns history

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
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!(entries)

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

GET /v1/ns/rules

Ns rules

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
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!([])

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

POST /v1/ns/rules/toggle

Ns rules toggle

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
Handler dependenciesSee handler source and return expressions.

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

Request

JsonNsRuleToggleReq

FieldRust typeRequired on inputNotes
rule_idStringYes
enabledboolYes
struct NsRuleToggleReq {
    #[allow(dead_code)]
    rule_id: String,
    #[allow(dead_code)]
    enabled: 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!({"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:11211. Registration: akasha-daemon/src/main.rs:4510.

GET /v1/ns/stats

Ns stats

AvailabilitySource contract
Registrationconfig.enable_neurosymbolic
Runtime serviceneurosymbolic
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!({
        "totalQueries": history.len(),
        "avgLatencyMs": 0,
        "cacheHitRate": 0.0,
        "activeRules": 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:11219. Registration: akasha-daemon/src/main.rs:4511.

On this page