360 Secure SkillHub
360 安全技能中心

Agent Entropy Meter

核心功能为计算香农熵、冗余率、互信息、知识重叠系数4类指标,生成含解读与ASCII图表的评估报告;典型场景包括解答Agent通信熵/冗余疑问、分析通信效率、检测知识孤岛或冗余瓶颈、评估多Agent系统健康;输入Agent消息分布、主题集等数据,输出指标数值及解读,可对接外部可视化工具。

roamer-remote
roamer-remote
热度 46.52
最近更新 2026-05-11 17:44:07
分类:数据依赖:代码执行应用场景:数据处理 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add agent-entropy-meter
Metadata
name
agent-entropy-meter
description
Measure information entropy and redundancy in agent group communications. Use when user asks about agent communication efficiency, information redundancy, entropy metrics, or how to quantify knowledge overlap across agents.

Agent Entropy Meter

Quantify information diversity and redundancy across agent group communications.

When to Use

  • User asks "如何衡量Agent群体中的信息熵和冗余?"
  • Need to analyze agent communication efficiency
  • Detecting knowledge silos or redundancy bottlenecks
  • Evaluating multi-agent system health

Core Metrics

1. Shannon Entropy (H)

Measures uncertainty/information content in agent messages:

H(X) = -Σ p(xᵢ) log₂ p(xᵢ)

Where p(xᵢ) is the probability of message type/category xᵢ.

2. Redundancy Ratio (R)

Measures how much repeated/overlapping information exists:

R = 1 - H(X) / H_max

H_max = log₂(N) where N = number of distinct message categories.

3. Inter-Agent Mutual Information

Measures how much knowing one agent's output tells you about another:

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).

4. Knowledge Overlap Coefficient

For two agents with topic sets T_A and T_B:

KO(A,B) = |T_A ∩ T_B| / |T_A ∪ T_B|

Jaccard similarity of knowledge domains.

API

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);

Interpretation Guide

Metric Low (Good) High (Bad) Meaning
Redundancy R < 0.2 > 0.6 Low = diverse info; High = echo chamber
Mutual Info I < 0.3 > 0.7 Low = independent; High = redundant
Knowledge Overlap < 0.3 > 0.7 Low = complementary; High = duplication
Entropy H > 0.7·H_max < 0.3·H_max High = diverse; Low = concentrated

Visualization

The report() output includes ASCII bar charts for quick assessment. For richer visualization, pipe output to mermaid-visualizer or excalidraw-diagram.