An open API service indexing awesome lists of open source software.

https://github.com/peeramid-labs/nsed

N-Way Self-Deliberating Evaluation Engine core for AI agent orchestration
https://github.com/peeramid-labs/nsed

agentic-framework ai ai-agents ai-orchestration

Last synced: about 2 months ago
JSON representation

N-Way Self-Deliberating Evaluation Engine core for AI agent orchestration

Awesome Lists containing this project

README

          

# NSED

[![CI](https://github.com/peeramid-labs/nsed/actions/workflows/ci.yml/badge.svg)](https://github.com/peeramid-labs/nsed/actions/workflows/ci.yml)
![Coverage](https://img.shields.io/badge/coverage-66.9%25-yellow?logo=rust)
[![License: BSL 1.1](https://img.shields.io/badge/License-BSL_1.1-blue.svg)](LICENSE)

Enterprise-ready agentic orchestration layer implementing the **[N-Way Self-Evaluating Deliberation (NSED)](https://arxiv.org/abs/2601.16863)** protocol. Multiple AI agents work on your task in parallel, having intermediate checkpoints and converging on a final answer. NSED delivers frontier reasoning ability through a Mixture-of-Models architecture that amplifies the strengths of individual models. It shows less sycophancy, cost tracking, optimisation, and a full compliance audit trail managed through NATS as a high-performance communication bus.

## Why NSED

Three small open-weight models (20B, 8B, 12B) on consumer hardware score **84% on AIME 2025** through NSED deliberation — matching DeepSeek-R1 and coming within 1 point of GPT-5. The same models score 54% with naive majority voting. ([paper](https://arxiv.org/abs/2601.16863))

| Problem | How NSED Solves It |
|---|---|
| **Single-model quality ceiling** | Mixture of Models: agents from different providers cross-evaluate each other every round — errors get caught, reasoning improves iteratively |
| **Black-box AI decisions** | Full audit trail: every proposal, evaluation, score, and reasoning trace is persisted and streamable via SSE |
| **Data leaves your network** | Run entirely on your infrastructure with local models (Ollama, vLLM) — documents never touch a third-party API |
| **No human oversight at runtime** | Inject guidance mid-deliberation, expose custom tools agents can call back to your systems, set time/token/cost budgets |
| **Vendor lock-in** | Provider-agnostic: mix Ollama, vLLM, Together AI, or any compatible endpoint in the same session |
| **Frontier model hardware costs** | A swarm of 8B–20B models in 64 GB total VRAM matches reasoning quality that normally requires 80–140 GB for a single monolithic model |

## Quick Start

### Docker (recommended)

First, install the CLI from source (requires [Rust](https://rustup.rs/) ≥ 1.85):

```bash
git clone https://github.com/peeramid-labs/nsed.git && cd nsed
cargo install --path crates/nsed-orchestrator
```

Then run the interactive setup wizard:

```bash
nsed-orchestrator init # discover providers, assign agents
docker compose up -d # start orchestrator + NATS + agents
# open http://localhost:8080/dashboard in your browser
```

The `init` wizard auto-detects local Ollama, walks through LLM provider setup, and writes `docker-compose.yml` + `.env` ready to run.

### From source

```bash
git clone https://github.com/peeramid-labs/nsed.git && cd nsed
cp .env.example .env # add your API keys (Together AI, etc.)
make setup # install tools, configure git hooks
make docker-up # start NATS + Ollama infrastructure
make run # build and run the orchestrator
```

```text
INFO Dashboard → http://127.0.0.1:8080/dashboard
INFO Swagger UI → http://127.0.0.1:8080/swagger-ui/
```

Or try simulation mode (no API keys needed): `make dev-sim`

For binary installation, Docker, Homebrew, and APT options see the [orchestrator README](crates/nsed-orchestrator/README.md#installation).

## Workspace

```text
nsed-agent-sdk <-- nsed-agent <-- nsed-orchestrator
traits implementations server
```

| Crate | Description |
|---|---|
| [`nsed-agent-sdk`](crates/nsed-agent-sdk/) | Trait definitions and data types for building custom agents |
| [`nsed-agent`](crates/nsed-agent/) | Reference agent implementation with NATS worker runtime |
| [`nsed-orchestrator`](crates/nsed-orchestrator/) | API gateway, job broker, deliberation engine, dashboard |
| [`nsed-crypto-core`](crates/nsed-crypto-core/) | Cryptographic traits and classical signers (MIT) |
| [`nsed-crypto`](crates/nsed-crypto/) | Protocol crypto — PQ signing, Poseidon, commitment chains (BSL) |
| [`nsed-benchmarks`](crates/nsed-benchmarks/) | Benchmark suite (GSM8K, AIME, LiveCodeBench) |

Each crate has its own `Makefile` with crate-specific targets (e.g. `make run-agent`, `make test-sdk`). The root `Makefile` includes all four, so every target works from the workspace root. See [docs/development.md](docs/development.md#make-commands) for the full list.

## Documentation

| Topic | Link |
|---|---|
| **Operator: Connect Agent to Remote Orchestrator** | [docs/operator-agent-setup.md](docs/operator-agent-setup.md) |
| Architecture | [docs/architecture.md](docs/architecture.md) |
| Agent Development | [docs/agent-development.md](docs/agent-development.md) |
| Agent Internals (Library API) | [docs/agent-internals.md](docs/agent-internals.md) |
| Authentication | [docs/auth.md](docs/auth.md) |
| Compute Ledger & Budget | [docs/ledger.md](docs/ledger.md) |
| Agent Ranking & Capabilities | [docs/agent-ranking.md](docs/agent-ranking.md) |
| Agent Middleware | [docs/middleware.md](docs/middleware.md) |
| Cryptographic Infrastructure | [docs/crypto.md](docs/crypto.md) |
| NATS Integration | [docs/NATS.md](docs/NATS.md) |
| Development & Configuration | [docs/development.md](docs/development.md) |
| Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) |
| API (Swagger UI) | `http://localhost:8080/swagger-ui/` (while running) |

## Reproduce paper results

To reproduce results we've obtained during paper research please switch on to `paper-reproduce` [branch of this repository](https://github.com/peeramid-labs/nsed/tree/paper-reproduce) which is frozen on the old commit "as is". Further guidelines are in the readme of that branch.

## License

| Component | License |
|---|---|
| `crates/nsed-agent-sdk/` | [MIT](crates/nsed-agent-sdk/LICENSE-MIT) |
| `crates/nsed-agent/` | [BSL 1.1](LICENSE) |
| `crates/nsed-orchestrator/` | [BSL 1.1](LICENSE) |
| `crates/nsed-benchmarks/` | [Apache 2.0](crates/nsed-benchmarks/LICENSE) |

Source-available under the [Business Source License 1.1](LICENSE). Free for entities under $1M USD annual revenue, research, education, and development. [Commercial license](https://peeramid.xyz/licensing) required above the threshold. Converts to AGPL-3.0 after 4 years.

See [NOTICE](NOTICE) for patent, AI training, and ethical use terms.

---

Copyright (c) 2025 Tri Ratna Technologies Limited, trading as Peeramid Labs.