Ternary Intelligence Stack
Your AI agent has two states. Ternlang gives it three.
Quick Start
# Connect this server (installs CLI if needed)
npx -y smithery mcp add rfi-irfos/ternlang
# Browse available tools
npx -y smithery tool list rfi-irfos/ternlang
# Get full schema for a tool
npx -y smithery tool get rfi-irfos/ternlang trit_decide
# Call a tool
npx -y smithery tool call rfi-irfos/ternlang trit_decide '{}'Direct MCP Connection
Endpoint: https://ternlang--rfi-irfos.run.tools
Tools (34)
trit_decide— Convert float evidence into a ternary decision (-1 conflict / 0 hold / +1 affirm) with confidence score and human-reada…trit_consensus— Balanced ternary consensus of two trit values: +1 if both affirm, -1 if both conflict, 0 (hold) for any disagreement. U…trit_eval— Evaluate a single ternlang expression on the live BET (Balanced Execution Trit) VM. Returns the trit result. Good for q…ternlang_run— Compile and run a complete .tern source program on the BET VM. Use for multi-statement programs, function definitions, …quantize_weights— Quantize f32 neural network weights to ternary {-1, 0, +1} using BitNet-style absolute-mean thresholding. Returns quant…sparse_benchmark— Benchmark sparse vs dense ternary matrix multiplication. Reports sparsity ratio, multiply-op count for both methods, an…moe_orchestrate— MoE-13 deliberation — routes your query through 13 specialised expert agents (deductive, inductive, safety, fact-check,…moe_deliberate— EMA-based iterative deliberation engine. Feeds evidence round by round, applying exponential moving average smoothing, …trit_action_gate— Multi-dimensional safety gate for action authorisation. Each dimension contributes weighted evidence; any dimension mar…trit_upgrade— Returns a structured map of what is available free via MCP vs what unlocks with a paid API key: Tier 2 €24.99/mo (10k c…trit_mem_write— Write a memory entry to one of three layers: working (hot context, TTL 1h), session (flow patterns, TTL 24h), or core (…trit_mem_read— Read from three-layer memory using ternary attention. Each entry is scored: attention = key_overlap×0.35 + value_overla…trit_mem_consolidate— Run the three-layer memory consolidation cycle: (1) evict expired working entries; (2) promote affirm working entries t…trit_mem_stats— Return statistics for all three memory layers: entry counts, trit distribution (affirm/tend/reject), expired-but-not-ye…trit_mem_compress— Apply ternary sparsity compression to an entire memory layer in-place. Strips low-information sentences (density
## Prompts (2)
- `ternary_reasoning` — Activate ternary reasoning mode. Use trit_decide or trit_vector when evidence is mixed or incomplete, moe_orchestrate f…
- `decision_audit` (decisions) — Audit an AI system's decision log for binary habituation and EU AI Act compliance. Use trit_audit to detect over-relian…