Cognitum Seed — User Guide
Not connected

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.

  1. Plug in via USB data port (not the power port). Three interfaces appear: a COGNITUM USB drive, a USB Ethernet adapter, and mDNS at cognitum.local.
  2. Install the trust certificate (optional but recommended). Open the COGNITUM USB drive and run the installer in the trust/ 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
    This adds the Seed's certificate to your system trust store so browsers and tools connect without warnings. You can skip this and accept the certificate manually instead.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
Try it — Ingest 100 sample vectors
curl -sk -X POST https://169.254.42.1:8443/api/v1/demo/ingest-sample
Click "Run" to ingest 100 sample vectors...

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:

InterfaceWhat You SeeUse
USB DriveCOGNITUM FAT32 driveThis guide, launchers, and trust/ certificate installer
USB EthernetNetwork adapter (RNDIS / ECM)API, SSH, SFTP at 169.254.42.1
mDNScognitum.localFriendly hostname for SSH and API
Try it — Check device status
curl -sk https://169.254.42.1:8443/api/v1/status
Click "Run" to test connectivity...

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

OSUSB EthernetUSB DrivemDNS
Windows 10/11RNDIS (built-in)Auto-detectedBuilt-in
macOSCDC-ECM (built-in)Auto-detectedBonjour
LinuxCDC-ECM (built-in)Auto-detectedavahi-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

  1. Open pairing windowPOST /api/v1/pair/window opens a 30-second window. This endpoint only accepts requests from the USB interface (localhost / 169.254.42.1).
  2. PairPOST /api/v1/pair with {"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.
  3. Save the token — This guide saves it to localStorage automatically. CLI users must save the token manually; it is shown only once.
  4. Authenticate — Include Authorization: Bearer <token> on every write request. The guide does this automatically.
Try it — Pair your device
# 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]]]}'
Click "Pair" to initiate pairing...
Tip: Once paired, all AUTH endpoints accept your bearer token. Each client has its own token — revoking one does not affect others. Tokens persist across reboots on the server side (/var/lib/cognitum/clients.json).
Important: The token is shown only once at pairing time. If you lose it, you must unpair and re-pair from the USB interface. The guide saves it to localStorage automatically.

Paired Clients

View all clients currently paired with this Seed.

Try it — List paired clients
curl -sk https://169.254.42.1:8443/api/v1/pair/clients
Click "List" to see paired 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:

FieldSizeDescription
Entry type1 byte0x01 = vector, 0x02 = delete, 0x03 = witness, 0x04 = metadata-only
Vector ID8 bytesu64, content-addressed via SHA-256 truncation
Dimension2 bytesu16, number of f32 components (e.g. 8)
Vector datadim * 4 bytesf32 components in little-endian
MetadatavariableOptional 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.
  • CompactionPOST /api/v1/store/compact rewrites 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

VectorsDimensionFile SizeRSS Memory
1,0008~40 KB~3 MB
20,0008~700 KB~7.5 MB
100,0008~3.5 MB~35 MB
20,000128~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

85 ms

k=10, 20k vectors on Pi (TLS)

Ingest

84 ms

100 vectors per batch

Startup

<1 s

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.

Try it — k-NN query
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"}}'
Click "Query" to search...

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.

Try it — Boundary analysis
Click "Get" to fetch boundary report...

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

OperationWitness Entry Contains
IngestVector IDs added, epoch, timestamp
DeleteVector IDs removed, epoch
CompactBytes reclaimed, vectors surviving
Manual witnessCustom event string
Try it — Verify chain integrity
curl -sk -X POST https://169.254.42.1:8443/api/v1/witness/verify
Click "Verify" to check chain integrity...

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

  1. Sign data with POST /api/v1/custody/sign — returns hex-encoded Ed25519 signature + public key.
  2. Verify with POST /api/v1/custody/verify — pass the data, signature, and optionally a public key. Uses the device's own key if omitted.
  3. 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.
Try it — Sign and verify
curl -sk -X POST https://169.254.42.1:8443/api/v1/custody/sign \
  -H 'Content-Type: application/json' -d '{"data":"hello world"}'
Click "Sign" to sign data...

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

ScopeToolsDescription
default24Essential tools for AI assistants (safe reads + query)
full114All canonical tools across 21 groups
minimal1812 legacy v1 tools + 6 guide (backward compat)

Set via capabilities.experimental.cognitum.toolScope in the initialize request.

Auth Classes

ClassPolicyExamples
publicAlways allowedseed.guide.*, seed.device.status
pairedRequires pairingseed.memory.query, seed.store.status
privilegedPairing + grantseed.memory.upsert, seed.thermal.config_set
dangerousGrant + confirmseed.firmware.update, seed.wifi.connect

Tool Groups (21)

Default Scope (24 tools) -- click to expand
GroupTools in DefaultCount
guideoverview, groups, endpoints, search, explain, tutorials6
devicestatus, identity, security, cluster_health4
witnesschain, verify, get3
custodyepoch, attestation, proof_stats3
memoryquery1
rvfcontainer.list, kernel.list2
storestatus1
sensorlist1
swarmstatus, peers.list2
coherenceprofile1
Full Scope -- All 21 Groups (114 tools) -- click to expand
GroupToolsAuth Tier
guide (6)overview, groups, endpoints, search, explain, tutorialspublic
device (5)status, identity, security, build_key, cluster_healthpaired
witness (3)chain, verify, getpaired
custody (6)epoch, attestation, proof_stats, witness, sign, verifymixed
memory (2)query, upsertmixed
rvf (5)container.list, kernel.list, kernel.call, explore, inspectmixed
store (12)status, ingest, delete, query, compact, deleted, graph_stats, sync_pull, sync_push, import, export, import_formatsmixed
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, configmixed
thermal (13)state, governor, telemetry, silicon_profile, characterize, accuracy, dvfs_profile, turbo, boost, coherence, config_get, config_set, statsmixed
coherence (5)profile, history, phases, orphans, configmixed
cognitive (7)status, snapshot, witness, witness_chain, tick, config_get, config_setmixed
pair (4)status, clients, initiate, windowdangerous
firmware (6)status, update, upgrade_status, upgrade_check, upgrade_apply, boot_measurementsdangerous
wifi (3)status, scan, connectdangerous
swarm (5)status, peers.list, peers.detail, peers.sync, sync_statspaired
optimize (3)status, trigger, metricsmixed
boundary (2)get, recomputemixed
delta (4)stream, history, sync_pull, sync_pushpaired
delivery (1)imagepaired
admin (5)build_key_provision, profiles_list, profiles_create, demo_coherence, demo_ingestdangerous

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

Click "Initialize & Get Status" to test MCP...

Try It — MCP Tools List

Click "List Tools" to see MCP tools (scope-dependent)...

Try It — MCP Query Vectors

Click "Query" to search vectors via MCP...

Resources & Prompts

Resources (read via resources/read):

URI PatternDescription
seed://{deviceId}/statusReal-time device status and metrics
rvf://{deviceId}/storeVector store epoch, vectors, dimension
witness://{deviceId}/chainWitness chain head hash and depth
telemetry://{deviceId}/thermalThermal governor state

Prompts (expand via prompts/get):

PromptArgumentsDescription
seed_diagnose(none)Guided health diagnosis: status, witness, thermal, store
seed_safe_gpio_setuppin, directionSafe GPIO pin configuration with policy check
seed_run_kernelkernelIdRun 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:

SettingValue
Endpoint URLhttp://169.254.42.1/mcp (USB) or https://169.254.42.1:8443/mcp (TLS)
TransportStreamable HTTP (POST JSON-RPC 2.0)
Protocol Version2025-11-25
AuthNone 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

CapabilityMethodsCount
Toolstools/list, tools/call12 tools in 6 groups
Resourcesresources/list, resources/read, resources/subscribe4 static + 3 templates
Promptsprompts/list, prompts/get3 guided prompts
Taskstasks/list, tasks/get, tasks/cancelAsync tool execution
Logginglogging/setLevelRuntime 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 samplessliding windowfeature 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:

ComponentCount (6 channels)Description
Mean6Average value per channel
Std Dev6Variability per channel
Min6Minimum in window
Max6Maximum in window
Slope6Trend direction per channel
Cross-correlations15All C*(C-1)/2 pairwise correlations
Total45

Drift Detection

Three independent detectors run simultaneously. An alarm fires when any detector triggers:

DetectorWhat It DetectsSpeed
Page-HinkleyMean shift (gradual)Slow, stable
ADWINDistribution changeAdaptive window
Reservoir ESNNonlinear drift (64 neurons)Fast, sensitive
Try it — Live sensor readings
Click "Get" to fetch sensor readings...

Available Drivers

DriverChannelsInterfaceNotes
synthetic6 virtualSoftwareDefault, always available, sine + noise
bme280Temp, humidity, pressureI2C (0x76/0x77)Requires physical sensor on GPIO 2/3
i2c_adc4 analogI2CADS1115 or similar ADC
spi_adc8 analogSPIMCP3008 or similar
gpio_digitalN digital pinsGPIOReed switch, button, PIR
uart_coprocessorVariableUARTExternal 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:

  1. Firmware veto — check for hardware throttle flags
  2. Thermal ceiling — cap frequency based on temperature zone
  3. Predictive preemption — if temperature derivative is rising fast, step down early
  4. Demand target — set frequency based on workload (fragility score, query rate)
  5. Turbo management — burst scheduler with cooldown

Thermal Zones

ZoneRangeGovernor Action
Cool< 55°CNormal operation, all frequencies allowed
Warm55–70°CCaution, step down if temperature rising fast
Hot70–78°CCapped at stock (1000 MHz), no boost
Critical≥ 78°CEmergency drop to 600 MHz

Zones use 3°C hysteresis to prevent oscillation at boundaries.

Frequency Steps

StepFrequencyDemand Level
0600 MHzIdle — no active queries or ingestion
11000 MHzBackground — optimizer running, light load
21200 MHzBoost — active queries or boundary analysis
31300 MHzTurboBurst — time-limited, kNN rebuild or characterization
Try it — Thermal state
Click "Get" to read thermal...

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 RangeMeaning
0.95 – 1.00Highly stable — no structural changes
0.80 – 0.95Normal operation — minor drift from new data
0.50 – 0.80Active restructuring — significant data changes
< 0.50Major regime change — topology has fundamentally shifted
Try it — Coherence profile
Click "Get" to fetch profile...

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 ChainCognitive Chain
HashSHA-256 (XOR/add)SipHash-2-4
TriggerEvery write operationEvery 30s cognitive tick
ContentsVector IDs, epochSCS score, evidence, graph edges
BridgeSentinel 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.

Try it — Cognitive status
Click "Get" to fetch cognitive status...

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.

Try it — Supported formats
Click "Get" to check formats...

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

  1. Fresh store — the first ingest sets the dimension. If you ingest an 8-dim vector, the store is 8-dim forever (until reset).
  2. Dimension mismatch — if you ingest a vector with the wrong dimension, you get a 400 error: "dimension mismatch: expected 8, got 16".
  3. Import mismatch — importing an .rvf file with a different dimension returns 409 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...]]]}'
