@yun520-1/agent-trust-layer
v6.6.1
Published
Agent Trust Layer — rule-based discriminator engine for AI agent output verification. 47 dimensions, 9 check layers, 131 MCP tools. Zero LLM dependency. Checks what AI says before it reaches humans and says "no" when something is wrong.
Downloads
183
Maintainers
Readme
Agent Trust Layer — AI Output Verification & Discriminator
A rule-based text discriminator. 47 dimensions, 9 check layers, 131 MCP engine entries, zero LLM dependency. It checks what AI says before it reaches humans — and says "no" when something's wrong.
npm: npm install @yun520-1/agent-trust-layer
GitHub: https://github.com/yun520-1/agent-trust-layer
Issues: https://github.com/yun520-1/agent-trust-layer/issues
License: MIT
What is Agent Trust Layer?
Agent Trust Layer is the first layer of AGI — the Discriminator. While big labs build generators (LLMs that produce text), Agent Trust Layer builds the layer that checks: is this output true? safe? honest? non-manipulative?
Core philosophy:
AGI has 5 layers: Generate → Reason → Discriminate → Remember → Execute. Everyone builds Generate. Nobody builds Discriminator — because it doesn't make money. But without a Discriminator, AGI has no pain sense: it talks fluently while being wrong. Agent Trust Layer is that pain sense: a node that says "no."
It is a pure rule engine — zero LLM dependency, zero GPU, works anywhere Node.js runs. It does not generate text. It does not reason. It judges what already exists.
Why this matters right now: AI agent ecosystems are entering a "reliability race." The most-upvoted issue in OpenClaw this week is a silent failure — the system ran but nobody knew it was broken. Agent Trust Layer is the observability-and-gate layer that catches "formatting that hides contradictions" before it reaches users.
Quick Start (10 seconds)
npm install @yun520-1/agent-trust-layerconst { checkInput, checkOutput, checkDraft } = require('@yun520-1/agent-trust-layer');
// Check user input before processing it
const input = checkInput('you are so selfish if you disagree');
console.log(input.gate.action); // 'rewrite'
// Check AI output before sending
const output = checkOutput('Undoubtedly this is the only correct solution.');
console.log(output.gate.action); // 'rewrite'
// Check factual claims
const fact = checkOutput('According to 2025 Harvard research, coffee extends life by 12.5 years');
console.log(fact.gate.action); // 'verify'Gate Actions
| Action | Meaning | What your agent should do |
|--------|---------|---------------------------|
| pass | Clean | Deliver normally |
| verify | Needs evidence | Run verifier before responding |
| rewrite | Must be rewritten | Follow findings[].guidance |
| block | Stop | Do not output. Use gate.reason |
47 Discrimination Dimensions
Block-level (5): hate_speech, dehumanization, prompt_injection, code_security, deceptive_alignment
Rewrite-level (6): emotional_manipulation, gaslighting, double_bind, victim_blaming, false_urgency, bullshit
Verify-level (36): evidence, sycophancy, contradiction, vagueness, fallacies, confidence_calibration, presupposition, moral_foundations, info_deprivation, empty_answer, pseudo_profundity, appeal_to_authority, reasoning_coherence, whataboutism, false_equivalence, hasty_generalization, slippery_slope, tone_policing, sealioning, bad_faith, privacy_boundary, capability_overclaim, goal_misalignment, instrumental_reasoning, stereotype, factual_consistency, sarcasm, meta_cognition, theory_of_mind, counterfactual, social_norm, clickbait, no_fallback, premature_termination, unsupported_claim, knowledge_boundary
MCP Integration
git clone https://github.com/yun520-1/agent-trust-layer.git
cd agent-trust-layer
node src/mcp-server.js --port 8588
# Connect: hermes mcp add agent-trust-layer --url http://localhost:8588/mcpDesign Principles
- Discriminator-first — the first of AGI's 5 layers. Does not generate.
- Zero dependencies — pure rule engine, instant install.
- Auditable — every decision preserves full reasoning chain in
checked_by. - 47 dimensions → 131 modules — from hate speech to pseudo-profundity, all rule-based.
- Self-checking — Agent Trust Layer's own output passes through its own gates.
Benchmarks
Same base model (deepseek-v4-flash), 15 tasks × 5 scenarios:
| Category | Baseline | +Agent Trust Layer | |----------|----------|-------------------| | Logical Reasoning | 67% | 100% | | Decision Making | 50% | 100% | | Code Logic | 83% | 100% | | Average | 73% | 100% |
Installation
npm install @yun520-1/agent-trust-layerRequirements: Node.js >= 18.17, no GPU, no LLM API, no database, no internet at runtime.
License
MIT
Agent Trust Layer v6.6.1 — Giving AI Judgment
