Skip to main content

Module declaration

Module declaration 

Source
Expand description

Type surface of submilli:agents.

Two forms, one per meaning, as in submilli:llm. runText returns the agent’s final answer as text and is a plain function; a schema it takes is the program’s own, sent with the task and never used to check the answer. run<T> returns a checked T: it is declared generic and runtime-generic, so the host reads the JSON Schema of T from the $TypeDescriptor in the call’s $types environment and sends it with the run. T has no default. The typechecker gates it (matched by mangled name through is_checked_run) and, unlike llm.call, wraps the result in a structural check against T, so a mismatch throws. See stdlib/llm/declaration.rs for the descriptor and why the written declaration is the whole public API.

Functions§

is_checked_run
Whether mangled is the typed run, so the typechecker’s gate matches however the symbol was imported. runText is a plain function.
package_declaration