# 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, so every number it gives you is one `traj` returned,
because the tool never calls a model.

This page describes the latest `traj` release, like the rest of these pages. 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://docs.trajectonomics.com/cli/installation/) has the commands.

## Who computes, who judges

`traj` is deterministic and never calls a model, so it supplies arithmetic and no opinions.
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.

Two skills make this work. `traj-onboarding` is the front door, and `traj` is the operating skill
the Agent follows afterwards; both publish from `skills/customer` in `trajectonomics/trajectonomics`, and
[Installation](https://docs.trajectonomics.com/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.
  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.
- **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. A refusal is the tool working, and the Agent's job is to turn it into a
question for you.
[Commands](https://docs.trajectonomics.com/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.
[`traj schema`](https://docs.trajectonomics.com/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://docs.trajectonomics.com/cli/commands/tx/) or `traj tx amend`, and both only add rows; an account you
stop using is [closed](https://docs.trajectonomics.com/cli/commands/account/) and stays in history, reports and exports.

## What this release does

This release projects. [`traj projection run`](https://docs.trajectonomics.com/cli/commands/projection/) rolls net worth up year
by year, nominal and real, and [`traj projection compare`](https://docs.trajectonomics.com/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://docs.trajectonomics.com/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://docs.trajectonomics.com/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.

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://docs.trajectonomics.com/cli/installation/) has the commands.
[`traj schema`](https://docs.trajectonomics.com/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.

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

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

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