— no output —
// Click Try to test an endpoint
| truth() | → trit(+1) | Affirm signal |
| hold() | → trit(0) | Neutral / hold |
| conflict() | → trit(-1) | Reject signal |
| invert(t) | → trit | Negate trit (-1↔+1) |
| consensus(a,b) | → trit | Ternary AND merge (max signal) |
| abs(x) | → int/float | Absolute value |
| min(a, b) | → int/float | Minimum of two values |
| max(a, b) | → int/float | Maximum of two values |
| pow(base, exp) | → int | Integer exponentiation |
| len(t) | → int | Length of tensor or string |
| length(t) | → int | Primary dimension of tensor |
| print(v) | Print value (no newline) | |
| println(v) | Print value + newline | |
| opent(path) | → int | Open file, returns handle |
| readt(handle) | → string | Read file contents |
| writet(handle, s) | → trit | Write string to file |
| trit | -1 / 0 / 1 | Balanced ternary value |
| int | i64 | 64-bit integer |
| float | f64 | 64-bit floating point |
| string | UTF-8 | Text value |
| bool | true/false | Boolean (coerced to trit) |
| trit[] | dynamic | Dynamic trit array / buffer |
| trittensor<N> | N×1 | Fixed-size trit tensor |
| trittensor<N,M> | N×M | 2D trit tensor |
| int[N] | fixed | Fixed-size integer array |
| float[N] | fixed | Fixed-size float array |
| agentref | ref | Handle to a spawned agent |
| if ? cond { A } tend { B } reject { C } | Ternary branch (+1/0/-1) | |
| if cond { A } else { B } | Binary branch | |
| while ? cond { body } | Ternary loop (runs on +1) | |
| for x in tensor { body } | Iterate over tensor elements | |
| match x { 1 => {} 0 => {} _ => {} } | Pattern match (int/trit/float) | |
| return val; | Return from function | |
| break; / continue; | Loop control | |
| val? | Early exit on -1 (returns conflict()) | |
| agent Foo { fn run(...) -> trit { } } | Declare agent type | |
| spawn Foo | → agentref | Create agent instance |
| send msg to ref | Push message to mailbox | |
| await ref | → trit | Run agent, get result |
| nodeid | → string | Current node address |
| spawn remote "addr" Foo | → agentref | Spawn on remote node |
| @sparseskip | Skip zero-signal weights (inference optimization) |
| BET-001 | StackUnderflow | Pop on empty stack — add missing return |
| BET-007 | TypeMismatch | Wrong type for op — check trit vs int vs float |
| BET-008 | TensorIndexOOB | Index beyond tensor size |
| BET-010 | DivByZero | Division or modulo by zero |
| BET-013 | CallStackOverflow | Deep recursion or unresolved import |
| BET-014 | AgentIdInvalid | send/await on invalid agent ref |
| BET-015 | AgentTypeNotRegistered | spawn without agent definition |
| PARSE-001 | UnexpectedToken | Syntax error — check grammar |
| PARSE-002 | ExpectedToken | Missing token (often ; or }) |
| MOD-004 | FileNotFound | Import path not found |
| 1, 0, -1 | int / trit | Integers; coerce to trit where needed |
| 3.14 | float | Decimal float |
| 0xFF, 0b1010 | int | Hex and binary integer literals |
| "hello" | string | String literal |
| true / false | bool→int | Boolean literals (1 / 0) |
| hold / tend | trit | Zero-state trit keyword |
| VM-STRUCT-001 | Returning structs from functions not stable — use intermediate vars | |
| COMP-TENSOR-001 | Tensor size max 65535 elements (16-bit immediate) | |
| MOD-004 | Named imports require all dependencies imported explicitly | |
| float[] / int[] | Array literals/params limited — use individual vars or trit[] | |
fn add(a: int, b: int) -> int {
return a + b;
}
match signal {
affirm => { println("YES"); }
tend => { println("HOLD"); }
reject => { println("NO"); }
}
agent Sensor {
handle(s: trit) {
spawn Consensus(s);
}
}
consensus(A, B) = min(A, B) where +1 > 0 > -1.
Nodes are the individual brains of your AI. They evaluate data and make a decision: +1 (True), 0 (Uncertain), or -1 (False). You use this panel to set their rules, ensuring they do not get stuck thinking forever.
Edges connect your nodes, but they also filter the traffic. They decide which decisions are allowed to travel to the next worker.
This is how you filter. If you want a strict system, use +1 so only perfect matches pass. If you want a flexible system, use != -1. This allows 0 (Uncertainty) to pass through, letting the AI continue working even if it is not 100 percent sure.
When a signal fails your logic check, you have choices.
Normally, an AI just spits out an answer and stops. Checking this box allows the AI to loop its thoughts backwards and re-evaluate its own work. It is a safety feature that gives the AI permission to think iteratively until it is sure.