Skip to content

RFC: Neutrosophic Consensus Engine for Multi-Agent Decision Making #484

@SeCuReDmE-main-dev

Description

@SeCuReDmE-main-dev

RFC: Neutrosophic Consensus Engine for Multi-Agent Decision Making

Repository: awslabs/agent-squad
Author: Jean-Sébastien Beaulieu (SeCuReDmE Corp.)
Date: 2026-05-02
Status: Draft — Seeking Feedback
Type: Feature Proposal
Related Issues: #335 (ollama agent extension), #448 (unit tests for classifiers)


1. Problem Statement

What's broken today?

Agent Squad's Classifier selects one agent with a single confidence score (float 0–1). This architecture is structurally binary — it cannot express:

  1. Conflict: When two agents are equally good candidates for a query, the system has no way to signal "I'm torn between Agent A and Agent B."
  2. Ignorance: When the context is insufficient to make any classification, the system either guesses (low confidence) or falls through to a default agent — with no explicit "I don't have enough information" signal.
  3. Contradiction: When multiple agents in a SupervisorAgent team produce conflicting answers, responses are concatenated (''.join(responses)) rather than fused through a principled conflict-resolution mechanism.

The result: Multi-agent systems built with agent-squad have no native vocabulary for uncertainty. This forces every ambiguity into the binary confidence spectrum, where "I have no idea" looks identical to "I'm 50% sure" — a distinction that downstream systems cannot recover.

Real-world example

# Current behavior
User: "I need help with something"
Classifier: selected_agent=None, confidence=0.3

# What we want
User: "I need help with something"
NeutrosophicClassifier: 
  T=0.1  # "help" is weakly associated with any agent
  I=0.9  # "something" is maximally indeterminate
  F=0.0  # no evidence of wrong classification yetDecision: ASK_CLARIFICATION ("Could you be more specific about what you need help with?")

2. Proposed Solution

Neutrosophic Logic (Smarandache, 1995)

We propose integrating Neutrosophic Logic as a consensus and decision layer. Developed by Florentin Smarandache at the University of New Mexico, neutrosophic logic treats Truth (T), Indeterminacy (I), and Falsity (F) as three independent dimensions on [0, 1], where 0 ≤ T + I + F ≤ 3.

Dimension Meaning in Agent Context
T (Truth) How well does this agent match the query?
I (Indeterminacy) How much information is missing or ambiguous?
F (Falsity) How likely is this classification to be wrong?