Note: Changing dimension also changes the sensor embedding dimension formula. The sensor subsystem always produces 5C + C*(C-1)/2 dimensions (45 for 6 channels). If your store dimension doesn't match the sensor embedding dimension, sensor embeddings won't be stored.

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)

  1. 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).
  2. Enable I2C on the Pi: sudo raspi-config → Interface Options → I2C → Enable.
  3. Verify detection: i2cdetect -y 1 should show the BME280 at address 0x76 or 0x77.
  4. 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"}]}'
  5. Verify readings: GET /api/v1/sensor/stream should show real temperature, humidity, and pressure values instead of synthetic sine waves.

Example: GPIO Digital (Reed Switch / PIR)

  1. Wire: connect the switch between a GPIO pin (e.g., GPIO 17, pin 11) and GND. The internal pull-up provides the high state.
  2. Configure: add a gpio_digital driver entry with the pin number.
  3. Read: GET /api/v1/sensor/gpio/pins shows pin states.
Tip: Adding more channels changes the embedding dimension. With 9 channels (6 synthetic + 3 BME280), the embedding becomes 5*9 + 9*8/2 = 81 dimensions. Make sure your store dimension accommodates this if you're storing sensor embeddings.

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

TypeFires When
thresholdA sensor channel exceeds or drops below a value
driftAny drift detector fires (PH, ADWIN, or ESN)
fragilitykNN 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.

  1. Trigger characterization: POST /api/v1/thermal/characterize (requires pairing). This takes ~30 seconds.
  2. 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.
  3. If all 10 runs produce identical hashes at a frequency, that step is marked stable.
  4. The governor's max frequency is automatically capped at the highest stable step.
  5. View results: GET /api/v1/thermal/silicon-profile shows pass/fail per step.
