What an activity has
- A title and description — human-readable labels that state what the activity computes.
- An equation — the mathematical relationship among its variables, written in TrueMath’s expression syntax.
- Calculable variables — for each variable the equation references, whether this activity may solve for it (see below).
- A state — active, disabled, or deleted (see Activity state).
An activity’s title and description document what the activity computes, for the people reading a domain.
Variables come from the equation
You do not create variables separately and then wire them into an activity. A variable first comes into being when you reference it by name in an equation. Writingpayment, loan_amount, rate, and term into the domain. Once a variable exists, you configure its display, default, and unit on the Defining variables. Reusing the same name in another activity refers to the same variable — this is how activities connect.
Calculable variables
An activity is not locked to a single input-output direction. The same equation that solves for a monthly payment from a loan amount, rate, and term can, given a target payment, solve for the loan amount instead. You control this by marking which of an activity’s variables are calculable — the ones it is allowed to solve for. Within that set, which variable an activity actually computes on a given run depends on the values provided and the variable asked for. Marking more variables calculable lets a domain answer more questions from the same activity; marking a variable as not calculable means the activity will only ever read it as an input, never produce it. Mark a variable calculable when it is meaningful to solve for it from the others. In a payment relationship, payment, loan amount, and term are all reasonable to solve for; a variable that should always be supplied — never derived — by this equation is left non-calculable.How activities compose
A domain is many activities connected through the variables they share. An activity that producesloan_amount and another that consumes loan_amount are linked by that shared variable, without any explicit wiring beyond the common name. Because of this, consistent variable naming is what holds a domain together — reuse the exact key across every activity that refers to the same quantity.
loan_amount flows from the first into the second, and payment from the second into the third. Depending on what you supply and ask for, and depending on which variables in which activities are marked calculable, the domain can solve forward to a payment or backward to an affordable home price.
Activity state
An activity is in one of three states:- Active — part of the domain and used when running calculations.
- Disabled — kept in the domain definition but not used in calculations. Use it to set an activity aside without losing it, or to stage one that is not ready.
- Deleted — removed from the domain.
GET /v1/domains/:id/activities reports the state of a live activity as published or disabled; deleted activities are not returned. See Domains.
Equations are validated as part of authoring, and incompatible operations — combining values whose dimensions do not match, for example — are rejected rather than silently coerced. See Combining types.

