cd /news/artificial-intelligence/i-measured-my-multi-agent-idea-it-fa… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-63778] src=github.com β†— pub= topic=artificial-intelligence verified=true sentiment=Β· neutral

I measured my multi-agent idea. It failed. I shipped the autopsy instead

A developer released B.I.O.M.A., an open-source Rust micro-kernel for LLM applications that reduces input tokens by up to 97% while preserving answer quality, after testing and refuting the multi-agent 'mitosis' approach. The tool provides context apoptosis, a cognitive firewall, and a lock-free signaling bus, and is provider-agnostic, working with Anthropic, Google, and OpenAI.

read7 min views1 publishedJul 17, 2026
I measured my multi-agent idea. It failed. I shipped the autopsy instead
Image: source

🌐 English Β· PortuguΓͺs

A local, provider-agnostic efficiency & security micro-kernel for LLM applications.

B.I.O.M.A. is a drop-in artifact β€” a lock-free Rust kernel (bioma_micro

) plus a thin Python layer β€” that you embed in any project or architecture that talks to an LLM. It does not try to make the model "smarter". It makes the processing cheaper, faster and safer, in-process, before your prompt ever leaves the machine:

Context apoptosisβ€” dehydrates wasted/stale context (βˆ’80% input tokens; up to βˆ’97% on long sessions).** Cognitive firewall**β€” secret redaction, cognitive-DDoS/flood detection, and a dispatch timeout guard.** Hormonal bus**β€” lock-free ΞΌs signalling substrate (~2M signals/s).

100% local. Provider-agnostic: harden the payload here, then send it to Anthropic, Google, OpenAI β€” or anything β€” with your SDK.

New here?[explains what B.I.O.M.A. is, the pain it attacks, and the real benchmarks as proof. Step-by-step deployment (local & online providers) is in]OVERVIEW.md

[. Every claim is measured and audited in]IMPLEMENTATION.md

[, including what we tested and]FINDINGS.md

refuted(multi-LLM "mitosis" does not improve quality β€” it is not part of the product).

from bioma.firewall_client import CognitiveFirewall

fw = CognitiveFirewall(vault={"db_password": DB_PW})   # secrets to protect

h = fw.shield(history, "refactor this function")

import anthropic                                        # or google.genai, or openai
msg = anthropic.Anthropic().messages.create(
    model="claude-sonnet-5", max_tokens=1024,
    system=h.system or "", messages=[{"role": "user", "content": h.prompt}])

shield = await fw.harden(history, "refactor", dispatch_fn=my_async_provider_call)

The Rust kernel is usable directly too:

import bioma_micro as k
k.dehydrate([("system rules", k.SYSTEM), ("verbose log " * 200, k.TOOL)])  # β†’ -80% tokens
k.saturation_scan(payload)     # cognitive-DDoS score 0..1 (flood β‰ˆ 1.0)
Capability Result Source
Context apoptosis βˆ’80% input tokens (up to βˆ’97% long sessions)
tests/test_enxuto_efficiency.py
Answer-quality preservation 10/10 parity, 100% correct answers at βˆ’97% tokens (5 online models, objective probes)
tests/test_quality_preservation.py Β· reports/BIOMA_QUALITY_PRESERVATION.md
Measured energy per dispatch 2,714.7 J β†’ 69.5 J (βˆ’97.4%), quality parity (local Llama 3.2 1B, battery fuel gauge, idle subtracted)
tests/test_energy_local.py Β· reports/BIOMA_ENERGY_LOCAL.md
Vision context apoptosis (agent screenshot loops) 6/6 parity, 100% correct at βˆ’56% real tokens (βˆ’77% at 24 steps; dehydrated payload is O(1) in session length) β€” 3 vision models, probes rendered into the pixels
tests/test_vision_quality_preservation.py Β· reports/BIOMA_VISION_QUALITY.md
Image distillation (keep-latest dedup + OCR + deterministic shape structure) 100% answers at βˆ’74% tokens vs sending every image β€” stale images become ~25–86-token text blocks; local VLM captions measured and rejected (label confabulation)
tests/test_vision_distill.py Β· reports/BIOMA_VISION_DISTILL.md
Dev-workload cost benchmark (7 agent models, real OpenRouter usage & prices) βˆ’57% to βˆ’86% median cost at quality parity β€” 126 real executions, paired replicas, failures reported first-page (Fable 5Γ—T1 arm-B empty 3/3)
tests/benchmark_dev_openrouter.py Β· resultados/relatorio.md Β· resultados/SIMULACAO_MERCADO.md
Drop-in gateway (OpenAI and Anthropic surfaces, cache-safe, tool-pair aware)
βˆ’78% (OpenAI) / βˆ’33% (Anthropic) billed input tokens, answer intact with only base_url changed β€” proven with both official SDKs on real models; Claude Code speaks the Anthropic surface
bioma/gateway.py Β· tests/test_gateway.py Β· tests/prove_gateway_dropin.py Β· tests/prove_anthropic_surface.py
Apoptosis Γ— prompt caching (real Anthropic cache) βˆ’65% net cost after the cache discount β€” the durable prefix hits the same cache in both arms; savings come from purging the never-cacheable middle
tests/measure_cache_interaction.py Β· resultados/MEDICOES_GATEWAY.md
Real Claude Code E2E (CLI through the gateway) solves real bug+feature tasks, pytest green with only ANTHROPIC_BASE_URL changed; apoptosis is a safe no-op here (Claude Code self-manages context β€” nothing to purge), and the value shows on agents that don't (βˆ’84% measured)
tests/e2e_claude_code.py Β· resultados/E2E_CLAUDE_CODE.md
E2E real tool-calling agent (fixes a real bug to green pytest) βˆ’84% accumulated input tokens at task parity on a long-running agent (βˆ’0% on a 3-turn task β€” apoptosis is a correct no-op with no dead weight)
tests/e2e_agent_gateway.py Β· resultados/MEDICOES_GATEWAY.md
Hormonal bus ~2M signals/s @ ~5ΞΌs, bounded under 10Γ— load
archived bench (research repo)
Cognitive-DDoS mitigation 15k-token flood β†’ dehydrated pre-dispatch tests/test_sovereign_defense.py
Secret redaction vault values never reach the model reports/BIOMA_IMMUNITY_VERDICT.md
Pixel secret redaction (closes our own declared gap) a real vision model transcribes an AWS/OpenAI key from the original screenshot but only β€” OCR + region masking, client-sideβ–ˆβ–ˆβ–ˆβ–ˆ from the redacted one
tests/test_vision_secret_redaction.py Β· reports/BIOMA_PIXEL_SECRETS.md
pip install bioma-framework            # core: the Rust micro-kernel + Python API
pip install "bioma-framework[gateway]"   # + the drop-in OpenAI/Anthropic gateway
pip install "bioma-framework[all]"       # + client, anthropic, and the vision tier

