Skip to content

Explainer 01

8 scenes, about 5 minutes

An agent drafts, you approve

A message asks for an invoice. An agent turns it into a draft, the draft waits in your Approval Inbox, and nothing changes in your business until a person taps Approve.

Hands on. Break a draft and watch it bounce at the door, edit the amount, then approve it from the inbox or by typing in a Matrix room.

Read it in a look
Example

A message arrives (email, WhatsApp or chat)

Hi, please bill Sharma Traders for 40 hours of design work at ₹1,500 an hour, GST as usual. Thanks, Priya

Drafted by Invoice drafter

Reads the request with your item and customer names beside it. It is told: never invent a price, rate, customer or date; leave it empty instead.

  1. 01 / 08

    A message asks for an invoice

    Priya runs a small design studio. A message comes in: bill Sharma Traders for 40 hours of design work.

    On the AI plan, the Invoice drafter reads it. It gets your own item names and customer names beside the message, and one firm rule: never invent a price, a rate, a customer or a date. If the message doesn’t say it, the field stays empty.

  2. 02 / 08

    The agent writes a draft, not an invoice

    What comes back is a draft: the action it wants (kubera.invoice.create) and the details for it. Amounts are whole paise, so ₹1,500 is 150000 and nothing gets lost to rounding.

    An agent in INDRA can only return drafts. It has no way to issue the invoice, post to your books or send a message itself. That is built into how agents run, not a setting someone can switch off.

  3. 03 / 08

    Checked at the door

    Before a draft is even saved, INDRA checks it against the same rules a person’s invoice must pass: a customer name, at least one line, a quantity above zero, whole paise.

    A malformed draft is refused there and never reaches your inbox. Send a broken one and see the real messages.

  4. 04 / 08

    It waits in your inbox

    Good drafts land in Needs your OK, the Approval Inbox, with a number (#42 here), a one-line summary and who drafted it. The violet dashed edge always means the same thing: an agent wrote this and a person hasn’t decided yet.

    Until someone decides, nothing has happened. No invoice, no entry in the books, no receipt for the invoice.

  5. 05 / 08

    Change it before you approve

    Maybe it was 36 hours, not 40. You can edit the draft and approve your version. The total is worked out again with the same GST rules.

    INDRA remembers that the draft was edited before approval. That is how the Agents screen can tell you when an agent’s drafts keep needing corrections.

  6. 06 / 08

    Approve with one tap

    Tap Approve and four things happen together, inside one database transaction: the business is locked so changes go one at a time, the invoice is created, the journal is posted, and the receipts are written.

    If any step fails, all of it rolls back, and the draft stays in the inbox marked failed, with the reason, so you can fix it and approve again.

  7. 07 / 08

    Or approve from the team chat

    If your team uses Matrix chat, INDRA posts each draft as a card in the approvals room. Reply approve 42 or reject 42 too high and it runs the very same approval, with the same checks.

    Type into the room on the stage. Plain chat between people is left alone; help lists the commands.

  8. 08 / 08

    The rules that keep it honest

    Only owners, admins, managers and accountants can approve. Staff can draft and do the daily work, but not approve.

    And nobody approves their own draft, except the owner. If a manager types up an invoice herself, someone else signs it off. Try the combinations on the stage.

In plain words

The short version.

  1. Agents in INDRA only draft. A draft is the action it wants and the details, nothing more.

  2. Every draft is checked against the same rules as a person’s work before it is saved. Broken drafts never reach you.

  3. Drafts wait in one inbox. Approve, edit then approve, or reject: on your phone or by replying in Matrix.

  4. Approving runs everything in one go, and leaves a receipt naming who approved it. If anything fails, nothing changes.

  5. Only some roles can approve, and nobody but the owner approves their own draft.

Checked against the code

Where this lives in INDRA.

Every rule on this page is taken from these files. When the code changes, this page is meant to change with it.

  • lib/approvals.tspropose() puts a draft in the inbox; decide() approves or rejects it
  • lib/actions.tsevery change is an action, run in one transaction with one receipt
  • lib/agents/runtime.tsagents only return drafts; they never change the business
  • lib/contracts.tsthe invoice schema every draft must pass
  • lib/modules/sandesh/commands.tshow “approve 42” in a Matrix room is read
  • lib/modules/sandesh/card.tsthe card INDRA posts in the approvals room

About the examples. Priya, Sharma Traders and draft #42 are made up. The checks, the GST arithmetic, the chat card and the replies on the stage are INDRA’s own code, running in your browser. Nothing you type is sent anywhere.