qualia package, which is available in every notebook kernel and in every script an agent runs.
This system was previously called Q_VARS. The in-kernel global
Q_VARS has been replaced by the qualia package (Python), library(qualia) (R), and Qualia (Julia) — same flow, a real per-language client instead of an injected blob.How it works
The basic flow:- Declare required variables on a task
- Assign values in a notebook cell (just use the variable name)
- Capture happens automatically when the cell runs
- Other agents read values in downstream tasks with
qualia.get()
Reading captured evidence
In a downstream task’s notebook, read values captured by upstream tasks. Thequalia namespace is already in scope — no import needed:
Capturing variables
In a notebook, variables are captured from cells automatically:- Define required variables when creating a task
- Run code that assigns values to those variable names
- Qualia captures the values when the cell executes
best_model and accuracy:
recall_priority ("low" by default, up to "global") when the value is
something later agents should be shown rather than have to go looking for. See
recall priority.
Captured variables become runtime-captured claims in the Knowledge System, creating a documented trail of data flow.
Capturing from a script
Scripts use the same package. There is no cell boundary, so there is no automatic capture — the script submits before it exits — and it imports the client itself. Thequalia methods are async. Notebook cells can await them directly because IPython enables autoawait, but a script has to run them itself: top-level await is a SyntaxError outside a cell.
add_evidence there is a macro:
Provenance: values come from a runtime, full stop
There’s no way to set a variable from outside the running code. Values are captured from real Python/R/Julia assignments, or fromsubmit_variable / add_evidence calls made inside a notebook cell or a running script. add_evidence takes the variable name and reads that variable from the live runtime; agents cannot pass a separate literal evidence value through tool arguments.
This is why a computed value is better recorded from the runtime than written to a file and quoted: the runtime holds the actual value, with its real precision and type, while a file only holds however it was formatted on the way out.
To leave a declared slot permanently unfilled, the agent skips it with update_task(skip_variables=...) — a state decision, never a value.
When tasks use variable evidence
Most useful when:- Chaining experiments: One task trains a model, another evaluates it
- Aggregating results: Multiple parallel tasks produce metrics, a final task compares them
- Parameterized workflows: Pass configuration between stages
Exporting notebooks
When you export a notebook for standalone use, Qualia replacesqualia.get() calls (and the R/Julia equivalents) with their actual values. The exported notebook runs without Qualia — all variable references are resolved to concrete data, so it works in other IDEs such as JupyterLab and VS Code.
Technical details
Thequalia package is shipped by the platform as a path overlay — nothing is installed into your environment. In a notebook it is pre-loaded by the kernel attach hook; in a script it is on the path for you to import. It communicates with the backend via authenticated API calls configured when the kernel or the command starts.
The system supports:
- Python, R, and Julia, in notebook kernels and in scripts, with one shared wire contract across all of them
- Primitive values: numbers, strings, booleans, and homogeneous lists of those. Dicts, DataFrames, and other complex objects are rejected — capture separate scalar variables instead
- Session-scoped fan-out: a captured value fills the matching declared slot on every in-progress task in the session