Try it — View silicon profile
Click "Get" to view silicon profile...

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.

Upload Vectors
Download Store
SCP Helper

Ingest Vectors via JSON

Paste vector data as JSON arrays. Each vector is [id, [f32...]]. Use 0 for auto-generated content-hash IDs.

Array of [id, [components...]]. Dimension must match the store.

Download Store as JSON

Export all live vectors from the store as a JSON file for backup or transfer to another Seed.

The RVF file will be saved on the Seed. Download it later via SCP.

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.

Query
Lookup
Delete
Maintenance

k-NN Similarity Search

Vector Lookup by ID

Delete Vectors

Soft-delete: vectors are tombstoned, not erased. Use compaction to reclaim space.

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 load
0=600, 1=1000, 2=1200, 3=1300 MHz
Ticks before allowing freq change

Temporal Coherence

Click to load
EMA weight (0=slow, 1=instant)
Min similarity for edge
Time window size

Cognitive Container

Click to load
1 cycle = 10s optimizer interval
Memory budget for container
Retained witness receipts

Sensor Pipeline

Click to load

Current sensor configuration (read-only view). Use PUT /api/v1/sensor/embedding/config for updates.

Click header to load...

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)

MethodPathDescription
GET/api/v1/statusDevice status: ID, uptime, vectors, epoch, dimension, paired
GET/api/v1/identityDevice UUID, Ed25519 public key, firmware version
GET/api/v1/pair/statusPairing state and window countdown
POST/api/v1/pairPair this client (requires open window), returns bearer token
POST/api/v1/pair/windowOpen 30s pairing window (localhost only)
GET/api/v1/pair/clientsList 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/statusStore statistics: vector count, size, epoch, dimension
POSTAUTH/api/v1/store/ingestBatch ingest vectors (JSON body, optional dedup)
POST/api/v1/store/queryk-NN similarity search (cosine/l2/dot, metadata filter)
POSTAUTH/api/v1/store/deleteSoft-delete vectors by ID
GET/api/v1/store/syncPull all live vectors for replication
POSTAUTH/api/v1/store/syncPush vectors from another store
GET/api/v1/witness/chainView the witness hash chain
POST/api/v1/witness/verifyVerify chain integrity end-to-end
GET/api/v1/profilesList named optimization profiles
POSTAUTH/api/v1/profilesCreate a new profile
GET/api/v1/custody/epochCurrent monotonic epoch counter
GET/api/v1/custody/attestationSigned boot attestation (Ed25519)
GET/api/v1/custody/proof-statsProof-gated operation statistics (tier counts, cache hits)
POSTAUTH/api/v1/custody/witnessAppend a manual witness entry
POSTAUTH/api/v1/custody/signSign arbitrary data with Ed25519 device key
POST/api/v1/custody/verifyVerify an Ed25519 signature
GET/api/v1/optimize/statusBackground optimizer loop state
POSTAUTH/api/v1/optimize/triggerForce immediate optimization cycle
GET/api/v1/optimize/metricsCompaction and rebuild statistics
GET/api/v1/boundaryStructural fragility, min-cut, partitions, boundary hash
POSTAUTH/api/v1/boundary/recomputeForce fresh boundary analysis
GET/api/v1/delivery/imageDelivery image metadata for export
GET/api/v1/demo/coherenceQuick coherence health check
POST/api/v1/demo/ingest-sampleIngest 100 random sample vectors

