Archimedes-Ω API

Coherence Interrogation Agent — SU(2)/SL(3,ℤ) Biological Resonance

REST gRPC GraphQL Docker

Version 3.0.0 — MIT License — GitHub

Quick Start

🐍 Python

pip install archimedes-agent
from archimedes import ArchimedesClient
client = ArchimedesClient("http://localhost:8080")
result = client.analyze(thermal_noise=0.05)
print(result["conclusion"]["status"])

🟢 Go

go get github.com/arkhe/archimedes-agent/go
client, _ := archimedes.NewClient("localhost:50051")
resp, err := client.SimulateSU2(ctx, req)

📦 Node.js

npm install @arkhe/archimedes-agent
import { ArchimedesClient } from "@arkhe/archimedes-agent"
const result = await client.analyze({thermal_noise:0.05})

🦀 Rust

cargo add archimedes-agent
let mut client = ArchimedesClient::connect("http://localhost:50051").await?;
let peaks = client.simulate_su2(req).await?;

☕ Java

mvn add dependency com.arkhe:archimedes-agent
ArchimedesClient client = new ArchimedesClient();
CoherenceResponse r = client.simulateSU2(request);

🐘 PHP

composer require arkhe/archimedes
$client = new ArchimedesClient();
$result = $client->analyze(["thermal_noise"=>0.05]);

REST Endpoints

MethodEndpointDescription
POST/simulate/su2SU(2) continuous coherence simulation
POST/simulate/sl3zSL(3,ℤ) discrete lattice simulation
POST/detect/peaksPeak/resonance detection
POST/analyzeFull analysis pipeline
POST/mesh/publishPublish to Nostr mesh network
GET/healthHealth check
GET/metricsPrometheus metrics

POST /analyze — Full Analysis

POST http://localhost:8080/analyze
Request
Response
cURL
{
  "thermal_noise": 0.05,        // 0-1, default 0.05
  "temperature": 310.0,          // Kelvin, default 310
  "coherence_threshold": 0.95,   // resonance threshold
  "resonance_prominence": 0.21   // peak prominence
}
{
  "timestamp": "2026-04-04T02:12:00Z",
  "data_source": "simulated",
  "peaks": [
    { "phase": 0.628, "phase_degrees": 36.0,
      "coherence": 0.987, "prominence": 0.34,
      "is_resonance": true, "index": 200 }
  ],
  "conclusion": {
    "status": "DISCRETE_LATTICE_CONFIRMED",
    "peaks_total": 118,
    "peaks_in_resonance": 115,
    "max_coherence": 0.987,
    "interpretation": "Coherence of 0.987 detected in 115 resonances..."
  }
}
curl -X POST http://localhost:8080/analyze \
  -H "Content-Type: application/json" \
  -d \'{"thermal_noise":0.05,"coherence_threshold":0.95}\'

Protocol Buffers (gRPC)

Service Definition

syntax = "proto3";
package archimedes;
service CoherenceAgent {
  rpc SimulateSU2 (SU2Request) returns (CoherenceResponse);
  rpc SimulateSL3Z (SL3ZRequest) returns (CoherenceResponse);
  rpc DetectPeaks (PeakRequest) returns (PeakResponse);
  rpc FullAnalyze (AnalyzeRequest) returns (AnalyzeResponse);
  rpc PublishMesh (PublishRequest) returns (PublishResponse);
}
grpcurl -plaintext localhost:50051 list grpcurl -plaintext -d \'{"thermal_noise":0.05}\' localhost:50051 archimedes.CoherenceAgent/FullAnalyze

GraphQL

query {
  coherence {
    maxCoherence
    peaks(filter: {isResonance: true}) {
      phase
      coherence
      isResonance
    }
    conclusion {
      status
      interpretation
    }
  }
}
POST http://localhost:8081/graphql

Docker

# Pull and run
docker pull ghcr.io/arkhe/archimedes-api:latest
docker run -d -p 8080:8080 -p 50051:50051 -p 8081:8081 \
  --name archimedes ghcr.io/arkhe/archimedes-api:latest

# Build locally
docker build -t archimedes-api ./docker
docker run -d -p 8080:8080 -p 50051:50051 archimedes-api

Monitoring

📊 Prometheus Metrics

curl http://localhost:8080/metrics
# HELP archimedes_requests_total Total requests
# TYPE archimedes_requests_total counter
archimedes_requests_total{method="POST",endpoint="/analyze"} 42

📋 Loki Logs

./scripts/monitor.sh
REST Health: healthy
gRPC: port 50051
=== Recent errors ===
[no recent errors]