Home / Docs / Una for agents / Schemas

una.run/1

Release v0.4.0

una.run/1 is a JSON document of the Agent ABI, defined in spec/13 §5. This page gathers what the specification says about it at v0.4.0: each section whole where it opens with the document, and otherwise the parts that name it.

Command line

From spec/13 §5, the parts that name this schema.

In human mode, the lines the program prints go to stdout as it prints them, and U6001, U6003, U6004, U6005 and U6009 go to stderr, with exit code 1. U6001 points at the name of main, or of init for a driven program, whose message then names init of the driven module (spec/26 §2 rule 2), and names the variant, with the payload fields whose labels are public; U6003 points at the call that exceeds the depth, or that finds the run over its memory budget. (v0.2, ADR 0113, 2026-10-15.) A native executable whose program has a task construct or a for ever reports U6003 with no position before main, the threads and stacks of this run's tasks could not be made, when the system refuses its threads or the 64 task stacks it reserves, as Linux can under strict overcommit (vm.overcommit_memory=2); a lower --max-depth shrinks that reservation (spec/27 §1 rule 4). A native executable's U6003 for a reference count at its limit has no position: its one line on stderr names the code and the message, and no trace file is written. The interpreter never reports it, so una run --json has no shape for it. U6004 points at the operation of Http given a header value with a control character (spec/24 §1). U6005 points at the Files.read or Env.get whose file content or variable value is not valid UTF-8 (spec/14 §3, ADR 0086). With --json, una run prints {"schema":"una.run/1","tier":...,"status":...,"output":[...],"failure":...,"diagnostics":[...],"trace":[...]} with keys in that order: tier is the tier the checks ran at; status is ok, failed (U6001), aborted (U6003, U6004, U6005, U6009 or U8001) or rejected (the checks reported errors, which diagnostics holds, and nothing ran); failure is null or {"variant":...,"fields":{...}} with the public fields only. U6009 is reported at the start of a run whose reachable code can make a hash table, before main and before any effect, when the host's random source gives no bytes for the process key of keyed hashing (spec/28 §1, ADR 0119 rule 9); no fixed or guessable key replaces it.