Quantify information diversity and redundancy across agent group communications.
Measures uncertainty/information content in agent messages:
text
H(X) = -Σ p(xᵢ) log₂ p(xᵢ)
Where p(xᵢ) is the probability of message type/category xᵢ.
Measures how much repeated/overlapping information exists:
text
R = 1 - H(X) / H_max
H_max = log₂(N) where N = number of distinct message categories.
Measures how much knowing one agent's output tells you about another:
text
I(A;B) = H(A) + H(B) - H(A,B)
High I(A;B) = high redundancy (agents say the same things). Low I(A;B) = high diversity (agents contribute unique info).
For two agents with topic sets T_A and T_B:
text
KO(A,B) = |T_A ∩ T_B| / |T_A ∪ T_B|
Jaccard similarity of knowledge domains.
js
const meter = require('./skills/agent-entropy-meter');
// Compute Shannon entropy from message distribution
meter.shannonEntropy([0.5, 0.3, 0.2]); // => 1.485
// Compute redundancy ratio
meter.redundancyRatio([0.5, 0.3, 0.2]); // => 0.065
// Compute mutual information between two agents
meter.mutualInformation(agentAmsgs, agentBmsgs, allCategories);
// Compute knowledge overlap (Jaccard)
meter.knowledgeOverlap(setA, setB);
// Full report
meter.report(agentData);
MetricLow (Good)High (Bad)MeaningRedundancy R< 0.2> 0.6Low = diverse info; High = echo chamberMutual Info I< 0.3> 0.7Low = independent; High = redundantKnowledge Overlap< 0.3> 0.7Low = complementary; High = duplicationEntropy H> 0.7·H_max< 0.3·H_maxHigh = diverse; Low = concentrated
The report() output includes ASCII bar charts for quick assessment.
For richer visualization, pipe output to mermaid-visualizer or excalidraw-diagram.