Spiking Networks
Every registered spiking networks instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 16 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/snn/network/build | Snn build |
POST | /v1/snn/network/compile | Snn compile |
POST | /v1/snn/network/step | Snn step |
POST | /v1/snn/train/bptt | Snn train bptt |
POST | /v1/snn/network/state | Snn state |
POST | /v1/snn/federation/register | Snn federation register |
POST | /v1/snn/federation/contribute | Snn federation contribute |
POST | /v1/snn/federation/parameters | Snn federation parameters |
POST | /v1/snn/federation/spike | Snn federation spike |
POST | /v1/snn/federation/capabilities | Snn federation capabilities |
POST | /v1/snn/federation/agent/update | Snn federation agent update |
POST | /v1/snn/federation/agent/remove | Snn federation agent remove |
POST | /v1/snn/federation/spikes | Snn federation spikes recent |
GET | /v1/snn/health | Snn health |
GET | /v1/snn/stats | Snn stats |
POST | /v1/snn/neurons | Snn neurons |
POST /v1/snn/network/build
Snn build
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require_scoped( CoreAction::Write, "snn:write", request_authority::MEMORY_SNN, ); require_scoped( CoreAction::Admin, "snn:admin", request_authority::MEMORY_SNN, ); require_matching_db(&scoped_db).
Request
Json — SnnBuildReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
network_id | Option<String> | No; optional or defaulted | |
namespace | Option<String> | No; optional or defaulted | |
version | Option<String> | No; optional or defaulted | |
spec | Option<serde_json::Value> | No; optional or defaulted | |
Flattened body_authority fields | RejectedBodyAuthority | See flattened type; not a named JSON field | Serde: flatten |
struct SnnBuildReq {
network_id: Option<String>,
namespace: Option<String>,
version: Option<String>,
spec: Option<serde_json::Value>,
#[serde(flatten)]
body_authority: RejectedBodyAuthority,
}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.
responseErrors and validation
Directly referenced error variants: Forbidden, InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:8975. Registration: akasha-daemon/src/main.rs:4463.
POST /v1/snn/network/compile
Snn compile
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require_scoped( CoreAction::Write, "snn:write", request_authority::MEMORY_SNN, ); require_scoped( CoreAction::Query, "snn:execute", request_authority::MEMORY_SNN, ); require_matching_db(&scoped_db).
Request
Json — SnnCompileReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
network_id | String | Yes | |
namespace | String | Yes | |
version | Option<String> | No; optional or defaulted | |
Flattened body_authority fields | RejectedBodyAuthority | See flattened type; not a named JSON field | Serde: flatten |
struct SnnCompileReq {
network_id: String,
namespace: String,
version: Option<String>,
#[serde(flatten)]
body_authority: RejectedBodyAuthority,
}JSON field accesses in handler: input, output, spec. 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.
SnnCompileResponse {
compiled_id: req.network_id.clone(),
version: version.clone(),
}Errors and validation
Directly referenced error variants: Forbidden, Internal, InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9050. Registration: akasha-daemon/src/main.rs:4464.
POST /v1/snn/network/step
Snn step
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require_scoped( CoreAction::Query, "snn:execute", request_authority::MEMORY_SNN, ); require_matching_db(&scoped).
Request
Json — SnnStepReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
network_id | String | Yes | |
namespace | String | Yes | |
version | Option<String> | No; optional or defaulted | |
input | Vec<f32> | Yes | |
Flattened body_authority fields | RejectedBodyAuthority | See flattened type; not a named JSON field | Serde: flatten |
struct SnnStepReq {
network_id: String,
namespace: String,
version: Option<String>,
input: Vec<f32>,
#[serde(flatten)]
body_authority: RejectedBodyAuthority,
}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.
SnnStepResponse { output: result_vec }Errors and validation
Directly referenced error variants: Forbidden, Internal. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9166. Registration: akasha-daemon/src/main.rs:4465.
POST /v1/snn/train/bptt
Snn train bptt
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require_scoped( CoreAction::Write, "snn:train", request_authority::MEMORY_SNN, ); require_matching_db(&scoped_db).
Request
Implementation limit: Placeholder training: constructs a trainer but does not run BPTT. Records placeholder completed metrics and saves a versioned spec; do not interpret success as learned weights.
Json — SnnTrainBpttReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
network_id | String | Yes | |
namespace | String | Yes | |
version | Option<String> | No; optional or defaulted | |
steps | usize | Yes | |
Flattened body_authority fields | RejectedBodyAuthority | See flattened type; not a named JSON field | Serde: flatten |
struct SnnTrainBpttReq {
network_id: String,
namespace: String,
version: Option<String>,
steps: usize,
#[serde(flatten)]
body_authority: RejectedBodyAuthority,
}JSON field accesses in handler: spec. 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.
SnnTrainBpttResponse {
network_id: req.network_id,
version,
}Errors and validation
Directly referenced error variants: Forbidden, Internal, InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9210. Registration: akasha-daemon/src/main.rs:4466.
POST /v1/snn/network/state
Snn state
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require_scoped(CoreAction::Read, "snn:read", request_authority::MEMORY_SNN); require_matching_db(&scoped_db).
Request
Json — SnnStateReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
namespace | String | Yes | |
Flattened body_authority fields | RejectedBodyAuthority | See flattened type; not a named JSON field | Serde: flatten |
struct SnnStateReq {
namespace: String,
#[serde(flatten)]
body_authority: RejectedBodyAuthority,
}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.
SnnStateResponse {
namespace: req.namespace,
networks,
}Errors and validation
Directly referenced error variants: Forbidden. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9318. Registration: akasha-daemon/src/main.rs:4467.
POST /v1/snn/federation/register
Snn federation register
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationRegisterReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted | |
agent_id | String | Yes | |
host | String | Yes | |
capabilities | Vec<String> | Yes | |
ensembles | Vec<EnsembleInfo> | No; optional or defaulted | Serde: default |
visibility | Option<String> | No; optional or defaulted | |
trust_score | Option<f32> | No; optional or defaulted | Serde: default |
struct SnnFederationRegisterReq {
token: Option<String>,
agent_id: String,
host: String,
capabilities: Vec<String>,
#[serde(default)]
ensembles: Vec<EnsembleInfo>,
visibility: Option<String>,
#[serde(default)]
trust_score: Option<f32>,
}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: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9359. Registration: akasha-daemon/src/main.rs:4468.
POST /v1/snn/federation/contribute
Snn federation contribute
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationContributeReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted | |
agent_id | String | Yes | |
deltas | WeightDeltas | Yes |
struct SnnFederationContributeReq {
token: Option<String>,
agent_id: String,
deltas: WeightDeltas,
}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::to_value(snapshot).unwrap_or_default()Errors and validation
Directly referenced error variants: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9380. Registration: akasha-daemon/src/main.rs:4469.
POST /v1/snn/federation/parameters
Snn federation parameters
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationTokenReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted |
struct SnnFederationTokenReq {
token: Option<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::to_value(snapshot).unwrap_or_default()Errors and validation
Directly referenced error variants: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9392. Registration: akasha-daemon/src/main.rs:4473.
POST /v1/snn/federation/spike
Snn federation spike
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationSpikeReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted | |
event | SpikeEventPayload | Yes |
struct SnnFederationSpikeReq {
token: Option<String>,
event: SpikeEventPayload,
}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: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9404. Registration: akasha-daemon/src/main.rs:4477.
POST /v1/snn/federation/capabilities
Snn federation capabilities
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationCapabilitiesReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted | |
required | Option<Vec<String>> | No; optional or defaulted | Serde: default |
struct SnnFederationCapabilitiesReq {
token: Option<String>,
#[serde(default)]
required: Option<Vec<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::to_value(list).unwrap_or_default()Errors and validation
Directly referenced error variants: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9416. Registration: akasha-daemon/src/main.rs:4478.
POST /v1/snn/federation/agent/update
Snn federation agent update
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationAgentUpdateReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted | |
agent_id | String | Yes | |
visibility | Option<String> | No; optional or defaulted | |
trust_score | Option<f32> | No; optional or defaulted |
struct SnnFederationAgentUpdateReq {
token: Option<String>,
agent_id: String,
visibility: Option<String>,
trust_score: Option<f32>,
}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::to_value(updated).unwrap_or_default()Errors and validation
Directly referenced error variants: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9429. Registration: akasha-daemon/src/main.rs:4482.
POST /v1/snn/federation/agent/remove
Snn federation agent remove
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationAgentRemoveReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted | |
agent_id | String | Yes |
struct SnnFederationAgentRemoveReq {
token: Option<String>,
agent_id: 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: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9446. Registration: akasha-daemon/src/main.rs:4486.
POST /v1/snn/federation/spikes
Snn federation spikes recent
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SnnFederationTokenReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
token | Option<String> | No; optional or defaulted |
struct SnnFederationTokenReq {
token: Option<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::to_value(list).unwrap_or_default()Errors and validation
Directly referenced error variants: from. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9458. Registration: akasha-daemon/src/main.rs:4490.
GET /v1/snn/health
Snn health
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| 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:10301. Registration: akasha-daemon/src/main.rs:4494.
GET /v1/snn/stats
Snn stats
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | SNN |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require_scoped(CoreAction::Read, "snn:read", request_authority::MEMORY_SNN); require_matching_db(&db).
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!({
"cacheHits": metrics.cache_hits.get(),
"cacheMisses": metrics.cache_misses.get(),
"cacheEvictions": metrics.cache_evictions.get(),
"loadFailures": metrics.load_failures.get()
})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:11151. Registration: akasha-daemon/src/main.rs:4495.
POST /v1/snn/neurons
Snn neurons
| Availability | Source contract |
|---|---|
| Registration | config.enable_snn |
| Runtime service | snn |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require_scoped(CoreAction::Read, "snn:read", request_authority::MEMORY_SNN); require_matching_db(&db).
Request
Json — SnnNeuronsReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
network_id | String | Yes |
struct SnnNeuronsReq {
network_id: 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!({
"networkId": req.network_id,
"neurons": []
})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:11173. Registration: akasha-daemon/src/main.rs:4496.