# 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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0001-agent-first-no-llm.md)),
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](https://trajectonomics.com/docs/cli/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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0001-agent-first-no-llm.md)).
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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0010-output-contract.md)).

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](https://trajectonomics.com/docs/cli/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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0018-no-clock-in-ledger-commands.md),
  [ADR 0029](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0029-reads-take-their-date-from-the-caller.md)).
  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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0018-no-clock-in-ledger-commands.md)).
- **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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0010-output-contract.md)). A
refusal is the tool working, and the Agent's job is to turn it into a question for you.
[Commands](https://trajectonomics.com/docs/cli/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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0013-self-describing-error-envelope.md)).
[`traj schema`](https://trajectonomics.com/docs/cli/commands/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`](https://trajectonomics.com/docs/cli/commands/tx/) or `traj tx amend`, and both only add rows; an account you
stop using is [closed](https://trajectonomics.com/docs/cli/commands/account/) and stays in history, reports and exports
([ADR 0016](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0016-three-deletion-stories.md)).

## What this release does

This release projects. [`traj projection run`](https://trajectonomics.com/docs/cli/commands/projection/) rolls net worth up year
by year, nominal and real, and [`traj projection compare`](https://trajectonomics.com/docs/cli/commands/projection/) 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`](https://trajectonomics.com/docs/cli/commands/fi/) answers the financial-independence
question, with the 25× rule of thumb as a labelled reference.

Tax is the Scenario's. [`traj scenario tax`](https://trajectonomics.com/docs/cli/commands/scenario/) 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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0032-tax-is-the-scenarios-levy.md)).

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](https://trajectonomics.com/docs/cli/installation/) has the commands.
[`traj schema`](https://trajectonomics.com/docs/cli/commands/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](https://github.com/trajectonomics/cli/blob/v0.2.0/docs/adr/0029-reads-take-their-date-from-the-caller.md)).

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`](https://trajectonomics.com/docs/cli/commands/inspect/) and
[`traj export`](https://trajectonomics.com/docs/cli/commands/export/).

Previous: [Your data](https://trajectonomics.com/docs/cli/data/) · Next: [Configuration](https://trajectonomics.com/docs/cli/configuration/).

Part of the [Docs index](https://trajectonomics.com/docs/llms.txt).