Operators (from Smarandache's formalism)

N-norm (AND):   T₁∧T₂ = min(T₁,T₂),  I₁∧I₂ = max(I₁,I₂),  F₁∧F₂ = max(F₁,F₂)
N-conorm (OR):  T₁∨T₂ = max(T₁,T₂),  I₁∨I₂ = min(I₁,I₂),  F₁∨F₂ = min(F₁,F₂)
Negation:       ¬(T, I, F) = (F, I, T)

Consensus Algorithm

When multiple agents respond to a query (via SupervisorAgent), we fuse their responses using the N-conorm (union of truths, intersection of uncertainties):

def neutrosophic_consensus(responses: list[Triplet]) -> Triplet:
    T_consensus = max(r.T for r in responses)
    I_consensus = min(r.I for r in responses) 
    F_consensus = min(r.F for r in responses)
    return Triplet(T_consensus, I_consensus, F_consensus)

Decision Logic

if I > 0.6:
    action = ASK_CLARIFICATION       # Too much uncertainty
elif F > 0.5:
    action = ESCALATE_OR_REJECT      # Evidence of wrong classification
elif T > 0.7:
    action = RESPOND_WITH_CONFIDENCE # Strong consensus
else:
    action = RESPOND_WITH_CAVEAT     # Respond but flag uncertainty

3. Academic Foundation

This proposal is grounded in published, peer-reviewed work — not speculative theory.

Primary References

  1. Smarandache, F. "Neutrosophy: Neutrosophic Probability, Set, and Logic", American Research Press, 1998.
    → Foundation of the three-dimensional logic system.

  2. Smarandache, F. & Jdid, M.A. "Neutrosophic linear models and algorithms to find their optimal solution", 2020.
    → Chapter V: Modified Neutrosophic Simplex algorithm — formal proof of T/I/F optimization.

  3. Leyva-Vázquez, M.Y. & Smarandache, F. "Breaking the Chains of Probability: Neutrosophic Logic as a New Framework for Epistemic Uncertainty in Large Language Models", Neutrosophic Sets and Systems, 2026 (submitted).
    Directly relevant: Demonstrates that LLMs produce "hyper-truth" (T+I+F > 1) in 66% of unconstrained neutrosophic evaluations (N=100). Independently replicated by Mason (2026, arXiv:2604.09602) at 84% across 5 vendors.

  4. Smarandache, F., Ye, J. et al. "Neutrosophic Multi-Criteria Decision Making", 2018.
    → Aggregation operators for multi-criteria decisions under neutrosophic uncertainty.

Reference Implementation

The methodology for injecting T/F/I prompts into LLM agents is available as MIT-licensed code at:
👉 https://github.com/mleyvaz/neutrosophic-llm-logic (DOI: 10.5281/zenodo.19911845)

Author's Academic Profile

Florentin Smarandache — Emeritus Professor of Mathematics, University of New Mexico.
Published hundreds of papers and books on neutrosophic logic, set, probability, and statistics.
📚 Profile: https://unm.academia.edu/FlorentinSmarandache
📚 Library: https://fs.unm.edu/ScienceLibrary.htm


4. Implementation Plan

Phase 1 — Core Neutrosophic Engine (agent_squad/neutrosophic/)

New package, zero dependencies, backward-compatible:

File Purpose
triplet.py Triplet(T, I, F) dataclass with [0,1] validation
operators.py N-norm, N-conorm, negation (Smarandache formalism)
scorer.py Extract T/I/F from agent text responses (hedging detection)
consensus.py neutrosophic_consensus() — fuse N agent responses
decision.py Threshold-based decision: CLARIFY / CONFIDENCE / CAVEAT / REJECT

Phase 2 — Agent Squad Integration

  1. NeutrosophicClassifierResult — extends ClassifierResult with t_score, i_score, f_score
  2. NeutrosophicSupervisor — new Agent subclass that replaces string concatenation with T/F/I consensus fusion
  3. Orchestrator hook — optional use_neutrosophic=True in route_request()

Phase 3 — Tests & Documentation

  • Unit tests for all operators, scorer, consensus, and decision
  • Integration tests with mock multi-agent teams
  • Cookbook example: "Neutrosophic Consensus with 3 Agents"
  • All existing tests continue to pass (backward compatible)

Estimated Scope

  • ~950 lines of production code
  • ~650 lines of tests
  • ~30 atomic commits
  • No new external dependencies (pure Python)

5. Why agent-squad?

Agent Squad is the ideal host for this contribution because:

  1. Multi-agent native: SupervisorAgent already parallelizes agent calls — neutrosophic consensus is a natural upgrade to the fusion step.
  2. AWS Labs credibility: A neutrosophic reasoning layer in an AWS project legitimizes the approach for enterprise adoption.
  3. Open architecture: The Agent ABC and Classifier ABC are clean extension points.
  4. Apache-2.0: Compatible with academic citation and commercial use.

6. Prior Art & Uniqueness

Project Approach Gap
Swarms (6,596★) MajorityVoting — binary consensus No uncertainty dimension
ConsensusLLM (44★) Classical consensus — linear averaging No indeterminacy
Aegean Consensus (1★) Byzantine Fault Tolerance Blockchain, not AI agents
neutrolab (PyPI) Neutrosophic library Academic, not integrated in agent framework

No existing multi-agent framework has integrated neutrosophic consensus. This would be a first — and a differentiator for agent-squad.


7. Open Questions for Reviewers

  1. CLA: Does awslabs require a Contributor License Agreement for this scope of contribution?
  2. Naming: agent_squad.neutrosophic or a more general name like agent_squad.uncertainty?
  3. Default behavior: Should neutrosophic mode be opt-in (use_neutrosophic=True) or default for SupervisorAgent?
  4. Thresholds: The proposed thresholds (I>0.6→clarify, F>0.5→escalate, T>0.7→confidence) are initial values. Should they be configurable via AgentSquadConfig?

8. Acknowledgments

This RFC builds on the work of:

  • Prof. Florentin Smarandache (University of New Mexico) — founder of neutrosophic logic
  • Dr. Maikel Yelandi Leyva-Vázquez (Universidad Bolivariana del Ecuador) — neutrosophic LLM evaluation methodology
  • Dr. Maissam Ahmad Jdid (Damascus University) — neutrosophic simplex algorithms

Submitted for discussion. Feedback welcome on all aspects — scope, naming, integration strategy, and academic references.

— Jean-Sébastien Beaulieu
SeCuReDmE Corp.
Montréal, Canada

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions