Skip to content

Tags ​

The Core and AI tags (SUPPORT_TIERS.md): every attribute the parser accepts — a test fails when this list and the parser differ. Experimental tags are on their own page.

Core

q:component ​

A page or a reusable component. A file of components/ is served at its path (ROUTE-1).

AttributeTypeRequiredDefaultValuesDescription
namestringyesComponent name
require_authbooleanfalseOnly an authenticated, unexpired session sees it (AUTH-1)
require_rolestringComma-separated roles, one of which session.userRole must have (AUTH-2)
login_urlstringWhere an unauthenticated visitor is sent; a local path (AUTH-4)
require_permissionstringRequired permission(s)
interactivebooleanfalseClient-side hydration
typestringpureComponent type
portintegerPort
xml
<q:component name="Home">
  <p>Hello</p>
</q:component>

Specified by: AUTH-1 · AUTH-2 · AUTH-4 · PARSE-3 · ROUTE-1

q:param ​

A parameter of a component, function, action, query or tool, converted to type and checked against its rules (FN-1, ACT-2, DB-1)

Inside: q:function, q:query, q:invoke, q:action, q:tool

AttributeTypeRequiredDefaultValuesDescription
namestringyesParameter name
typeenumstringstring, text, number, integer, int, long, numeric, decimal, float, double, boolean, email, url, date, array, object, json, any, file, binary, upload, datetime, timeType the value is converted to. datetime and time exist only for a q:query's param; in a q:query the type is one of string, integer, decimal, boolean, datetime, date, time, array, json (PARSE-5)
defaultstringValue when none is given
valueexpressionThe value bound (in a q:query, q:invoke)
descriptionstringWhat it is (shown to the model in a q:tool)
validatestringemail, url, phone, cep, cpf, cnpj, uuid, creditcard, ipv4, ipv6A named validator, or a regular expression starting with ^
acceptstringAccepted uploads: image/*, .pdf, application/pdf (ACT-11)
maxsizestringLargest upload: 500KB, 5MB, 1GB (FILE-1)
maxLengthintegerLongest text bound to a query (DB-1)
scaleintegerDecimal places a query value is rounded to (DB-1)
nullbooleanBind an empty value as NULL (q:query)
sourcestringWhere the value comes from
requiredbooleanfalseThe value must be given and not empty
mindecimalSmallest number accepted
maxdecimalLargest number accepted
minlengthintegerShortest text accepted
maxlengthintegerLongest text accepted
patternregexRegular expression the text must match
enumstringComma-separated list of the values accepted
rangestringInclusive range, e.g. 1..10
xml
<q:param name="age" type="integer" required="true" min="18" />

Specified by: ACT-2 · ACT-6 · ACT-11 · DB-1 · ERR-1 · FILE-1 · FN-1 · IA-4 · INV-1 · PARSE-3 · PARSE-5 · SVC-3 · TEST-3 · UI-6 · UI-9 · UI-10 · UI-14

q:return ​

Ends the component or function with a value (RET-1, RET-2)

Inside: q:function

AttributeTypeRequiredDefaultValuesDescription
valueexpressionThe value; exactly one expression keeps its type
namestringName of the returned value
typestringType of the returned value
descriptionstringWhat it is

Specified by: LOOP-1 · LOOP-2 · LOOP-3 · RET-1 · RET-2 · RET-3 · SET-5

q:set ​

Stores a variable, converted to type, checked and changed by operation (ERR-1, SET-1, SET-3, SET-4)

Inside: q:action

AttributeTypeRequiredDefaultValuesDescription
namestringyesVariable name (session.x, application.x for the scopes)
valueexpressionThe value
typeenumstring, number, integer, decimal, boolean, array, object, json, text, int, long, numeric, float, doubleType the value is converted to (ERR-1); without it, a value that is one expression keeps its type (SET-5)
defaultstringStored when value resolves to nothing (SET-1)
operationenumassignassign, increment, decrement, add, multiply, append, prepend, remove, removeAt, clear, sort, reverse, unique, merge, setProperty, deleteProperty, clone, uppercase, lowercase, trim, formatWhat to do with the variable (SET-3)
stepinteger1Step of increment/decrement
indexintegerPosition for removeAt
keystringKey for setProperty/deleteProperty
sourcestringVariable clone copies
scopeenumlocallocal, function, component, session, application, requestWhere the variable lives
nullablebooleantruefalse: a null value is an error
validatestringemail, url, phone, cep, cpf, cnpj, uuid, creditcard, ipv4, ipv6A named validator, or a regular expression starting with ^ (SET-4)
requiredbooleanfalseThe value must be given and not empty
mindecimalSmallest number accepted
maxdecimalLargest number accepted
minlengthintegerShortest text accepted
maxlengthintegerLongest text accepted
patternregexRegular expression the text must match
enumstringComma-separated list of the values accepted
rangestringInclusive range, e.g. 1..10
xml
<q:set name="total" value="{price * qty}" type="number" />

Specified by: ACT-8 · ERR-1 · EXEC-1 · LOOP-6 · PARSE-1 · PARSE-2 · PARSE-3 · PARSE-5 · SET-1 · SET-2 · SET-3 · SET-4 · SET-5 · UI-8

q:if ​

Runs its body when the condition is true (IF-1..IF-4)

Inside: q:action

AttributeTypeRequiredDefaultValuesDescription
conditionexpressionyesAn expression; a missing name makes it false (EXPR-5)

Contains: q:elseif, q:else

Specified by: AUTH-6 · DATA-3 · EXEC-1 · EXPR-3 · EXPR-5 · IF-1 · IF-3 · IF-4 · RET-3 · UI-1 · UI-3

q:loop ​

Repeats its body (LOOP-1..LOOP-5)

Inside: q:action

AttributeTypeRequiredDefaultValuesDescription
typeenumrange, array, list, queryLoop type; inferred when missing
varstringThe loop variable
fromexpressionFirst number (range)
toexpressionLast number, included (range)
stepinteger1Step (range)
itemsexpressionThe list (array) or text (list)
indexstringName of the position variable, from 0
delimiterstring,Separator of a list loop
querystringName of the query to loop over (LOOP-4)

Specified by: ACT-8 · DEV-3 · EXEC-1 · IF-1 · IF-3 · LOOP-1 · LOOP-2 · LOOP-4 · LOOP-5 · PARSE-2 · PARSE-5 · UI-1 · UI-3 · UI-5

q:function ​

A function the component's expressions can call (FN-1..FN-4)

Inside: q:tool

AttributeTypeRequiredDefaultValuesDescription
namestringyesFunction name
returnTypeenumanyany, void, string, text, number, integer, int, long, numeric, decimal, float, double, boolean, email, url, array, object, jsonType the returned value is converted to (FN-4)
descriptionstringWhat it does
hintstringA hint for readers

Contains: q:param, q:return

Specified by: ACT-7 · ACT-10 · EXEC-1 · FN-1 · FN-2 · FN-3 · FN-4 · IF-1 · UI-8

q:query ​

Runs SQL on a declared datasource, binding :name to q:param (DB-1..DB-5, DB-9, UI-13)

Inside: q:transaction, q:action

AttributeTypeRequiredDefaultValuesDescription
namestringResult variable (<name>, <name>_result)
datasourcestringDatasource declared in quantum.config.yaml, or knowledge:<name> (IA-3)
sourcestringQuery of queries: an earlier query's name (DB-3)
resultstringAnother name for <name>_result
paginatebooleanfalseReturn one page (DB-2)
pageexpressionPage number, an expression (DB-9)
pageSizeintegerRows per page
page_sizeintegerRows per page
sortablebooleanfalseSort by the URL's ?sort=/&dir= (UI-13)
onerrorenumfailfail, continuefail stops the page with the error; continue hands it to <name>_result (INV-2, IA-5)

Contains: q:param

Specified by: ACT-4 · DB-1 · DB-2 · DB-3 · DB-5 · DB-9 · DB-11 · DEV-3 · EXEC-1 · IA-3 · IA-5 · INV-2 · PARSE-2 · PARSE-5 · UI-5 · UI-13

q:transaction ​

Its queries commit together or roll back together (DB-4)

AttributeTypeRequiredDefaultValuesDescription
datasourcestringDatasource of the queries that declare none
isolationLevelenumREAD_COMMITTEDREAD_UNCOMMITTED, READ_COMMITTED, REPEATABLE_READ, SERIALIZABLEIsolation level
isolationenumREAD_UNCOMMITTED, READ_COMMITTED, REPEATABLE_READ, SERIALIZABLEIsolation level (same as isolationLevel)

Contains: q:query

Specified by: DB-4

q:invoke ​

Calls a URL, a declared service or a function (INV-1, INV-2, SVC-3)

AttributeTypeRequiredDefaultValuesDescription
namestringyesResult variable
urlurlURL to request
servicestringName registered with @service (SVC-3)
functionstringFunction to call
componentstringComponent to call
methodenumGETGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONSHTTP method
timeoutinteger30Seconds to wait
contentTypestringapplication/jsonType of the body
authTypeenumbearer, apikey, basicAuthentication
authTokenstringToken for bearer/apikey
authHeaderstringHeader for apikey
authUsernamestringUser for basic
authPasswordstringPassword for basic
retryinteger0More attempts when it times out or cannot connect
retryDelayinteger1000Milliseconds between attempts
responseFormatstringautoHow to read the response
cachebooleanCache the response
ttlintegerCache seconds
resultstringAnother name for <name>_result
onerrorenumfailfail, continuefail stops the page with the error; continue hands it to <name>_result (INV-2, IA-5)

Contains: q:param, q:header, q:body

Specified by: EXEC-1 · IA-5 · INV-1 · INV-2 · PARSE-2 · PARSE-3 · PARSE-5 · RUN-2 · SVC-3

q:data ​

Imports CSV, JSON or XML as a list of records (DATA-1..DATA-4)

AttributeTypeRequiredDefaultValuesDescription
namestringyesResult variable
sourcestringyesFile or URL
typeenumcsvcsv, json, xmlFormat
delimiterstring,CSV separator
quotestring"CSV quote character
headerbooleantrueThe first CSV line is the header
encodingstringutf-8Encoding of the file or response
skip_rowsinteger0Lines to skip before the header
xpathstringXPath of the records (xml)
namespacestringXML namespace
cachebooleantrueCache the import
ttlintegerCache seconds
resultstringAnother name for <name>_result
onerrorenumfailfail, continuefail stops the page with the error; continue hands it to <name>_result (INV-2, IA-5)

Contains: q:column, q:field, q:transform, q:header

Specified by: DATA-1 · DATA-2 · DATA-4 · IA-5 · INV-2

q:action ​

Runs on a POST with the action field; its q:params are the validated form fields (ACT-1..ACT-11)

AttributeTypeRequiredDefaultValuesDescription
namestringyesAction name
methodenumPOSTPOST, GETHTTP method
tablestringTake the q:params from this table's schema (UI-10)
datasourcestringDatasource of table
columnsstringOnly these columns, in this order (UI-10)

Contains: q:param, q:set, q:query, q:if, q:loop, q:file, q:mail, q:flash, q:redirect

Specified by: ACT-1 · ACT-3 · ACT-4 · ACT-5 · ACT-6 · ACT-7 · ACT-8 · ACT-9 · ACT-10 · ACT-11 · AUTH-6 · AUTH-7 · DB-11 · DEV-1 · EXEC-2 · EXEC-3 · FN-1 · IF-1 · PARSE-2 · ROUTE-2 · TEST-3 · UI-1 · UI-10

q:redirect ​

Ends the action or page with a redirect (ACT-3, ACT-7)

Inside: q:action

AttributeTypeRequiredDefaultValuesDescription
urlexpressionWhere to
toexpressionWhere to (same as url)
flashexpressionMessage for the next page
statusinteger302HTTP status

Specified by: ACT-3 · ACT-7 · AUTH-6 · EXEC-2 · EXPR-12

q:flash ​

Inside a q:action: a flash of another kind for the next page (ACT-3)

Inside: q:action

AttributeTypeRequiredDefaultValuesDescription
typeenuminfoinfo, success, warning, errorKind
messageexpressionThe message (or the tag's text)

Specified by: ACT-3

q:file ​

Saves an upload, sends a stored file or deletes one (FILE-1, FILE-2)

Inside: q:action

AttributeTypeRequiredDefaultValuesDescription
actionenumyesupload, send, deleteWhat to do
fileexpressionyesThe upload, or the stored file's name
destinationstringFolder inside paths.uploads
nameConflictenummakeUniquemakeUnique, overwrite, skip, errorOn a clash
namestringFile name the browser gets (send)
resultstringResult variable

Specified by: FILE-1 · FILE-2

q:mail ​

Sends a message through mail: in quantum.config.yaml (MAIL-1, MAIL-2)

Inside: q:action

AttributeTypeRequiredDefaultValuesDescription
toexpressionyesRecipients
subjectexpressionyesSubject
fromstringSender (else mail.from)
ccstringCopy
bccstringHidden copy
replyTostringReply address
typeenumhtmlhtml, textBody format
bodyexpressionBody, when the tag has no content
namestringmailResult name (<name>_result)
onerrorenumfailfail, continuefail stops the page with the error; continue hands it to <name>_result (INV-2, IA-5)

Contains: q:attachment

Specified by: IA-5 · INV-2 · MAIL-1 · MAIL-2

q:import ​

Makes a component usable as <Name/> (COMP-1)

AttributeTypeRequiredDefaultValuesDescription
componentstringComponent name
fromstringFolder under paths.components
asstringLocal name
behaviorstringGame behavior (Laboratory)
prefabstringGame prefab (Laboratory)
tilemapstringGame tilemap (Laboratory)

Specified by: COMP-1 · ROUTE-3

q:slot ​

Where the content between <Name> and </Name> goes (COMP-3)

AttributeTypeRequiredDefaultValuesDescription
namestringSlot name

Specified by: COMP-3

AI

q:llm ​

A model call; with knowledge=, an answer that cites its sources (IA-1, IA-5..IA-9)

AttributeTypeRequiredDefaultValuesDescription
namestringyesResult variable
modelexpressionModel, an expression; else QUANTUM_LLM_DEFAULT_MODEL / llm.model (IA-1)
endpointexpressionAnother model server for this tag
apiKeyexpressionAPI key
providerenumollama, openai, anthropic, claude, lmstudio, autoProvider
temperaturedecimalTemperature
maxTokensintegerMost tokens to generate
responseFormatenumtexttext, jsonjson: the value is the parsed object
timeoutinteger60Seconds to wait for the model
knowledgestringAnswer from this q:knowledge, citing it (IA-6)
topinteger4Chunks to retrieve
minRelevancedecimal0Chunks below it are not retrieved, 0 to 1 (IA-9)
streambooleanfalseIn a web request, the answer arrives as it is written (IA-7)
cachebooleanfalseCache the answer
ttlintegerCache seconds
onerrorenumfailfail, continuefail stops the page with the error; continue hands it to <name>_result (INV-2, IA-5)

Contains: q:prompt, q:message, q:system

xml
<q:llm name="answer" model="phi3" knowledge="docs" minRelevance="0.79">
  <q:message role="user">{question}</q:message>
</q:llm>

Specified by: IA-1 · IA-2 · IA-3 · IA-5 · IA-6 · IA-7 · IA-8 · IA-9 · INV-2

q:knowledge ​

A base of text chunks that q:llm knowledge= answers from (IA-2, IA-6, IA-8)

AttributeTypeRequiredDefaultValuesDescription
namestringyesBase name
embedModelstringnomic-embed-textEmbedding model
chunkSizeinteger500Characters per chunk
chunkOverlapinteger50Characters shared by neighbouring chunks
persistbooleantrueKeep the index on disk
persistPathstring./.quantum/knowledgeWhere
rebuildbooleanfalseIndex again
onerrorenumfailfail, continuefail stops the page with the error; continue hands it to <name>_result (INV-2, IA-5)

Contains: q:source

Specified by: IA-2 · IA-5 · IA-6 · IA-8 · INV-2 · PARSE-3

q:agent ​

A model that uses the declared tools to do a task (IA-4, IA-5)

AttributeTypeRequiredDefaultValuesDescription
namestringyesResult variable
modelexpressionModel, an expression; else QUANTUM_LLM_DEFAULT_MODEL / llm.model (IA-1)
endpointexpressionAnother model server
apiKeyexpressionAPI key
providerenumautoollama, openai, anthropic, claude, lmstudio, autoProvider
maxIterationsinteger10Most reasoning steps
timeoutinteger60000Milliseconds for the whole run
onerrorenumfailfail, continuefail stops the page with the error; continue hands it to <name>_result (INV-2, IA-5)

Contains: q:instruction, q:tool, q:execute

Specified by: DEV-3 · IA-1 · IA-4 · IA-5 · IA-8 · INV-2

Inside other tags

q:elseif ​

Another branch of the q:if before it

Inside: q:if

AttributeTypeRequiredDefaultValuesDescription
conditionexpressionyesAn expression

Specified by: IF-1 · IF-3 · IF-4

q:else ​

The branch when no condition was true

Inside: q:if

No attributes.

Specified by: IF-1 · IF-3 · IF-4

q:header ​

A header of a q:invoke or q:data request

Inside: q:invoke, q:data

AttributeTypeRequiredDefaultValuesDescription
namestringyesHeader name
valueexpressionHeader value

Specified by: INV-1

q:body ​

The body of a q:invoke request (with expressions)

Inside: q:invoke

No attributes.

Specified by: INV-1

q:column ​

A CSV column converted to type (DATA-1)

Inside: q:data

AttributeTypeRequiredDefaultValuesDescription
namestringyesColumn name
typeenumstringstring, integer, decimal, boolean, json, arrayType

Specified by: DATA-1 · PARSE-3

q:field ​

A field of a JSON/XML record (DATA-2)

Inside: q:data

AttributeTypeRequiredDefaultValuesDescription
namestringyesField name
xpathstringPath relative to the record
pathstringPath relative to the record
typestringType

Specified by: DATA-2

q:transform ​

Operations applied in order (DATA-3)

Inside: q:data

No attributes.

Contains: q:filter, q:sort, q:limit, q:compute

Specified by: DATA-3

q:filter ​

Keeps the records for which the condition is true

Inside: q:transform

AttributeTypeRequiredDefaultValuesDescription
conditionexpressionyesAn expression over the record's fields

Specified by: DATA-3

q:sort ​

Sorts the records

Inside: q:transform

AttributeTypeRequiredDefaultValuesDescription
bystringyesField
orderenumascasc, descOrder

Specified by: DATA-3

q:limit ​

Keeps the first records

Inside: q:transform

AttributeTypeRequiredDefaultValuesDescription
valueintegeryesHow many

Specified by: DATA-3

q:compute ​

Adds a computed field

Inside: q:transform

AttributeTypeRequiredDefaultValuesDescription
fieldstringyesNew field
expressionexpressionyesIts value
typestringType

Specified by: DATA-3

q:attachment ​

A file attached to a q:mail

Inside: q:mail

AttributeTypeRequiredDefaultValuesDescription
filestringyesPath of the file

q:script ​

Client-side JavaScript of the page

No attributes.

Specified by: PARSE-1

q:prompt ​

The prompt of a q:llm (with expressions)

Inside: q:llm

No attributes.

q:system ​

The system message of a q:llm

Inside: q:llm

No attributes.

q:message ​

A chat message of a q:llm

Inside: q:llm

AttributeTypeRequiredDefaultValuesDescription
roleenumusersystem, user, assistantWho says it

q:source ​

A source of a q:knowledge, read whole (IA-8)

Inside: q:knowledge

AttributeTypeRequiredDefaultValuesDescription
typeenumyestext, file, directory, queryKind
pathstringFile or folder
patternstringFiles of the folder, e.g. *.md
datasourcestringDatasource of a query source
chunkSizeintegerCharacters per chunk for this source
chunkOverlapintegerOverlap for this source

Specified by: IA-8

q:instruction ​

The agent's instruction

Inside: q:agent

No attributes.

q:tool ​

A tool the agent can call; its body runs with the arguments as variables

Inside: q:agent

AttributeTypeRequiredDefaultValuesDescription
namestringyesTool name
descriptionstringWhat it does (shown to the model)
builtinbooleanfalseA built-in tool (q:team)

Contains: q:param, q:function

q:execute ​

The agent's task

Inside: q:agent

AttributeTypeRequiredDefaultValuesDescription
taskexpressionyesThe task
contextexpressionExtra text for the model
entrystringFirst agent (q:team)

Specified by: IA-4

MIT Licensed · Built with VitePress