Store v2 API Endpoints (9)

MethodPathDescription
GET/api/v1/store/vectors/{id}O(1) lookup: vector data, metadata, slot, deletion status
PUTAUTH/api/v1/store/vectors/{id}/metadataUpdate metadata without re-ingesting the vector
DELETEAUTH/api/v1/store/vectorsBatch delete (alias of POST /store/delete)
POSTAUTH/api/v1/store/compactManual compaction: rewrite RVF excluding deleted
GET/api/v1/store/deletedList tombstoned vector IDs
GET/api/v1/store/graph/statskNN 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/streamCurrent store snapshot: epoch, vectors, witness head
GET/api/v1/delta/historyFull delta history since boot

Sensor API Endpoints (17)

MethodPathDescription
GET/api/v1/sensor/listActive sensors: names, drivers, health
GET/api/v1/sensor/latest/{name}Latest reading from a named sensor
GET/api/v1/sensor/streamAll channel readings: raw, normalized, quality code
GET/api/v1/sensor/store/statusSensor embedding store metrics
GET/api/v1/sensor/gpio/pinsGPIO pin layout and assignments
GET/api/v1/sensor/embedding/latestLatest 45-dim embedding vector
GET/api/v1/sensor/embedding/configEmbedding pipeline configuration
PUTAUTH/api/v1/sensor/embedding/configUpdate embedding config
GET/api/v1/sensor/drift/statusDrift detection: PH + ADWIN + ESN state
GET/api/v1/sensor/drift/historyRecent drift events ring buffer
GET/api/v1/sensor/actuatorsActuator outputs: state, duty cycle, events
POSTAUTH/api/v1/sensor/actuator/fire/{n}Fire actuator N
GET/api/v1/sensor/reflex/rulesReflex arc rules: triggers and actions
PUTAUTH/api/v1/sensor/reflex/rulesUpdate reflex rules
GET/api/v1/sensor/coprocessor/statusHD gate coprocessor: baseline, threshold, stats
GET/api/v1/sensor/coprocessor/latestLatest coprocessor reading
GET/api/v1/sensor/configFull sensor subsystem configuration

