Vectors
Every registered vectors instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 6 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/ml/vector/create | Vector create |
POST | /v1/ml/vector/add | Vector add |
POST | /v1/ml/vector/search | Vector search |
POST | /v1/ml/vector/save | Vector save |
GET | /v1/ml/vector | Vector list |
GET | /v1/vector/health | Vector health |
POST /v1/ml/vector/create
Vector create
| Availability | Source contract |
|---|---|
| Registration | config.enable_vector |
| Runtime service | vector |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — VectorCreateRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | |
dims | usize | Yes | |
metric | String | Yes |
struct VectorCreateRequest {
name: String,
dims: usize,
metric: 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: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:2896. Registration: akasha-daemon/src/main.rs:4570.
POST /v1/ml/vector/add
Vector add
| Availability | Source contract |
|---|---|
| Registration | config.enable_vector |
| Runtime service | vector |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — VectorAddRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | |
id | String | Yes | |
vector | Vec<f32> | Yes |
struct VectorAddRequest {
name: String,
id: String,
vector: Vec<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: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:2915. Registration: akasha-daemon/src/main.rs:4571.
POST /v1/ml/vector/search
Vector search
| Availability | Source contract |
|---|---|
| Registration | config.enable_vector |
| Runtime service | vector |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — VectorSearchRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | |
vector | Vec<f32> | Yes | |
k | usize | Yes |
struct VectorSearchRequest {
name: String,
vector: Vec<f32>,
k: 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.
serde_json::json!({"matches": results})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:2935. Registration: akasha-daemon/src/main.rs:4572.
POST /v1/ml/vector/save
Vector save
| Availability | Source contract |
|---|---|
| Registration | config.enable_vector |
| Runtime service | vector |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — VectorSaveRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes |
struct VectorSaveRequest {
name: 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: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:2953. Registration: akasha-daemon/src/main.rs:4573.
GET /v1/ml/vector
Vector list
| Availability | Source contract |
|---|---|
| Registration | config.enable_vector |
| Runtime service | vector |
| 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!({"indices": db.vector_list()})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:2964. Registration: akasha-daemon/src/main.rs:4574.
GET /v1/vector/health
Vector health
| Availability | Source contract |
|---|---|
| Registration | config.enable_vector |
| Runtime service | vector |
| 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:10289. Registration: akasha-daemon/src/main.rs:4575.