Agent Reliability
Provides error monitoring, automatic fallback, confidence evaluation, and multi-agent voting to maintain accuracy in multi-step workflows.
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 15 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
OpenClaw
Suspicious
high confidencePurpose & Capability
The name, description, SKILL.md examples, and most source files (ReliabilityMonitor, FallbackManager, ConfidenceCalculator, VotingConsensus, ReportGenerator) consistently implement monitoring, fallback, confidence calculation, and voting/consensus features — these align with the skill's stated purpose.
Instruction Scope
SKILL.md usage examples are limited to requiring the module, creating objects, and calling library methods (no instructions to read system files, exfiltrate data, or call external endpoints). However, the included test suite and some modules expect or call APIs that are either missing or mismatched (see below), which means runtime behavior could be broken or behave unexpectedly if consumers follow the examples.
Install Mechanism
No install spec beyond 'npm install' in SKILL.md; package.json has no external dependencies and no install-time downloads. This is low risk from an installer perspective (no arbitrary remote code fetched during install).
Credentials
No required environment variables, no required binaries, and no requested config paths — the requested permissions are proportional to a pure JavaScript library.
Persistence & Privilege
Skill flags are default (not always:true), and there is no code that attempts to persistently modify agent/platform configuration or access other skills' credentials. No privileged persistence behavior detected.
What to consider before installing
This package appears designed to provide reliability tooling, but it contains multiple coherence issues that make it unreliable rather than malicious. Before installing or enabling it in any agent:
- Don't deploy to production yet. Run the tests locally (npm test) in an isolated environment to observe failures.
- Manually review the exported API surface: the tests call consensus.getSession and consensus.getStats and the ReportGenerator expects monitor.getStats(), but the codebase does not define these public methods consistently (ReliabilityMonitor provides getReliabilityScore(), VotingConsensus has no getSession/getStats accessor). These mismatches will cause runtime errors.
- Inspect ReportGenerator.generateMarkdown: it expects stats.successRate, stats.total, stats.successful, stats.failed, and stats.byStep, but the monitor returns a different object shape — that will produce incorrect reports.
- If you plan to use this library, either obtain a fixed release from a trusted source or patch the code to reconcile the API mismatches (add missing accessors or adjust callers).
- Because there are no network calls or secret requests in the code, immediate credential exfiltration risk is low; however, the poor code quality could hide other bugs — review all modules before automated or autonomous agent use.
If you want, I can list the exact mismatches and propose minimal patches to make the public API consistent with the tests/examples (e.g., add getStats/getSession wrappers or change ReportGenerator to consume getReliabilityScore()).Like a lobster shell, security has layers — review code before you run it.
Current versionv0.1.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Agent Reliability
Agent 可靠性框架,解决多步工作流中准确率递减问题。
功能特性
1. 错误率监控
- 实时错误率追踪
- 历史趋势分析
- 异常检测告警
- 错误分类统计
2. 自动回退机制
- 失败检测触发
- 回退策略配置
- 状态恢复
- 优雅降级
3. 置信度评估
- 单步置信度计算
- 累积置信度追踪
- 阈值告警
- 置信度可视化
4. 多 Agent 投票共识
- 投票策略(简单多数/加权/一致)
- 冲突解决
- 共识达成判定
安装
npm install
使用方法
ReliabilityMonitor
const { ReliabilityMonitor } = require('./src');
const monitor = new ReliabilityMonitor({
errorThreshold: 0.15,
confidenceThreshold: 0.85,
historyWindow: 100
});
// 记录执行结果
monitor.record({
stepId: 'step-1',
success: true,
confidence: 0.92,
duration: 1500
});
// 获取可靠性评分
const score = monitor.getReliabilityScore();
console.log(score); // { overall: 0.87, byStep: {...}, trend: 'improving' }
FallbackManager
const { FallbackManager } = require('./src');
const fallback = new FallbackManager({
maxRetries: 3,
backoffStrategy: 'exponential'
});
const result = await fallback.execute(async () => {
return await riskyOperation();
}, {
fallback: async () => await safeOperation()
});
VotingConsensus
const { VotingConsensus } = require('./src');
const consensus = new VotingConsensus({
strategy: 'weighted-majority',
minAgreement: 0.7
});
consensus.vote('agent-1', { decision: 'approve', confidence: 0.9, weight: 2 });
consensus.vote('agent-2', { decision: 'approve', confidence: 0.8, weight: 1 });
const result = consensus.resolve();
console.log(result); // { decision: 'approve', confidence: 0.87, agreement: 0.75 }
测试
npm test
License
MIT
Files
9 totalSelect a file
Select a file to preview.
Comments
Loading comments…