Thermal API Endpoints (13)

MethodPathDescription
GET/api/v1/thermal/stateTemperature, zone, frequency, derivative, throttle flags
GET/api/v1/thermal/governorGovernor decision: demand, target, ceiling, turbo state
GET/api/v1/thermal/telemetryPer-tick telemetry ring buffer
GET/api/v1/thermal/silicon-profilePer-chip characterization results
GET/api/v1/thermal/accuracyBoosted vs baseline mismatch tracker
GET/api/v1/thermal/dvfs-profileLearned voltage/stability profile
GET/api/v1/thermal/turboTurbo burst scheduler state
GET/api/v1/thermal/coherenceFrequency/phase boundary correlation test
GET/api/v1/thermal/configGovernor config parameters
GET/api/v1/thermal/statsSession statistics: zone/freq distribution
PUTAUTH/api/v1/thermal/configUpdate governor parameters
POSTAUTH/api/v1/thermal/characterizeRun silicon characterization (~30s)
POSTAUTH/api/v1/thermal/boostManual turbo burst request

Coherence API Endpoints (5)

MethodPathDescription
GET/api/v1/coherence/profileCurrent temporal coherence score and slice count
GET/api/v1/coherence/profile/historyLast 10 profiles (ring buffer)
GET/api/v1/coherence/phasesDetected phase boundaries with persistence count
GET/api/v1/coherence/orphansVectors with no kNN connections
PUTAUTH/api/v1/coherence/configUpdate temporal parameters

Cognitive API Endpoints (7)

MethodPathDescription
GET/api/v1/cognitive/statusEpoch, tick count, SCS, chain validity
GET/api/v1/cognitive/snapshotFull container snapshot (edges, evidence, SCS)
GET/api/v1/cognitive/witnessLatest receipt + chain verification
GET/api/v1/cognitive/witness/chainAll retained receipts (up to 1000)
POSTAUTH/api/v1/cognitive/tickForce immediate cognitive tick
GET/api/v1/cognitive/configContainer configuration
PUTAUTH/api/v1/cognitive/configUpdate container configuration

Import / Export Endpoints (3)

MethodPathDescription
POSTAUTH/api/v1/store/importImport .rvf from filesystem path (validates dim)
POSTAUTH/api/v1/store/exportExport store as .rvf to filesystem path
GET/api/v1/store/import/formatsSupported formats and dimension info

Security & Firmware Endpoints (8)

MethodPathDescription
GET/api/v1/security/statusAuth method, protections, witness algorithm, build key status
GET/api/v1/security/build-keyBuild key configuration and public key hex
GET/api/v1/firmware/statusA/B slot info, boot count, rollback state
POSTAUTH/api/v1/firmware/updateEd25519-verified OTA update (X-Signature header or inline sig)
GET/api/v1/boot/measurementsMeasured boot chain hashes (ADR-045 Software TEE)
GET/api/v1/wifi/statusWiFi connection state and saved networks
GET/api/v1/wifi/scanScan for available WiFi networks (calls nmcli)
POSTAUTH/api/v1/wifi/connectConnect to WiFi network (ssid + password in JSON body)

