Skip to main content

The hierarchy

Sense’s design starts from a small hierarchy of computational units, each one strictly more capable — and more autonomous — than the last:

Function — bounded computation

A function has no goal of its own and no independent lifecycle. It runs when called, produces a result, and is done. This is where every mainstream language already lives, and it’s where Sense’s deterministic core lives too — see Functions.

Process — has a lifecycle, not necessarily a goal

A process is independently executing — it persists across time in a way a function call doesn’t. session is Sense’s first taste of this: an execution/context boundary rather than a plain function call. See Sessions.

Agent — pursues something

An agent is an autonomous process that:
  • pursues an objective
  • reasons over its own state
  • selects actions
  • operates within capabilities and policies
  • observes outcomes and updates its state
This is agent in Sense — a genuine runtime entity with identity, state, and (as of the current implementation) a real pause/resume lifecycle. See Agents.
These are semantic foundations, not a claim that the final syntax will always look this way. The hierarchy needed to be understood before syntax was locked in, which is why Sense’s actual keywords (fn-less function declarations, session, agent) came late in the design process rather than first.

Deterministic and probabilistic computation

The other axis of Sense’s model is how certain a value is. Traditional languages have exactly one answer: everything is certain, because everything is computed. Sense needs a second lane:
Ordinary values, computed by ordinary code. What every language already has.
The critical design rule here: the language must not pretend AI-generated results are deterministic. It would be easy (and tempting, for ergonomics) to let ask(...) just return a plain string. Sense deliberately doesn’t, because the entire point is to keep “I know this” and “I inferred this with 50% confidence” visibly, structurally different — forever, not just at the one call site where a programmer happened to remember to check.

A declarative future, not built today

Every example on this site is procedural — you write the steps:
A more declarative style is possible in principle: a program states a desired outcome, and the runtime constructs an execution plan itself to reach it, respecting whatever constraints are declared alongside it. That planner is not implemented (see Roadmap), deliberately: building a fake one would mean pretending Sense has AI planning it doesn’t. Declaring a goal with no real planner to act on it would just be a function call with extra ceremony — worth adding only once there’s an actual planner for it to mean something to.

Continue

Design order

Why syntax was decided last, and what that ordering protected against.

Model, Ask & Answer

The probabilistic half of the model, as it actually exists today.