Decentralized agent routing and lifecycle substrate. Coordinates capacity-aware routing, context- pruning workloads, and cryptographic verification across heterogeneous nodes (cloud VMs and local Raspberry Pis).
  • Rust 49.4%
  • TypeScript 38.4%
  • Nushell 4.8%
  • Shell 2.7%
  • Python 2.3%
  • Other 2.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Peter Lodri 9a655b2095
feat: add provenance prototype and guarded local workflows (#5)
Add the reviewed in-memory Custodian provenance prototype, node-registry lifecycle tests, bounded local Dogfeed transport and manually gated dataset-card publication.

Squash the validated final tree to keep intermediate runtime database/state blobs out of main. Original PR commits and private preservation archives remain available. Training is explicitly validation-only; full Custodian persistence/authentication, publishing ownership and hardware/Nix validation remain documented follow-ups.

Original implementation by Lodri Péter; review-driven repairs by Codex.

Co-authored-by: Lodri Péter <267054113+peterlodri-sec@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
2026-11-15 19:31:37 -05:00
.github/workflows feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
.kompress/files/src feat: implement zero-copy mmap transport, StateStore refactor, and actor-based loop lifecycle 2026-06-28 07:11:16 +02:00
.ocx feat: add workspace opencode config, fix plugin imports, and expand loop crate 2026-06-28 10:51:21 +02:00
.opencode fix(plugin): keep context retention count in integer arithmetic 2026-11-16 01:09:17 +01:00
crates feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
docs feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
harness/changes feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
hf-datacard feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
interview feat(cognition): add Rig.rs integration skeleton with optional dependency 2026-06-27 18:33:39 +02:00
nix feat: nixify dogfeed — reproducible dev shell, nushell harness, standalone flake 2026-06-29 06:52:34 +02:00
packages feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
proto feat: implement zero-copy mmap transport, StateStore refactor, and actor-based loop lifecycle 2026-06-28 07:11:16 +02:00
scripts feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
second-brain-cloudflare@a3c1c893c4 docs: SSH key deployment issue for Hetzner servers 2026-06-28 00:00:16 +02:00
supabase/migrations feat: add workspace opencode config, fix plugin imports, and expand loop crate 2026-06-28 10:51:21 +02:00
.env.example feat(node-registry): hybrid discovery (HTTP heartbeat + Tailscale API fallback) 2026-06-27 20:50:22 +02:00
.gitignore feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
.gitmodules refactor: use kompress-ultra as git submodule 2026-06-29 04:27:59 +02:00
.sops.yaml feat(node-registry): add 3 deployment options (parallel SSH, Ansible, Fabric) 2026-06-27 21:00:03 +02:00
AGENTS.md fix(opencode): restore kompress-ultra plugin loader + re-exports + test paths 2026-06-29 12:19:44 +02:00
AGENTS.md.original.md docs: preserve caveman-compress backup of AGENTS.md 2026-06-27 14:43:49 +02:00
Cargo.lock feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
Cargo.toml feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
DESIGN_BRAIN.md feat: Phase 3 mempalace complete (short-term memory) 2026-06-27 16:15:42 +02:00
docker-compose.milvus.yml feat: Phase 2 MILVUS BRAIN integration 2026-06-27 15:49:33 +02:00
dogfeed.json feat: add dogfeed datacard, CI agent spec, and fix PR #3 review items 2026-06-29 05:10:45 +02:00
flake.lock feat: honcho daemon Phase 3b (Tasks 1-4) 2026-06-27 16:46:23 +02:00
flake.nix feat: nixify dogfeed — reproducible dev shell, nushell harness, standalone flake 2026-06-29 06:52:34 +02:00
KOMPRESS_ULTRA_INTEGRATION.md feat: implement zero-copy mmap transport, StateStore refactor, and actor-based loop lifecycle 2026-06-28 07:11:16 +02:00
mesh.nu feat: add provenance prototype and guarded local workflows (#5) 2026-11-15 19:31:37 -05:00
portail.toml docs: add ELI5 to README and add portail.toml config 2026-06-28 20:15:44 +02:00
prd.json.example feat: add workspace opencode config, fix plugin imports, and expand loop crate 2026-06-28 10:51:21 +02:00
README.md fix: resolve all 27 review comments on PR #3 (Copilot + Codex) 2026-06-29 09:52:33 +02:00
RELEASE_v2.0.0.md release: v2.0.0 — 10 crates, 127 tests passing 2026-06-28 05:40:15 +02:00
slides.html chore: ignore worktrees and add slides 2026-06-28 06:24:29 +02:00
source-code-concept-designfit-report.md docs: add source-code-concept+designFIT report 2026-06-29 06:53:09 +02:00
unmoji.json feat: add workspace opencode config, fix plugin imports, and expand loop crate 2026-06-28 10:51:21 +02:00

UltrameshAI

UltrameshAI Social Preview

Loop-Engineering Agent Stack substrate for high-performance, decentralized capability-aware agent routing and lifecycle management on cloud VMs and Raspberry Pis.


👶 Explain Like I'm 5 (ELI5)

Imagine you have a team of AI friends (agents) living on different computers (like big cloud servers and tiny Raspberry Pis). UltrameshAI is the nervous system that connects them:

  1. It knows who is best at what: If one agent is great at writing code and another is great at searching the web, it routes your question to the right agent (Cognition & Orchestration).
  2. It talks super fast: It lets them send messages to each other instantly (Transport).
  3. It keeps them in line: It watches over them so they don't hog too much memory or crash your computer (Execution).

🧠 What is kompress-ultra?

When you talk to an AI for a long time, the chat history gets huge. This makes the AI slow, expensive to run, and it starts forgetting things. kompress-ultra is the smart memory-manager that solves this:

  • WHAT: A smart filter that shrinks the chat history so the AI only reads what is absolutely necessary.
  • HOW:
    • It squeezes sentences: It removes filler words, turning "I would be happy to help you write the code for authentication" into "write authentication code" (Rewriter).
    • It throws away the clutter: It deletes low-value messages but always keeps a critical-syntactic safety floor (T_{\text{crit}}) (such as code blocks, errors, path names, and the last 5 messages) so nothing important is lost (Pruner).
    • It files old memories away: Anything it deletes is saved into a long-term database (Milvus/MemPalace) so the AI can search and recall it later (Circulator).

Mathematical Safety Floor & Paradox Resolution

To resolve the Voting Ensemble Paradox where conservative voting collapses stratum-wise recall:

Under AND-voting, the per-stratum ensemble indicator equals the maximum over voter indicators. That max picks out the weakest voter on that stratum — the one most likely to have evicted a critical token — so the ensemble's recall drops to the level of its worst member:

I_{\text{ens}}(x) \;=\; \bigvee_{i=1}^{N} I_i(x) \;=\; I_{i^{\*}_k}(x)

Notation: i^{\*}_k = \arg\min_{i \in [N]} \text{recall}_i — the weakest voter on stratum k is the one whose indicator survives the OR. Under AND-voting, the ensemble's stratum-wise recall equals the worst voter's recall on that stratum.

We apply an asymmetric loss penalty (\lambda = 3.0) on the false eviction of critical-syntactic tokens (T_{\text{crit}}):

\mathcal{L}_i = \mathcal{L}_{\text{base}}(\theta_i) + \lambda \cdot \frac{1}{|T_{\text{crit}}|} \sum_{x \in T_{\text{crit}}} I^{\text{fe}}_i(x)
  • WHY: To keep the agents running fast, cheap, and smart—especially on resource-constrained hardware like a Raspberry Pi!
  • EVALUATION: Achieves up to 78.5% token savings while maintaining a 0.993 exact-keep rate on critical reasoning tokens.

🏗️ 4-Layer Architecture

+-------------------------------------------------------------+
| 1. COGNITION LAYER   (LLM Client, Session, Prompt Routing)  |
+-------------------------------------------------------------+
                              │
                              ▼
+-------------------------------------------------------------+
| 2. ORCHESTRATION LAYER (Topology Mapping & Lock-free Route)  |
+-------------------------------------------------------------+
                              │
                              ▼
+-------------------------------------------------------------+
| 3. TRANSPORT LAYER     (UDP Multicast, Framed UDS Protobuf) |
+-------------------------------------------------------------+
                              │
                              ▼
+-------------------------------------------------------------+
| 4. EXECUTION LAYER    (Nushell sandbox unit-harness, Bun)   |
+-------------------------------------------------------------+

1. Cognition Layer (crates/cognition, crates/agent-core)

Wraps OpenAICompatible models (e.g. DashScope/Qwen) and handles prompting dispatch. Features a unified LlmClient capable of running real model completion or offline mock testing.

2. Orchestration Layer (crates/orchestrator, crates/node-registry)

  • Cluster Topology Router: Parses topology.toml, managing capability-aware targets. Uses arc-swap for lock-free, ultra-low latency routing requests from Layer 1.
  • Directory Watcher Hot-Reloading: Uses recommended OS filesystem watchers (via notify) to dynamically reload node updates without restarting the binary.
  • Rig Agent Tool: Exposes ClusterRouterTool implementing the rig::tool::Tool trait for integration with LLM agent loops.
  • Heartbeat Registry: Decentralized node advertising over UDP multicast.

3. Transport Layer (crates/transport)

Handles length-delimited framed protobuf serialization over Unix Domain Sockets (UDS) for pipelined high-throughput message processing.

4. Execution Layer (scripts/)

Nushell lifecycle harness (unit-harness.nu) managing spawning, memory watching (cgroups/polling), and stats reporting of runtime sandboxes.


🛠️ Getting Started

📋 Prerequisites

  • Nix package manager with flakes enabled
  • Rust (Rust 1.75+ toolchain)
  • Nushell (for harness scripts)

🚀 Commands

1. Warming Nix Cache & Checking Shells

# Verify flake evaluates cleanly
nix flake check

# Warm shell caches (required before benchmarking)
nix build .#agent-unit --no-link

# Spawn standard developer shell
nix develop .#agent-unit --command nu -c "version"

2. Running the Test Suite

# Run all workspace test suites (excluding telemetry DB tests)
cargo test --workspace --exclude mempalace

# Test orchestrator specifically with Rig features enabled
cargo test -p loop-engineering-orchestrator --features rig

⚙️ Configuration (topology.toml)

Create a local topology.toml file in the root or execution directory to define coordinator and target compute resources:

# Coordinator configurations
coordinator_ip = "100.64.0.1"
coordinator_port = 8080

# Heterogeneous target nodes (Hetzner compute nodes, Raspberry Pis, etc.)
[[nodes]]
ip = "100.64.0.10"
role = "Compute"
capabilities = ["cuda", "llm-inference"]
runtime = "RustNative"

[[nodes]]
ip = "100.64.0.20"
role = "Worker"
capabilities = ["sensors", "arm64", "camera"]
runtime = "Bun"

Updates made to this file are automatically picked up by the background file watcher.