Sync & Swarm Endpoints (10)

MethodPathDescription
GET/api/v1/store/sync?since_epoch=NDelta pull — returns only vectors/deletions since epoch N
POSTAUTH/api/v1/store/syncDelta push — ingest vectors + apply deletions from peer
GET/api/v1/sync/deltaADR-040 delta pull — vectors/deletions since given epoch
POSTAUTH/api/v1/sync/deltaADR-040 delta push — send vectors + deletions to peer
GET/api/v1/peersList known multi-seed peers with last-seen timestamps
POSTAUTH/api/v1/peers/syncPush vector sync to a peer seed
GET/api/v1/swarm/statusPeer count, discovery state, current epoch
GET/api/v1/swarm/peersList known peers (alias for /peers)
GET/api/v1/sync/statsDelta sync bandwidth metrics (vectors sent/received, bytes)
GET/api/v1/cluster/healthCluster 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.

MethodEndpointDescription
POSTinitializeStart session with scope negotiation (experimental.cognitum.toolScope)
POSTtools/listList tools (scope-filtered) with annotations: authClass, readOnlyHint, destructiveHint
POSTtools/callCall a tool by name. Auth class enforced. Audit trail for mutations.
POSTresources/list, resources/read4 resources (status, store, witness, thermal)
POSTprompts/list, prompts/get3 guided prompts (diagnose, gpio setup, run kernel)
POSTtasks/list, tasks/get, tasks/cancelAsync task management
Group A: Guide (6 tools) -- public, always available
ToolAuthDescription
seed.guide.overviewpublicSystem overview: architecture, capabilities, all groups
seed.guide.groupspublicList tool groups with counts and auth tiers
seed.guide.endpointspublicList endpoints by group with params, auth, examples
seed.guide.searchpublicSearch tools by keyword across all groups
seed.guide.explainpublicExplain concepts: witness chain, RVF, DVFS, NCM, etc.
seed.guide.tutorialspublicStep-by-step workflows: pair, query, ingest, gpio, ota, etc.
Group B: Device (5 tools)
ToolAuthEndpointDescription
seed.device.statuspublicGET /api/v1/statusHardware, firmware, uptime, store stats
seed.device.identitypairedGET /api/v1/identityUUID, public key, cert fingerprint
seed.device.securitypairedGET /api/v1/security/statusSecurity posture: TLS, auth, rate limits
seed.device.build_keypairedGET /api/v1/security/build-keyBuild key status
seed.device.cluster_healthpairedGET /api/v1/cluster/healthCluster health (multi-seed)
Groups C-D: Witness (3) + Custody (6)
ToolAuthDescription
seed.witness.chainpairedGet witness chain entries
seed.witness.verifypairedVerify a witness entry
seed.witness.getpairedSingle-entry lookup by witnessId
seed.custody.epochpairedCurrent custody epoch
seed.custody.attestationpairedAttestation report
seed.custody.proof_statspairedProof chain statistics
seed.custody.witnessprivilegedCreate custody witness
seed.custody.signprivilegedSign data with device key
seed.custody.verifypairedVerify custody signature
Groups E-G: Memory (2) + RVF (5) + Store (12)
ToolAuthDescription
seed.memory.querypairedSemantic search with filters, witness tracking
seed.memory.upsertprivilegedInsert/update vectors
seed.rvf.container.listpairedList RVF containers
seed.rvf.kernel.listpairedList available kernels
seed.rvf.kernel.callprivileged*Execute kernel (escalates to dangerous for mutating)
seed.rvf.explorepublicExplore RVF internals by aspect
seed.rvf.inspectpairedInspect RVF entry: binary header, witness, metadata
seed.store.* (12)mixedstatus, 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)
ToolAuthDescription
seed.sensor.* (17)mixedlist, gpio_pins/read/write, stream, embeddings, drift, actuators, reflex rules, coprocessor, config
seed.thermal.* (13)mixedstate, governor, telemetry, silicon profile, characterize, accuracy, DVFS, turbo, boost, coherence, config, stats
seed.coherence.* (5)mixedprofile, history, phases, orphans, config
seed.cognitive.* (7)mixedstatus, snapshot, witness, witness_chain, tick, config_get, config_set
Groups L-N: Pair (4) + Firmware (6) + WiFi (3) -- dangerous
ToolAuthDescription
seed.pair.* (4)dangerousstatus, clients, initiate, window
seed.firmware.* (6)dangerousstatus, update, upgrade_status/check/apply, boot_measurements
seed.wifi.* (3)dangerousstatus, scan, connect
Groups P-U: Swarm (5) + Optimize (3) + Boundary (2) + Delta (4) + Delivery (1) + Admin (5)
ToolAuthDescription
seed.swarm.* (5)pairedstatus, peers.list/detail/sync, sync_stats
seed.optimize.* (3)mixedstatus, trigger, metrics
seed.boundary.* (2)mixedget, recompute
seed.delta.* (4)pairedstream, history, sync_pull, sync_push
seed.delivery.imagepairedGet delivery image
seed.admin.* (5)dangerousbuild_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

