Welcome
Cognitum Seed is a portable edge intelligence appliance. It provides an on-device vector store in RVF binary format, real-time sensor processing with drift detection, thermal-aware DVFS management, cryptographic custody with Ed25519 signing, and a cognitive container for spectral graph analysis — all accessible through 90 HTTPS API endpoints with per-client bearer token authentication.
Live Vectors
In the RVF store
Epoch
Witness chain entries
Uptime
Since last boot
Temperature
SoC thermal zone
Quick Start (First 5 Minutes)
Get up and running with your Cognitum Seed in five steps.
- Plug in via USB data port (not the power port). Three interfaces appear: a
COGNITUMUSB drive, a USB Ethernet adapter, and mDNS atcognitum.local. - Install the trust certificate (optional but recommended). Open the
COGNITUMUSB drive and run the installer in thetrust/folder for your OS:- Windows: double-click
trust/install-trust.bat - macOS: double-click
trust/install-trust.command - Linux: run
bash trust/install-trust.sh
- Windows: double-click
- Open the API Explorer at
https://169.254.42.1:8443/. If you installed the trust certificate, it loads directly. Otherwise, accept the certificate warning when prompted. You'll see the live dashboard with vector count, epoch, and uptime. - Pair your client to unlock write endpoints. Go to the Pairing section and click "Pair". This opens a pairing window, issues a bearer token, and saves it to your browser automatically.
- Ingest sample data to test the store. Click POST
/api/v1/demo/ingest-sample— this adds 100 random 8-dim vectors. Then try a k-NN query with POST/api/v1/store/query. - Explore endpoints — 100 endpoints cover vectors, sensors, thermal governor, temporal coherence, cognitive container, custody, and more. Read endpoints work without authentication; write endpoints require a bearer token.
curl -sk -X POST https://169.254.42.1:8443/api/v1/demo/ingest-sample
Connect to Your Seed
The Seed provides three connection methods. USB is primary (no network config required); WiFi is secondary for wireless access.
USB Connection (recommended)
Plug the Seed into your computer via the USB data port (not the power-only port). Three interfaces appear:
| Interface | What You See | Use |
|---|---|---|
| USB Drive | COGNITUM FAT32 drive | This guide, launchers, and trust/ certificate installer |
| USB Ethernet | Network adapter (RNDIS / ECM) | API, SSH, SFTP at 169.254.42.1 |
| mDNS | cognitum.local | Friendly hostname for SSH and API |
curl -sk https://169.254.42.1:8443/api/v1/status
SSH Access
# Via USB ssh genesis@169.254.42.1 # Via mDNS ssh genesis@cognitum.local # Via WiFi (if configured) ssh genesis@192.168.1.x
Cross-Platform Compatibility
| OS | USB Ethernet | USB Drive | mDNS |
|---|---|---|---|
| Windows 10/11 | RNDIS (built-in) | Auto-detected | Built-in |
| macOS | CDC-ECM (built-in) | Auto-detected | Bonjour |
| Linux | CDC-ECM (built-in) | Auto-detected | avahi-daemon |
Pairing & Authentication (ADR-048)
Pairing authorizes your client to use write endpoints (ingest, delete, config updates, OTA, actuator fire). Read-only endpoints work without pairing. Each client receives a unique bearer token during pairing that must be included in all write requests.
How It Works
- Open pairing window —
POST /api/v1/pair/windowopens a 30-second window. This endpoint only accepts requests from the USB interface (localhost / 169.254.42.1). - Pair —
POST /api/v1/pairwith{"client_name":"my-laptop"}. The server generates a 256-bit random token and returns it. The server stores only the SHA-256 hash of the token. - Save the token — This guide saves it to
localStorageautomatically. CLI users must save the token manually; it is shown only once. - Authenticate — Include
Authorization: Bearer <token>on every write request. The guide does this automatically.
# Step 1: Open pairing window (USB IP only) curl -sk -X POST https://169.254.42.1:8443/api/v1/pair/window # Step 2: Pair and receive token curl -sk -X POST https://169.254.42.1:8443/api/v1/pair \ -H 'Content-Type: application/json' \ -d '{"client_name":"my-laptop"}' # Step 3: Use token in subsequent requests curl -sk -X POST https://169.254.42.1:8443/api/v1/store/ingest \ -H 'Authorization: Bearer <your-token>' \ -H 'Content-Type: application/json' \ -d '{"vectors":[[0,[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8]]]}'
/var/lib/cognitum/clients.json).localStorage automatically.Paired Clients
View all clients currently paired with this Seed.
curl -sk https://169.254.42.1:8443/api/v1/pair/clients
RVF Binary Format
The Seed stores all vectors in RVF (RuVector Format), a compact append-only binary format designed for embedded devices. RVF files are binary-compatible with the parent ruvector workspace — you can generate .rvf files on your workstation and import them into the Seed, or export the Seed's store for analysis on your computer.
File Structure
An RVF file is a sequential log of entries. Each entry has a fixed-size header followed by variable-length data:
| Field | Size | Description |
|---|---|---|
| Entry type | 1 byte | 0x01 = vector, 0x02 = delete, 0x03 = witness, 0x04 = metadata-only |
| Vector ID | 8 bytes | u64, content-addressed via SHA-256 truncation |
| Dimension | 2 bytes | u16, number of f32 components (e.g. 8) |
| Vector data | dim * 4 bytes | f32 components in little-endian |
| Metadata | variable | Optional key-value pairs (field_id + typed value) |
Key Properties
- Append-only — deletions are tombstones, not erasures. The file grows monotonically until compaction.
- Content-addressed IDs — vector IDs are derived from SHA-256 of the vector data (truncated to u64). Duplicate vectors get the same ID automatically.
- Witness entries — every write appends a witness entry with a SHA-256 hash linking to the previous entry, forming a tamper-evident chain.
- Compaction —
POST /api/v1/store/compactrewrites the file excluding deleted vectors, reclaiming disk space. - Pre-computed norms — L2 norms are cached per vector to accelerate cosine similarity queries (dot product + 1 division instead of 2 square roots per candidate).
Storage Budget
| Vectors | Dimension | File Size | RSS Memory |
|---|---|---|---|
| 1,000 | 8 | ~40 KB | ~3 MB |
| 20,000 | 8 | ~700 KB | ~7.5 MB |
| 100,000 | 8 | ~3.5 MB | ~35 MB |
| 20,000 | 128 | ~10 MB | ~50 MB |
The Seed has 512 MB RAM. Keep total vectors * dimension * 4 bytes under ~100 MB to leave room for the sensor pipeline, kNN graph, and cognitive container.
Vector Store
The store holds vectors in RVF format with content-addressed IDs. It supports k-nearest-neighbor queries using cosine similarity, batch ingest with deduplication, soft-delete with compaction, and a kNN graph for structural analysis.
Query
k=10, 20k vectors on Pi (TLS)
Ingest
100 vectors per batch
Startup
20k vector replay from disk
k-NN Query
Query returns the k most similar vectors by cosine similarity. Uses a BinaryHeap with O(n log k) complexity and early distance pruning. Supports multiple distance metrics via the metric field: cosine (default), l2, or dot.
curl -sk -X POST https://169.254.42.1:8443/api/v1/store/query \ -H 'Content-Type: application/json' \ -d '{"vector":[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8],"k":5}' # With metadata filter and metric curl -sk -X POST https://169.254.42.1:8443/api/v1/store/query \ -d '{"vector":[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8],"k":5,"metric":"l2","filter":{"field_id":0,"op":"eq","value":"sensor"}}'
kNN Graph
The optimizer loop rebuilds a k=16 nearest-neighbor graph every 10 seconds (when changes are detected). The graph drives boundary analysis (Stoer-Wagner min-cut) which produces a fragility score from 0.0 (solid) to 1.0 (fragile). Fragility directly controls the thermal governor's demand level.
Witness Chain
Every write operation (ingest, delete, compact) appends a tamper-evident entry to the witness chain. Each entry contains a SHA-256 hash that links to the previous entry, forming a cryptographic audit trail. If any historical entry is modified, the chain verification fails at the tampered link.
What Gets Witnessed
| Operation | Witness Entry Contains |
|---|---|
| Ingest | Vector IDs added, epoch, timestamp |
| Delete | Vector IDs removed, epoch |
| Compact | Bytes reclaimed, vectors surviving |
| Manual witness | Custom event string |
curl -sk -X POST https://169.254.42.1:8443/api/v1/witness/verify
Custody & Ed25519 Signing
Each Seed has a unique Ed25519 keypair derived from its device ID. The private key never leaves the device. You can sign arbitrary data and verify signatures, enabling cryptographic proof that data originated from a specific Seed.
Signing Workflow
- Sign data with
POST /api/v1/custody/sign— returns hex-encoded Ed25519 signature + public key. - Verify with
POST /api/v1/custody/verify— pass the data, signature, and optionally a public key. Uses the device's own key if omitted. - Attestation with
GET /api/v1/custody/attestation— returns a signed attestation proving the device booted with its identity, including epoch, vector count, and witness head.
curl -sk -X POST https://169.254.42.1:8443/api/v1/custody/sign \ -H 'Content-Type: application/json' -d '{"data":"hello world"}'
MCP Proxy (ADR-047)
The Model Context Protocol proxy exposes the Seed's capabilities to AI assistants (Claude, GPT, etc.) via JSON-RPC 2.0 over Streamable HTTP at /mcp. 12 tools across 6 groups, 4 resources, 3 guided prompts, and a default-deny policy engine.
Architecture
Transport
Streamable HTTP at /mcp. POST for JSON-RPC, GET for SSE (planned), OPTIONS for CORS. Available on both HTTP (:80) and HTTPS (:8443). DNS rebinding protection via Origin validation.
Policy Engine
4-tier auth classes: public (always), paired (needs pairing), privileged (needs grant), dangerous (needs grant + confirm). Scope negotiation via MCP initialize.
Witness Binding
Every tool call that modifies state records a witness entry. Audit trail includes caller, args hash, result hash.
Tool Scopes
| Scope | Tools | Description |
|---|---|---|
default | 24 | Essential tools for AI assistants (safe reads + query) |
full | 114 | All canonical tools across 21 groups |
minimal | 18 | 12 legacy v1 tools + 6 guide (backward compat) |
Set via capabilities.experimental.cognitum.toolScope in the initialize request.
Auth Classes
| Class | Policy | Examples |
|---|---|---|
| public | Always allowed | seed.guide.*, seed.device.status |
| paired | Requires pairing | seed.memory.query, seed.store.status |
| privileged | Pairing + grant | seed.memory.upsert, seed.thermal.config_set |
| dangerous | Grant + confirm | seed.firmware.update, seed.wifi.connect |
Tool Groups (21)
Default Scope (24 tools) -- click to expand
| Group | Tools in Default | Count |
|---|---|---|
guide | overview, groups, endpoints, search, explain, tutorials | 6 |
device | status, identity, security, cluster_health | 4 |
witness | chain, verify, get | 3 |
custody | epoch, attestation, proof_stats | 3 |
memory | query | 1 |
rvf | container.list, kernel.list | 2 |
store | status | 1 |
sensor | list | 1 |
swarm | status, peers.list | 2 |
coherence | profile | 1 |
Full Scope -- All 21 Groups (114 tools) -- click to expand
| Group | Tools | Auth Tier |
|---|---|---|
guide (6) | overview, groups, endpoints, search, explain, tutorials | public |
device (5) | status, identity, security, build_key, cluster_health | paired |
witness (3) | chain, verify, get | paired |
custody (6) | epoch, attestation, proof_stats, witness, sign, verify | mixed |
memory (2) | query, upsert | mixed |
rvf (5) | container.list, kernel.list, kernel.call, explore, inspect | mixed |
store (12) | status, ingest, delete, query, compact, deleted, graph_stats, sync_pull, sync_push, import, export, import_formats | mixed |
sensor (17) | list, gpio_pins, gpio_read, gpio_write, stream, store_status, embedding_latest, embedding_config_get/set, drift_status/history, actuators, reflex_rules_get/set, coprocessor_status/latest, config | mixed |
thermal (13) | state, governor, telemetry, silicon_profile, characterize, accuracy, dvfs_profile, turbo, boost, coherence, config_get, config_set, stats | mixed |
coherence (5) | profile, history, phases, orphans, config | mixed |
cognitive (7) | status, snapshot, witness, witness_chain, tick, config_get, config_set | mixed |
pair (4) | status, clients, initiate, window | dangerous |
firmware (6) | status, update, upgrade_status, upgrade_check, upgrade_apply, boot_measurements | dangerous |
wifi (3) | status, scan, connect | dangerous |
swarm (5) | status, peers.list, peers.detail, peers.sync, sync_stats | paired |
optimize (3) | status, trigger, metrics | mixed |
boundary (2) | get, recompute | mixed |
delta (4) | stream, history, sync_pull, sync_push | paired |
delivery (1) | image | paired |
admin (5) | build_key_provision, profiles_list, profiles_create, demo_coherence, demo_ingest | dangerous |
Connection Flow
# 1. Initialize the MCP session (default scope = 24 tools) curl -s -X POST http://169.254.42.1/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2025-11-25","clientInfo":{"name":"my-client","version":"1.0"},"capabilities":{"experimental":{"cognitum":{"toolScope":"default"}}}}}' # 2. Send initialized notification curl -s -X POST http://169.254.42.1/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"notifications/initialized"}' # 3. List available tools curl -s -X POST http://169.254.42.1/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/list","id":2,"params":{}}' # 4. Call a tool curl -s -X POST http://169.254.42.1/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/call","id":3,"params":{"name":"seed.device.status","arguments":{}}}'
Try It — MCP Initialize + Status
Try It — MCP Tools List
Try It — MCP Query Vectors
Resources & Prompts
Resources (read via resources/read):
| URI Pattern | Description |
|---|---|
seed://{deviceId}/status | Real-time device status and metrics |
rvf://{deviceId}/store | Vector store epoch, vectors, dimension |
witness://{deviceId}/chain | Witness chain head hash and depth |
telemetry://{deviceId}/thermal | Thermal governor state |
Prompts (expand via prompts/get):
| Prompt | Arguments | Description |
|---|---|---|
seed_diagnose | (none) | Guided health diagnosis: status, witness, thermal, store |
seed_safe_gpio_setup | pin, direction | Safe GPIO pin configuration with policy check |
seed_run_kernel | kernelId | Run an RVF kernel with safety checks and witness verification |
Batch Requests
Send multiple JSON-RPC calls in a single HTTP POST as a JSON array. Notifications (no id) return HTTP 202.
# Batch: initialize + list tools in one request curl -s -X POST http://169.254.42.1/mcp \ -H "Content-Type: application/json" \ -d '[ {"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2025-11-25","clientInfo":{"name":"test"}}}, {"jsonrpc":"2.0","method":"notifications/initialized"}, {"jsonrpc":"2.0","method":"tools/list","id":2,"params":{}} ]'
AI Client Integration (Claude, GPT, Cursor, etc.)
Claude Desktop / Claude Code
Add to your claude_desktop_config.json or .claude/settings.json:
{
"mcpServers": {
"cognitum-seed": {
"url": "http://169.254.42.1/mcp",
"transport": "streamable-http"
}
}
}
Claude will discover all 12 tools, 4 resources, and 3 prompts automatically via the MCP handshake.
Any MCP-Compatible Client
Point your client at the Streamable HTTP endpoint:
| Setting | Value |
|---|---|
| Endpoint URL | http://169.254.42.1/mcp (USB) or https://169.254.42.1:8443/mcp (TLS) |
| Transport | Streamable HTTP (POST JSON-RPC 2.0) |
| Protocol Version | 2025-11-25 |
| Auth | None required for Observe + Memory groups |
MCP Handshake Sequence
Every MCP session follows this 3-step flow:
# Step 1: Initialize (get server capabilities) POST /mcp {"jsonrpc":"2.0","method":"initialize","id":1, "params":{"protocolVersion":"2025-11-25", "clientInfo":{"name":"my-app","version":"1.0"}}} # Step 2: Confirm initialization POST /mcp {"jsonrpc":"2.0","method":"notifications/initialized"} # Step 3: Use tools, resources, or prompts POST /mcp {"jsonrpc":"2.0","method":"tools/call","id":2, "params":{"name":"seed.status.get","arguments":{}}}
Or send all three as a JSON array batch in a single POST.
Available Capabilities
| Capability | Methods | Count |
|---|---|---|
| Tools | tools/list, tools/call | 12 tools in 6 groups |
| Resources | resources/list, resources/read, resources/subscribe | 4 static + 3 templates |
| Prompts | prompts/list, prompts/get | 3 guided prompts |
| Tasks | tasks/list, tasks/get, tasks/cancel | Async tool execution |
| Logging | logging/setLevel | Runtime log control |
Example: Query Vectors from Claude
Once configured, Claude can use natural language:
# User: "Search the seed for vectors similar to [0.1, 0.2, ...]" # Claude calls: seed.memory.query with {"query":[0.1,0.2,...], "k":10} # User: "What's the device status?" # Claude calls: seed.status.get # User: "Diagnose this seed" # Claude uses prompt: seed_diagnose
WiFi Access (SSH Tunnel)
If connecting over WiFi instead of USB, tunnel MCP through SSH for security:
ssh -L 8444:127.0.0.1:8444 genesis@cognitum.local
Then point your MCP client at http://localhost:8444/mcp.
Sensor Subsystem (ADR-041)
The sensor loop samples 6 channels at 10 Hz, producing 45-dimensional embeddings. The pipeline flows: raw samples → sliding window → feature extraction (5 stats per channel + pairwise cross-correlations) → HD gate (1024-bit hyperdimensional hash for anomaly screening) → drift detection (Page-Hinkley + ADWIN + Reservoir ESN) → reflex arc (sensor-to-actuator rules).
Embedding Dimensions
For C channels, the embedding has 5C + C*(C-1)/2 dimensions:
| Component | Count (6 channels) | Description |
|---|---|---|
| Mean | 6 | Average value per channel |
| Std Dev | 6 | Variability per channel |
| Min | 6 | Minimum in window |
| Max | 6 | Maximum in window |
| Slope | 6 | Trend direction per channel |
| Cross-correlations | 15 | All C*(C-1)/2 pairwise correlations |
| Total | 45 |
Drift Detection
Three independent detectors run simultaneously. An alarm fires when any detector triggers:
| Detector | What It Detects | Speed |
|---|---|---|
| Page-Hinkley | Mean shift (gradual) | Slow, stable |
| ADWIN | Distribution change | Adaptive window |
| Reservoir ESN | Nonlinear drift (64 neurons) | Fast, sensitive |
Available Drivers
| Driver | Channels | Interface | Notes |
|---|---|---|---|
synthetic | 6 virtual | Software | Default, always available, sine + noise |
bme280 | Temp, humidity, pressure | I2C (0x76/0x77) | Requires physical sensor on GPIO 2/3 |
i2c_adc | 4 analog | I2C | ADS1115 or similar ADC |
spi_adc | 8 analog | SPI | MCP3008 or similar |
gpio_digital | N digital pins | GPIO | Reed switch, button, PIR |
uart_coprocessor | Variable | UART | External MCU forwarding data |
Thermal Governor (ADR-043)
A 1 Hz DVFS governor manages CPU frequency across 4 steps based on SoC temperature, workload demand, and per-chip silicon characterization. The governor runs a 5-step decision pipeline every tick:
- Firmware veto — check for hardware throttle flags
- Thermal ceiling — cap frequency based on temperature zone
- Predictive preemption — if temperature derivative is rising fast, step down early
- Demand target — set frequency based on workload (fragility score, query rate)
- Turbo management — burst scheduler with cooldown
Thermal Zones
| Zone | Range | Governor Action |
|---|---|---|
| Cool | < 55°C | Normal operation, all frequencies allowed |
| Warm | 55–70°C | Caution, step down if temperature rising fast |
| Hot | 70–78°C | Capped at stock (1000 MHz), no boost |
| Critical | ≥ 78°C | Emergency drop to 600 MHz |
Zones use 3°C hysteresis to prevent oscillation at boundaries.
Frequency Steps
| Step | Frequency | Demand Level |
|---|---|---|
| 0 | 600 MHz | Idle — no active queries or ingestion |
| 1 | 1000 MHz | Background — optimizer running, light load |
| 2 | 1200 MHz | Boost — active queries or boundary analysis |
| 3 | 1300 MHz | TurboBurst — time-limited, kNN rebuild or characterization |
Temporal Coherence (ADR-042)
Temporal coherence tracks the structural stability of the vector store over time. Every 10 seconds, the optimizer collects a time slice — a snapshot of the kNN graph's similarity structure. Coherence is computed by comparing adjacent slices: a score of 1.0 means the structure is perfectly stable; 0.0 means complete restructuring between slices.
Phase Boundaries
A phase boundary marks a structural regime change — the point where the vector store's topology shifted significantly (e.g., a burst of new data changed cluster structure). Boundaries must persist across N consecutive recomputes to be reported, preventing false positives from transient noise.
Interpreting Scores
| Score Range | Meaning |
|---|---|
| 0.95 – 1.00 | Highly stable — no structural changes |
| 0.80 – 0.95 | Normal operation — minor drift from new data |
| 0.50 – 0.80 | Active restructuring — significant data changes |
| < 0.50 | Major regime change — topology has fundamentally shifted |
Cognitive Container
The cognitive container runs spectral graph analysis on the kNN graph every 30 seconds. Each tick computes a Spectral Coherence Score (SCS) — a measure of graph connectivity via eigenvalue analysis. It accumulates evidence over time and appends tamper-evident receipts to a secondary witness chain independent of the RVF store's chain.
Dual Witness Chains
| RVF Store Chain | Cognitive Chain | |
|---|---|---|
| Hash | SHA-256 (XOR/add) | SipHash-2-4 |
| Trigger | Every write operation | Every 30s cognitive tick |
| Contents | Vector IDs, epoch | SCS score, evidence, graph edges |
| Bridge | Sentinel metadata entries cross-reference receipt hashes between chains | |
Memory Budget
The container uses a 512 KB memory slab (reduced from the default 4 MB for the Seed's 512 MB RAM). Max retained receipts: 1000. Both are configurable via PUT /api/v1/cognitive/config.
Import / Export
Import .rvf files from the filesystem (placed via SCP or USB) or export the current store. Import validates dimension match (rejects with 409 on mismatch) and deduplicates by content hash. The Seed's 64 KB HTTP body limit means large files must be placed on the filesystem first, then imported by path.
How-To: Ingest Vectors
Ingest vectors via the JSON API or by importing .rvf files.
API Ingest (small batches)
Send vectors as [id, [f32...]] pairs. The array length must match the store dimension (default 8). IDs are u64; use 0 for auto-generated content-hash IDs.
# Single vector curl -sk -X POST https://169.254.42.1:8443/api/v1/store/ingest \ -H 'Content-Type: application/json' \ -d '{"vectors":[[1,[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8]]]}' # Batch of 3 vectors with content-hash dedup curl -sk -X POST https://169.254.42.1:8443/api/v1/store/ingest \ -d '{"vectors":[[0,[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8]],[0,[0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2]],[0,[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]]],"dedup":true}'
File Import (large datasets)
# 1. Copy .rvf file to the Seed scp my-data.rvf genesis@169.254.42.1:~/ # 2. Import via API (reads from filesystem) curl -sk -X POST https://169.254.42.1:8443/api/v1/store/import \ -d '{"path":"/home/genesis/my-data.rvf"}' # 3. Check result curl -sk https://169.254.42.1:8443/api/v1/store/status
Python Client Example
import requests, json, urllib3 urllib3.disable_warnings() # skip if trust cert installed BASE = "https://169.254.42.1:8443/api/v1" TOKEN = "<your-bearer-token-from-pairing>" HEADERS = {"Authorization": f"Bearer {TOKEN}"} # Ingest vectors (requires auth) vectors = [[i, [float(j)/8 for j in range(8)]] for i in range(100)] r = requests.post(f"{BASE}/store/ingest", json={"vectors": vectors}, headers=HEADERS, verify=False) print(r.json()) # {"ingested": 100, "epoch": ...} # Query (read-only, no auth required) r = requests.post(f"{BASE}/store/query", json={"vector": [0.1]*8, "k": 5}, verify=False) for hit in r.json()["results"]: print(f"ID {hit['id']}: distance={hit['distance']:.4f}")
How-To: Change Vector Dimension
The store dimension is set by the first ingested vector and cannot be changed without resetting the store. All subsequent vectors must match this dimension.
Setting the Dimension
- Fresh store — the first ingest sets the dimension. If you ingest an 8-dim vector, the store is 8-dim forever (until reset).
- Dimension mismatch — if you ingest a vector with the wrong dimension, you get a
400error:"dimension mismatch: expected 8, got 16". - Import mismatch — importing an
.rvffile with a different dimension returns409 Conflict.
Resetting to a New Dimension
# 1. SSH into the Seed ssh genesis@169.254.42.1 # 2. Stop the agent sudo systemctl stop cognitum-agent # 3. Remove the store file (WARNING: deletes all vectors) sudo rm /var/lib/cognitum/rvf-store/*.rvf # 4. Restart sudo systemctl start cognitum-agent # 5. Ingest with your new dimension (e.g., 128-dim) curl -sk -X POST https://169.254.42.1:8443/api/v1/store/ingest \ -d '{"vectors":[[1,[0.1,0.2,...128 values...]]]}'
How-To: Add Real Sensors
The default configuration uses 6 synthetic (software) channels. To add real hardware sensors, wire them to the Seed's GPIO header and update the sensor configuration.
Example: BME280 (Temperature + Humidity + Pressure)
- Wire the sensor to the I2C bus: VCC → 3.3V (pin 1), GND → GND (pin 6), SDA → GPIO 2 (pin 3), SCL → GPIO 3 (pin 5).
- Enable I2C on the Pi:
sudo raspi-config→ Interface Options → I2C → Enable. - Verify detection:
i2cdetect -y 1should show the BME280 at address0x76or0x77. - Update sensor config via the API (requires pairing):
curl -sk -X PUT https://169.254.42.1:8443/api/v1/sensor/embedding/config \ -H 'Content-Type: application/json' \ -d '{"drivers":[{"type":"bme280","bus":1,"address":"0x76"}]}'
- Verify readings:
GET /api/v1/sensor/streamshould show real temperature, humidity, and pressure values instead of synthetic sine waves.
Example: GPIO Digital (Reed Switch / PIR)
- Wire: connect the switch between a GPIO pin (e.g., GPIO 17, pin 11) and GND. The internal pull-up provides the high state.
- Configure: add a
gpio_digitaldriver entry with the pin number. - Read:
GET /api/v1/sensor/gpio/pinsshows pin states.
How-To: Configure Reflex Rules
Reflex rules define automatic sensor-to-actuator responses. When a trigger condition is met, the reflex arc fires the specified actuator action. Rules have priorities and cooldown periods to prevent rapid-fire toggling.
Rule Structure
{
"name": "high-temp-alert",
"trigger": {
"type": "threshold", // threshold | drift | fragility
"channel": "temperature",
"op": "gt", // gt | lt | eq
"value": 60.0
},
"action": {
"type": "fire", // fire | release | pwm
"actuator": 0
},
"cooldown_ms": 5000,
"priority": 1 // lower = higher priority
}
Trigger Types
| Type | Fires When |
|---|---|
threshold | A sensor channel exceeds or drops below a value |
drift | Any drift detector fires (PH, ADWIN, or ESN) |
fragility | kNN graph fragility exceeds a threshold (0.0–1.0) |
Update rules via PUT /api/v1/sensor/reflex/rules (requires pairing). Safety-first: fragility checks run before boundary analysis to prevent cascading failures.
How-To: Silicon Characterization
Each Pi chip is slightly different. Silicon characterization tests your specific chip to find its maximum stable overclock frequency.
- Trigger characterization:
POST /api/v1/thermal/characterize(requires pairing). This takes ~30 seconds. - The test runs boundary analysis 10 times at each frequency step [600, 1000, 1200, 1300 MHz] and compares SHA-256 hashes of the partition results.
- If all 10 runs produce identical hashes at a frequency, that step is marked stable.
- The governor's max frequency is automatically capped at the highest stable step.
- View results:
GET /api/v1/thermal/silicon-profileshows pass/fail per step.
How-To: Export & Backup
Export via API
# Export store to a file on the Seed curl -sk -X POST https://169.254.42.1:8443/api/v1/store/export \ -d '{"path":"/tmp/backup.rvf"}' # Download it to your computer scp genesis@169.254.42.1:/tmp/backup.rvf ./backup.rvf
Full Sync (all live vectors)
# Pull all vectors as JSON
curl -sk https://169.254.42.1:8443/api/v1/store/sync > vectors.json
SD Card Image
# On the Pi: zero free space for better compression sudo dd if=/dev/zero of=/tmp/zero bs=4M 2>/dev/null; sudo rm /tmp/zero # On your computer: image the SD card # (replace sdX with your SD card device) sudo dd if=/dev/sdX bs=4M status=progress | gzip > cognitum-backup.img.gz
File Transfer
Upload RVF vector files or download the current store. The Seed accepts uploads up to 64 KB via HTTP; for larger files, use the SCP workflow below.
Ingest Vectors via JSON
Paste vector data as JSON arrays. Each vector is [id, [f32...]]. Use 0 for auto-generated content-hash IDs.
Download Store as JSON
Export all live vectors from the store as a JSON file for backup or transfer to another Seed.
SCP Commands for Large Files
For files larger than 64 KB, copy them to the Seed via SCP and then import via the API.
Generated commands:
# 1. Copy file to Seed scp my-data.rvf genesis@169.254.42.1:/home/genesis/ # 2. Import via API curl -sk -X POST https://169.254.42.1:8443/api/v1/store/import \ -H 'Content-Type: application/json' \ -d '{"path":"/home/genesis/my-data.rvf"}' # 3. Verify curl -sk https://169.254.42.1:8443/api/v1/store/status
Store Operations
Query, inspect, and manage the vector store directly from this page.
k-NN Similarity Search
Vector Lookup by ID
Delete Vectors
Store Maintenance
Compact Store
Rewrite RVF excluding deleted vectors. Reclaims disk space.
Store Status
Vector count, epoch, dimension, file size.
Graph Health
kNN graph: nodes, edges, orphans, avg degree.
View Deleted
List tombstoned vector IDs.
Configuration
View and update device configuration. Write operations require pairing.
Thermal Governor
Click to loadTemporal Coherence
Click to loadCognitive Container
Click to loadSensor Pipeline
Click to loadCurrent sensor configuration (read-only view). Use PUT /api/v1/sensor/embedding/config for updates.
Device Management
Monitor and control device operations. Destructive actions require pairing and confirmation.
Quick Actions
Device Status
ID, uptime, vectors, epoch, paired state
Identity
UUID, Ed25519 public key, firmware version
Security Status
Auth, protections, boot integrity
Firmware Slots
A/B slot info, boot count, rollback state
Optimization
Optimizer Status
Loop state, cycle count, last run
Force Optimize
Trigger immediate optimization cycle
Recompute Boundary
Force fresh Stoer-Wagner min-cut analysis
Force Cognitive Tick
Immediate spectral analysis + receipt
Thermal & Characterization
Thermal State
Temperature, zone, frequency, throttle flags
Session Stats
Zone/freq distribution, transitions, peak temp
Silicon Characterize
Test each freq step for stability (~30s)
Turbo Burst
Request temporary turbo boost
Witness & Custody
Witness Chain
View the tamper-evident hash chain
Verify Chain
End-to-end integrity check
Boot Attestation
Signed proof of device identity
Firmware Version
Running version and build target
Core API Endpoints (30)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/status | Device status: ID, uptime, vectors, epoch, dimension, paired |
| GET | /api/v1/identity | Device UUID, Ed25519 public key, firmware version |
| GET | /api/v1/pair/status | Pairing state and window countdown |
| POST | /api/v1/pair | Pair this client (requires open window), returns bearer token |
| POST | /api/v1/pair/window | Open 30s pairing window (localhost only) |
| GET | /api/v1/pair/clients | List paired clients (name, created_at, last_seen) |
| DELETEAUTH | /api/v1/pair/{client_name} | Unpair a client (self-unpair, requires bearer token) |
| GET | /api/v1/store/status | Store statistics: vector count, size, epoch, dimension |
| POSTAUTH | /api/v1/store/ingest | Batch ingest vectors (JSON body, optional dedup) |
| POST | /api/v1/store/query | k-NN similarity search (cosine/l2/dot, metadata filter) |
| POSTAUTH | /api/v1/store/delete | Soft-delete vectors by ID |
| GET | /api/v1/store/sync | Pull all live vectors for replication |
| POSTAUTH | /api/v1/store/sync | Push vectors from another store |
| GET | /api/v1/witness/chain | View the witness hash chain |
| POST | /api/v1/witness/verify | Verify chain integrity end-to-end |
| GET | /api/v1/profiles | List named optimization profiles |
| POSTAUTH | /api/v1/profiles | Create a new profile |
| GET | /api/v1/custody/epoch | Current monotonic epoch counter |
| GET | /api/v1/custody/attestation | Signed boot attestation (Ed25519) |
| GET | /api/v1/custody/proof-stats | Proof-gated operation statistics (tier counts, cache hits) |
| POSTAUTH | /api/v1/custody/witness | Append a manual witness entry |
| POSTAUTH | /api/v1/custody/sign | Sign arbitrary data with Ed25519 device key |
| POST | /api/v1/custody/verify | Verify an Ed25519 signature |
| GET | /api/v1/optimize/status | Background optimizer loop state |
| POSTAUTH | /api/v1/optimize/trigger | Force immediate optimization cycle |
| GET | /api/v1/optimize/metrics | Compaction and rebuild statistics |
| GET | /api/v1/boundary | Structural fragility, min-cut, partitions, boundary hash |
| POSTAUTH | /api/v1/boundary/recompute | Force fresh boundary analysis |
| GET | /api/v1/delivery/image | Delivery image metadata for export |
| GET | /api/v1/demo/coherence | Quick coherence health check |
| POST | /api/v1/demo/ingest-sample | Ingest 100 random sample vectors |
Store v2 API Endpoints (9)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/store/vectors/{id} | O(1) lookup: vector data, metadata, slot, deletion status |
| PUTAUTH | /api/v1/store/vectors/{id}/metadata | Update metadata without re-ingesting the vector |
| DELETEAUTH | /api/v1/store/vectors | Batch delete (alias of POST /store/delete) |
| POSTAUTH | /api/v1/store/compact | Manual compaction: rewrite RVF excluding deleted |
| GET | /api/v1/store/deleted | List tombstoned vector IDs |
| GET | /api/v1/store/graph/stats | kNN graph health: nodes, edges, avg degree, orphans |
| GET | /api/v1/store/graph/neighbors/{id} | k=16 nearest neighbors with similarity scores |
| GET | /api/v1/delta/stream | Current store snapshot: epoch, vectors, witness head |
| GET | /api/v1/delta/history | Full delta history since boot |
Sensor API Endpoints (17)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/sensor/list | Active sensors: names, drivers, health |
| GET | /api/v1/sensor/latest/{name} | Latest reading from a named sensor |
| GET | /api/v1/sensor/stream | All channel readings: raw, normalized, quality code |
| GET | /api/v1/sensor/store/status | Sensor embedding store metrics |
| GET | /api/v1/sensor/gpio/pins | GPIO pin layout and assignments |
| GET | /api/v1/sensor/embedding/latest | Latest 45-dim embedding vector |
| GET | /api/v1/sensor/embedding/config | Embedding pipeline configuration |
| PUTAUTH | /api/v1/sensor/embedding/config | Update embedding config |
| GET | /api/v1/sensor/drift/status | Drift detection: PH + ADWIN + ESN state |
| GET | /api/v1/sensor/drift/history | Recent drift events ring buffer |
| GET | /api/v1/sensor/actuators | Actuator outputs: state, duty cycle, events |
| POSTAUTH | /api/v1/sensor/actuator/fire/{n} | Fire actuator N |
| GET | /api/v1/sensor/reflex/rules | Reflex arc rules: triggers and actions |
| PUTAUTH | /api/v1/sensor/reflex/rules | Update reflex rules |
| GET | /api/v1/sensor/coprocessor/status | HD gate coprocessor: baseline, threshold, stats |
| GET | /api/v1/sensor/coprocessor/latest | Latest coprocessor reading |
| GET | /api/v1/sensor/config | Full sensor subsystem configuration |
Thermal API Endpoints (13)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/thermal/state | Temperature, zone, frequency, derivative, throttle flags |
| GET | /api/v1/thermal/governor | Governor decision: demand, target, ceiling, turbo state |
| GET | /api/v1/thermal/telemetry | Per-tick telemetry ring buffer |
| GET | /api/v1/thermal/silicon-profile | Per-chip characterization results |
| GET | /api/v1/thermal/accuracy | Boosted vs baseline mismatch tracker |
| GET | /api/v1/thermal/dvfs-profile | Learned voltage/stability profile |
| GET | /api/v1/thermal/turbo | Turbo burst scheduler state |
| GET | /api/v1/thermal/coherence | Frequency/phase boundary correlation test |
| GET | /api/v1/thermal/config | Governor config parameters |
| GET | /api/v1/thermal/stats | Session statistics: zone/freq distribution |
| PUTAUTH | /api/v1/thermal/config | Update governor parameters |
| POSTAUTH | /api/v1/thermal/characterize | Run silicon characterization (~30s) |
| POSTAUTH | /api/v1/thermal/boost | Manual turbo burst request |
Coherence API Endpoints (5)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/coherence/profile | Current temporal coherence score and slice count |
| GET | /api/v1/coherence/profile/history | Last 10 profiles (ring buffer) |
| GET | /api/v1/coherence/phases | Detected phase boundaries with persistence count |
| GET | /api/v1/coherence/orphans | Vectors with no kNN connections |
| PUTAUTH | /api/v1/coherence/config | Update temporal parameters |
Cognitive API Endpoints (7)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/cognitive/status | Epoch, tick count, SCS, chain validity |
| GET | /api/v1/cognitive/snapshot | Full container snapshot (edges, evidence, SCS) |
| GET | /api/v1/cognitive/witness | Latest receipt + chain verification |
| GET | /api/v1/cognitive/witness/chain | All retained receipts (up to 1000) |
| POSTAUTH | /api/v1/cognitive/tick | Force immediate cognitive tick |
| GET | /api/v1/cognitive/config | Container configuration |
| PUTAUTH | /api/v1/cognitive/config | Update container configuration |
Import / Export Endpoints (3)
| Method | Path | Description |
|---|---|---|
| POSTAUTH | /api/v1/store/import | Import .rvf from filesystem path (validates dim) |
| POSTAUTH | /api/v1/store/export | Export store as .rvf to filesystem path |
| GET | /api/v1/store/import/formats | Supported formats and dimension info |
Security & Firmware Endpoints (8)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/security/status | Auth method, protections, witness algorithm, build key status |
| GET | /api/v1/security/build-key | Build key configuration and public key hex |
| GET | /api/v1/firmware/status | A/B slot info, boot count, rollback state |
| POSTAUTH | /api/v1/firmware/update | Ed25519-verified OTA update (X-Signature header or inline sig) |
| GET | /api/v1/boot/measurements | Measured boot chain hashes (ADR-045 Software TEE) |
| GET | /api/v1/wifi/status | WiFi connection state and saved networks |
| GET | /api/v1/wifi/scan | Scan for available WiFi networks (calls nmcli) |
| POSTAUTH | /api/v1/wifi/connect | Connect to WiFi network (ssid + password in JSON body) |
Sync & Swarm Endpoints (10)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/store/sync?since_epoch=N | Delta pull — returns only vectors/deletions since epoch N |
| POSTAUTH | /api/v1/store/sync | Delta push — ingest vectors + apply deletions from peer |
| GET | /api/v1/sync/delta | ADR-040 delta pull — vectors/deletions since given epoch |
| POSTAUTH | /api/v1/sync/delta | ADR-040 delta push — send vectors + deletions to peer |
| GET | /api/v1/peers | List known multi-seed peers with last-seen timestamps |
| POSTAUTH | /api/v1/peers/sync | Push vector sync to a peer seed |
| GET | /api/v1/swarm/status | Peer count, discovery state, current epoch |
| GET | /api/v1/swarm/peers | List known peers (alias for /peers) |
| GET | /api/v1/sync/stats | Delta sync bandwidth metrics (vectors sent/received, bytes) |
| GET | /api/v1/cluster/health | Cluster status: peer count, sync age, discovery state |
Delta Sync Example
# Pull only changes since epoch 50 curl -sk "https://169.254.42.1:8443/api/v1/store/sync?since_epoch=50" # Response: {"is_delta":true, "vectors":[...], "deletions":[12,45], "current_epoch":73} # Push changes to peer curl -sk -X POST https://169.254.42.1:8443/api/v1/store/sync \ -H "Content-Type: application/json" \ -d '{"vectors":[[1,[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8]]],"deletions":[99],"source_device_id":"peer-uuid","source_epoch":30}'
MCP Tools — 114 Tools, 21 Groups (ADR-058)
All MCP communication uses JSON-RPC 2.0 via POST /mcp. Session must be initialized before calling tools. Scope controls how many tools are advertised.
| Method | Endpoint | Description |
|---|---|---|
| POST | initialize | Start session with scope negotiation (experimental.cognitum.toolScope) |
| POST | tools/list | List tools (scope-filtered) with annotations: authClass, readOnlyHint, destructiveHint |
| POST | tools/call | Call a tool by name. Auth class enforced. Audit trail for mutations. |
| POST | resources/list, resources/read | 4 resources (status, store, witness, thermal) |
| POST | prompts/list, prompts/get | 3 guided prompts (diagnose, gpio setup, run kernel) |
| POST | tasks/list, tasks/get, tasks/cancel | Async task management |
Group A: Guide (6 tools) -- public, always available
| Tool | Auth | Description |
|---|---|---|
seed.guide.overview | public | System overview: architecture, capabilities, all groups |
seed.guide.groups | public | List tool groups with counts and auth tiers |
seed.guide.endpoints | public | List endpoints by group with params, auth, examples |
seed.guide.search | public | Search tools by keyword across all groups |
seed.guide.explain | public | Explain concepts: witness chain, RVF, DVFS, NCM, etc. |
seed.guide.tutorials | public | Step-by-step workflows: pair, query, ingest, gpio, ota, etc. |
Group B: Device (5 tools)
| Tool | Auth | Endpoint | Description |
|---|---|---|---|
seed.device.status | public | GET /api/v1/status | Hardware, firmware, uptime, store stats |
seed.device.identity | paired | GET /api/v1/identity | UUID, public key, cert fingerprint |
seed.device.security | paired | GET /api/v1/security/status | Security posture: TLS, auth, rate limits |
seed.device.build_key | paired | GET /api/v1/security/build-key | Build key status |
seed.device.cluster_health | paired | GET /api/v1/cluster/health | Cluster health (multi-seed) |
Groups C-D: Witness (3) + Custody (6)
| Tool | Auth | Description |
|---|---|---|
seed.witness.chain | paired | Get witness chain entries |
seed.witness.verify | paired | Verify a witness entry |
seed.witness.get | paired | Single-entry lookup by witnessId |
seed.custody.epoch | paired | Current custody epoch |
seed.custody.attestation | paired | Attestation report |
seed.custody.proof_stats | paired | Proof chain statistics |
seed.custody.witness | privileged | Create custody witness |
seed.custody.sign | privileged | Sign data with device key |
seed.custody.verify | paired | Verify custody signature |
Groups E-G: Memory (2) + RVF (5) + Store (12)
| Tool | Auth | Description |
|---|---|---|
seed.memory.query | paired | Semantic search with filters, witness tracking |
seed.memory.upsert | privileged | Insert/update vectors |
seed.rvf.container.list | paired | List RVF containers |
seed.rvf.kernel.list | paired | List available kernels |
seed.rvf.kernel.call | privileged* | Execute kernel (escalates to dangerous for mutating) |
seed.rvf.explore | public | Explore RVF internals by aspect |
seed.rvf.inspect | paired | Inspect RVF entry: binary header, witness, metadata |
seed.store.* (12) | mixed | status, ingest, delete, query, compact, deleted, graph_stats, sync_pull/push, import, export, import_formats |
Groups H-K: Sensor (17) + Thermal (13) + Coherence (5) + Cognitive (7)
| Tool | Auth | Description |
|---|---|---|
seed.sensor.* (17) | mixed | list, gpio_pins/read/write, stream, embeddings, drift, actuators, reflex rules, coprocessor, config |
seed.thermal.* (13) | mixed | state, governor, telemetry, silicon profile, characterize, accuracy, DVFS, turbo, boost, coherence, config, stats |
seed.coherence.* (5) | mixed | profile, history, phases, orphans, config |
seed.cognitive.* (7) | mixed | status, snapshot, witness, witness_chain, tick, config_get, config_set |
Groups L-N: Pair (4) + Firmware (6) + WiFi (3) -- dangerous
| Tool | Auth | Description |
|---|---|---|
seed.pair.* (4) | dangerous | status, clients, initiate, window |
seed.firmware.* (6) | dangerous | status, update, upgrade_status/check/apply, boot_measurements |
seed.wifi.* (3) | dangerous | status, scan, connect |
Groups P-U: Swarm (5) + Optimize (3) + Boundary (2) + Delta (4) + Delivery (1) + Admin (5)
| Tool | Auth | Description |
|---|---|---|
seed.swarm.* (5) | paired | status, peers.list/detail/sync, sync_stats |
seed.optimize.* (3) | mixed | status, trigger, metrics |
seed.boundary.* (2) | mixed | get, recompute |
seed.delta.* (4) | paired | stream, history, sync_pull, sync_push |
seed.delivery.image | paired | Get delivery image |
seed.admin.* (5) | dangerous | build_key_provision, profiles_list/create, demo_coherence/ingest |
Wire Format
# Request (using canonical tool name): {"jsonrpc":"2.0","method":"tools/call","id":3,"params":{"name":"seed.device.status","arguments":{}}} # Response (with annotations): {"jsonrpc":"2.0","result":{"content":[{"type":"text","text":"{\"deviceId\":\"...\",\"uptimeSecs\":120,...}"}]},"id":3} # Auth denied (wrong auth class): {"jsonrpc":"2.0","error":{"code":-32001,"message":"Auth class 'dangerous' required","data":{"tool":"seed.firmware.update","requiredAuthClass":"dangerous"}},"id":4}
Headers
| Header | Direction | Description |
|---|---|---|
X-MCP-Session | Response | Session ID (SHA-256 of device ID + timestamp) |
Origin | Request | Validated for DNS rebinding protection. Allowed: localhost, 169.254.42.1, cognitum.local, file:// |
Upgrade & Other Endpoints (2)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/upgrade/status | Running firmware version and build target |
| POSTAUTH | /api/v1/upgrade/apply | Upload new binary (octet-stream body) |
| GET | /api/v1/upgrade/check | Remote update check (version, build-key status, OTA methods, network) |
Hardware
| Component | Specification |
|---|---|
| SoC | Quad-core Cortex-A53 @ 1 GHz (overclockable to 1.3 GHz) |
| RAM | 512 MB LPDDR2 |
| WiFi | 2.4 GHz 802.11b/g/n |
| Bluetooth | BLE 4.2 |
| USB | 1x Micro-USB OTG (data), 1x Micro-USB (power only) |
| GPIO | 40-pin header (I2C, SPI, UART) |
| Storage | microSD (16-32 GB recommended) |
GPIO Pin Assignments
| Pin | GPIO | Function |
|---|---|---|
| 3, 5 | 2, 3 | I2C SDA/SCL (sensor expansion) |
| 8, 10 | 14, 15 | UART TX/RX (serial console / coprocessor) |
| 11 | 17 | Status LED (heartbeat) |
| 13 | 27 | Factory reset button (hold 10s) |
| 19, 21, 23, 24 | 10, 9, 11, 8 | SPI (sensor expansion) |
Performance Benchmarks (20k vectors, dim=8)
| Metric | Value |
|---|---|
| Binary size | 2.27 MB (stripped ARM ELF) |
| RSS memory | 7.5 MB (20k vectors + sensor + temporal) |
| API response (avg) | 54 ms (TLS) |
| k-NN query (k=10) | 85 ms |
| Ingest 100 vectors | 84 ms |
| kNN graph rebuild (20k, k=16) | 72 s (batched, API stays responsive) |
| Startup (20k replay) | < 1 s |
Security
| Layer | Mechanism |
|---|---|
| Transport | TLS 1.2+ with device-specific certificate (trust installer on USB drive); mTLS auto-enabled when client CA exists |
| Authentication | Pairing token (persistent across reboots) + GCRA rate limiter with auth-failure blocking |
| Signing | Ed25519 device key (ring library, no OpenSSL) |
| Witness chain | SHA-256 cryptographic hash chain (backward-compatible with legacy XOR/add) |
| OTA firmware | Ed25519 signature verification — detached (X-Signature header) or inline (X-Signed: true) |
| Build key | Auto-loaded from /var/lib/cognitum/tls/build-key.pub or ./build-key.pub |
| Root filesystem | Squashfs (structurally immutable) |
| Process isolation | systemd hardening (NoNewPrivileges, ProtectSystem) + seccomp-BPF syscall filter |
| Path validation | Canonicalize + allowlist prevents directory traversal |
| Sleep prevention | 5-layer USB keep-alive (kernel, gadget, watchdog, keepalive, masked sleep) |
| Anomaly detection | HD Gate + drift detection + temporal fingerprint |
| Sync | Epoch-based delta sync — only changed vectors/deletions transferred |
Witness Chain Verification
Every store mutation (ingest, delete, compact, metadata update) appends a SHA-256 witness hash: SHA-256(prev_hash || entry_data). The chain is tamper-evident — flipping any byte in any entry breaks all subsequent hashes.
# Verify the full witness chain curl -sk -X POST https://169.254.42.1:8443/api/v1/witness/verify # {"valid":true, "algorithm":"sha256", "head":"a1b2c3...", "entries_verified":20000}
OTA Firmware Verification
When a build key is configured, firmware updates require a valid Ed25519 signature. Two modes are supported:
# Mode 1: Detached signature (X-Signature header, hex-encoded) curl -sk -X POST https://169.254.42.1:8443/api/v1/firmware/update \ -H "X-Signature: a1b2c3d4..." \ --data-binary @cognitum-agent # Mode 2: Inline signature (last 64 bytes of body) cat cognitum-agent signature.bin | \ curl -sk -X POST https://169.254.42.1:8443/api/v1/firmware/update \ -H "X-Signed: true" \ --data-binary @-
mTLS Auto-Enable
If a client CA certificate exists at the well-known path, mTLS is automatically enabled in optional mode. No flag needed.
# Production: /var/lib/cognitum/tls/client-ca.pem # Virtual: ./client-ca.pem # Check mTLS status curl -sk https://169.254.42.1:8443/api/v1/security/status | jq .mtls_active
Getting Files Onto the Seed
The USB drive (COGNITUM) is read-only. Use these methods to transfer files:
SCP (Secure Copy)
# Over USB scp myfile.rvf genesis@169.254.42.1:~/ # Over WiFi scp myfile.rvf genesis@cognitum.local:~/
Typical Import Workflow
# 1. Copy .rvf file to the Seed scp data.rvf genesis@169.254.42.1:~/ # 2. Import via API curl -sk -X POST https://169.254.42.1:8443/api/v1/store/import \ -H "Content-Type: application/json" \ -d '{"path": "/home/genesis/data.rvf"}' # 3. Verify curl -sk https://169.254.42.1:8443/api/v1/store/status
-H 'Authorization: Bearer <token>'.WiFi Setup
Configure WiFi to access the Seed wirelessly from any device on your network.
Browser Setup (when connected via USB)
SSH Setup
# Connect to WiFi sudo nmcli device wifi connect "YourNetwork" password "YourPassword" # Verify and note IP ip -4 addr show wlan0 | grep inet # Add multiple networks (auto-connects to whichever is available) sudo nmcli device wifi connect "Office-WiFi" password "officepass" # List / remove saved networks nmcli connection show sudo nmcli connection delete "Office-WiFi"
Manage Saved Networks
WiFi credentials persist across firmware updates (stored on the data partition). The Seed does not bridge USB and WiFi traffic (network isolation).
Firmware Updates
The Seed uses A/B slot partitioning. Updates write to the inactive slot. If the API doesn't respond within 30 seconds after reboot, the boot guard rolls back automatically after 3 failed attempts.
Quick Deploy (binary only)
# Stop, copy, restart ssh genesis@cognitum.local "sudo systemctl stop cognitum-agent" scp cognitum-agent genesis@cognitum.local:~/ ssh genesis@cognitum.local \ "sudo cp ~/cognitum-agent /opt/cognitum/cognitum-agent && \ sudo chmod 755 /opt/cognitum/cognitum-agent && \ sudo systemctl start cognitum-agent"
Partition Layout
| Partition | Type | Size | Purpose |
|---|---|---|---|
| p1 (boot) | FAT32 | 128 MB | Kernel, DTB, boot config |
| p2 (slot-a) | squashfs | 300 MB | Root filesystem |
| p3 (slot-b) | squashfs | 300 MB | OTA alternate root |
| p4 (data) | ext4 | Remaining | Vectors, keys, configs, logs |
Troubleshooting
Device not detected via USB
Use the USB data port (not power-only). Check for the COGNITUM drive. If USB Ethernet doesn't appear, SSH via WiFi and check: cat /sys/kernel/config/usb_gadget/cognitum/UDC (should show 3f980000.usb).
401 Unauthorized / 403 Forbidden on write endpoints
401: Missing or invalid bearer token. Go to Pairing and pair your client. The guide saves the token to localStorage automatically. For CLI, include -H 'Authorization: Bearer <token>'.
403: The pairing window is not open, or the request did not come from the USB interface. Open the window first with POST /api/v1/pair/window.
TLS certificate warning
The Seed uses a device-specific certificate. You have two options:
- Install the trust certificate (recommended) — open the
COGNITUMUSB drive and run the installer in thetrust/folder:- Windows:
trust/install-trust.bat - macOS:
trust/install-trust.command - Linux:
bash trust/install-trust.sh
- Windows:
- Skip the installer — use
-kwith curl,verify=Falsein Python, or click "Advanced → Proceed" in your browser.
409 on import
The .rvf file has a different vector dimension than the store. Check with GET /api/v1/store/import/formats. To change dimension, see How-To: Change Dimension.
Sensor endpoints return 404
Sensor endpoints require the optimizer loop to be running. In --virtual mode (localhost dev), only core + thermal endpoints are available. Deploy to Pi or run without --virtual.
Device goes to sleep
Check that g_ether is not loaded: lsmod | grep g_ether. If loaded, blacklist it and reboot.
Recovery
Hold the factory reset button (GPIO 27) for 10+ seconds to wipe data and regenerate identity. Or use Raspberry Pi Connect for remote access.