The core install ships the compiled Rust kernel (bioma_micro

) as a binary wheel β€” no Rust toolchain required. Extras (gateway

, client

, anthropic

, vision

) are opt-in so the base stays light. Publishing is one tag away for maintainers (git tag v1.0.0 && git push --tags

β†’ the Release

workflow builds multi-platform wheels and publishes to PyPI). Local dev from source is in Quickstart.

Point any OpenAI-compatible or Anthropic-compatible client's base_url

at the gateway and every request gets context apoptosis transparently β€” no SDK swap, no prompt rewrite:

pip install fastapi "uvicorn[standard]" httpx
uvicorn bioma.gateway:app --port 8790
python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8790/v1", api_key="...")   # only change

from anthropic import Anthropic
client = Anthropic(base_url="http://localhost:8790", api_key="...")   # only change

Both surfaces proven with the official SDKs on real models:

OpenAI(tests/prove_gateway_dropin.py

): billed inputβˆ’78% on Sonnet 5 / GLM-5.2 / Gemini 3.5 Flash, answer intact, streaming works.Anthropic(/v1/messages

tests/prove_anthropic_surface.py

): billed inputβˆ’33% on Sonnet 5 / Opus 4.8, answer intact, streaming works β€” the protocol Claude Code speaks, soANTHROPIC_BASE_URL

β†’ the gateway just works.

Design guarantees (each unit-tested in tests/test_gateway.py

, 14 tests): the current query is never filtered; the surviving system

+FACT

prefix stays byte-identical across calls (prompt-cache-safe); tool-call/tool-result pairs survive or purge as a unit (never orphaned) β€” on both the OpenAI tool

role and the Anthropic tool_use

/tool_result

block structure. Anthropic system

is a top-level field, forwarded untouched (never purged).

B.I.O.M.A. is a client-side Frugal AI layer that auditably reduces the energy cost of LLM inference per deployment. The kernel's per-dispatch audit (tokens before/after) is the KPI: the reduction percentage is exact and coefficient-independent. A reproducible benchmark (tests/test_esg_benchmark.py

β†’ reports/BIOMA_ESG_BENCHMARK.md

) converts the measured token savings into bounded Wh/gCO2e estimates using declared literature coefficients (0.5–1.3 kWh/M tokens; grid presets; caching-adjusted counterfactual), with the conversion helpers shipped in bioma/esg.py

. This is a per-deployment claim β€” not a global one; it scales with adoption and with your grid.

Turn your own real traffic into a case report: run your workload through the gateway, then python -m bioma.esg_report bioma_gateway_audit.jsonl --grid eu --price-in <your $/M>

prints tokens / Wh / gCO2e / $ avoided from the measured audit log β€” the design-partner instrument (bioma/esg_report.py

). A ready-to-run NVIDIA-GPU energy harness (tests/measure_energy_gpu.py

) awaits datacenter hardware; it fabricates no numbers without a GPU.

python -m pip install maturin
cd bioma_micro && maturin build --release && \
  pip install --force-reinstall target/wheels/bioma_micro-*.whl && cd ..

pip install pytest fastapi "openai>=1"
python -m pytest tests/test_kernel.py tests/test_firewall.py tests/test_server.py -q

Optional: a local FastAPI runner (bioma.server

, GET /health

  • POST /v1/dispatch

) and a local container image (deploy/Dockerfile.lean

) are included β€” no hosted service required.

bioma_micro/   Rust/PyO3 micro-kernel β€” hormonal bus + apoptosis + saturation_scan
bioma/         Python: CognitiveFirewall, LeanOpenRouterClient, local server
tests/         unit suite (kernel, firewall, server) + real end-to-end validations
FINDINGS.md    ground-truth evaluation (proven / refuted), reproducible
reports/       immunity verdict (APT war-game)

Fair-source under the Functional Source License (FSL-1.1-MIT) ( LICENSE): read it, run it, and build on it for any non-competing purpose. The only limit is repackaging it as a competing product, and each release automatically becomes MIT two years after its date.

── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @b.i.o.m.a. 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/i-measured-my-multi-…] indexed:0 read:7min 2026-07-17 Β· β€”