HeaderDirectionDescription
X-MCP-SessionResponseSession ID (SHA-256 of device ID + timestamp)
OriginRequestValidated for DNS rebinding protection. Allowed: localhost, 169.254.42.1, cognitum.local, file://

Upgrade & Other Endpoints (2)

MethodPathDescription
GET/api/v1/upgrade/statusRunning firmware version and build target
POSTAUTH/api/v1/upgrade/applyUpload new binary (octet-stream body)
GET/api/v1/upgrade/checkRemote update check (version, build-key status, OTA methods, network)

Hardware

ComponentSpecification
SoCQuad-core Cortex-A53 @ 1 GHz (overclockable to 1.3 GHz)
RAM512 MB LPDDR2
WiFi2.4 GHz 802.11b/g/n
BluetoothBLE 4.2
USB1x Micro-USB OTG (data), 1x Micro-USB (power only)
GPIO40-pin header (I2C, SPI, UART)
StoragemicroSD (16-32 GB recommended)

GPIO Pin Assignments

PinGPIOFunction
3, 52, 3I2C SDA/SCL (sensor expansion)
8, 1014, 15UART TX/RX (serial console / coprocessor)
1117Status LED (heartbeat)
1327Factory reset button (hold 10s)
19, 21, 23, 2410, 9, 11, 8SPI (sensor expansion)

Performance Benchmarks (20k vectors, dim=8)

MetricValue
Binary size2.27 MB (stripped ARM ELF)
RSS memory7.5 MB (20k vectors + sensor + temporal)
API response (avg)54 ms (TLS)
k-NN query (k=10)85 ms
Ingest 100 vectors84 ms
kNN graph rebuild (20k, k=16)72 s (batched, API stays responsive)
Startup (20k replay)< 1 s

Security

LayerMechanism
TransportTLS 1.2+ with device-specific certificate (trust installer on USB drive); mTLS auto-enabled when client CA exists
AuthenticationPairing token (persistent across reboots) + GCRA rate limiter with auth-failure blocking
SigningEd25519 device key (ring library, no OpenSSL)
Witness chainSHA-256 cryptographic hash chain (backward-compatible with legacy XOR/add)
OTA firmwareEd25519 signature verification — detached (X-Signature header) or inline (X-Signed: true)
Build keyAuto-loaded from /var/lib/cognitum/tls/build-key.pub or ./build-key.pub
Root filesystemSquashfs (structurally immutable)
Process isolationsystemd hardening (NoNewPrivileges, ProtectSystem) + seccomp-BPF syscall filter
Path validationCanonicalize + allowlist prevents directory traversal
Sleep prevention5-layer USB keep-alive (kernel, gadget, watchdog, keepalive, masked sleep)
Anomaly detectionHD Gate + drift detection + temporal fingerprint
SyncEpoch-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
Tip: Write endpoints require a bearer token. Pair first to receive a token. For curl, add -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

PartitionTypeSizePurpose
p1 (boot)FAT32128 MBKernel, DTB, boot config
p2 (slot-a)squashfs300 MBRoot filesystem
p3 (slot-b)squashfs300 MBOTA alternate root
p4 (data)ext4RemainingVectors, 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:

  1. Install the trust certificate (recommended) — open the COGNITUM USB drive and run the installer in the trust/ folder:
    • Windows: trust/install-trust.bat
    • macOS: trust/install-trust.command
    • Linux: bash trust/install-trust.sh
    After installing, browsers and tools will connect without warnings.
  2. Skip the installer — use -k with curl, verify=False in 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.