Skip to Content

Agent

What the Agent asks you for, where the tool stops, and what this release does.

An Operator rarely types every traj command alone: an Agent runs them. traj is the deterministic tool and the Agent supplies the judgement (ADR 0001), so every number it gives you is one traj returned, because the tool never calls a model.

This page describes traj v0.2.0, the release the rest of these pages document. It covers the division of labour, the facts the Agent will ask you for, where the tool stops, and what this release does. Installation has the commands.

Who computes, who judges

traj is deterministic and never calls a model, so it supplies arithmetic and no opinions (ADR 0001). The Agent supplies the judgement: it asks you for the facts the tool needs, decides what to run, and reads the result back to you in your words.

The Agent passes --json on every call. The output format is never inferred from a terminal, so a pipe and a terminal cannot disagree by accident (ADR 0010).

Two skills make this work. traj-onboarding is the front door, and traj is the operating skill the Agent follows afterwards; both publish from trajectonomics/skills, and Installation carries the commands for both, so the command you run stays the current one.

What your Agent will ask you for

traj has no opinions, and the date a command acts on is always one you pass, so every fact it uses is one you state. Expect these questions before the first answer:

  • Dates. Every date a command acts on is YYYY-MM-DD, including every as-of date, and none is read off your machine: “today” is a date you give (ADR 0018, ADR 0029). When a command writes, the row it returns carries createdAt and updatedAt from your machine’s clock, plus archivedAt when you close an account and deletedAt when you remove a Scenario. They record when that row was written or removed, and no answer is taken from them. A date in a source can be a Buddhist Era year, which is the same day under a different year number: the Agent converts it, and asks you which calendar the source uses when the source does not say.
  • Account names. Every account is a name, exact and case-sensitive. The Agent reads your chart of accounts first, and an account you have not created comes back as a question rather than a guess (ADR 0018).
  • Amounts in your unit. A command-line amount is a decimal string in the accounts’ currency, such as "120.50". A Scenario document’s amounts are whole numbers of the currency’s smallest unit instead, so 120.50 baht is 12050 there. The Agent keeps the unit right, because an amount restated in another unit is a second number you never gave it.
  • The missing fact. When a fact is missing, or two readings of what you said both fit, you get a question, not a filled-in guess.

Where the tool stops

Commands never prompt (ADR 0010). A refusal is the tool working, and the Agent’s job is to turn it into a question for you. Commands has the classes as the CLI defines them; in your words they are:

  • 0 — ok.
  • 1 — an unexpected failure. That is a bug in traj, not a refusal: nothing you say will make it succeed.
  • 2 — invalid input, such as a malformed date or an unknown flag. Something has to change in the request.
  • 3 — the domain refused it: the ledger’s own rules said no.
  • 4 — not found: the account, transaction or Scenario does not exist.
  • 5 — a conflict, such as a name that is already taken.

In JSON mode a failure is an envelope on stderr with a code naming the failure, an exitCode naming its class, and a hint when there is one to give (ADR 0013). traj schema prints that registry, so the Agent reads the code instead of guessing what it meant.

Nothing in the ledger is edited or deleted. A wrong transaction is corrected by traj tx void or traj tx amend, and both only add rows; an account you stop using is closed and stays in history, reports and exports (ADR 0016).

What this release does

This release projects. traj projection run rolls net worth up year by year, nominal and real, and traj projection compare puts two Scenarios side by side, or one against a what-if, with the deltas in FI date, net worth at the ages you name and run-out year. traj fi answers the financial-independence question, with the 25× rule of thumb as a labelled reference.

Tax is the Scenario’s. traj scenario tax writes Thailand’s 2026 personal income tax into a Scenario and classifies the income Flows it applies to. A Scenario without that Levy is projected before tax, and every result says which it is (ADR 0032).

This release supports THB only.

The setup skill states a CLI version floor. On a traj below that floor it tells you which work this command line cannot do yet; the fix is to install the latest release, and Installation has the commands. traj schema is the honest list for the version in your hand, and you can run it too.

Check a number

Every figure states the as-of date it was read at, so a number without a date is one to ask about (ADR 0029).

Ask the Agent which command produced a number, then run it again: the same arguments give the same answer, and where the Agent and the tool disagree, the tool is right. You can read the rows yourself with traj inspect and traj export.

Previous: Your data · Next: Configuration.