> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tythe.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Delegate

> Binding agents, writing mandates, and controlling what software can do with your money: the scope fields, the ceiling, escalation, sub-delegation, and revocation.

Delegation is the reason Tythe exists. An agent on Tythe holds no funds of yours and has no authority of its own. It holds a key, and that key can do exactly what the mandate you wrote allows, checked inside your own account before anything moves. This page is how you bind an agent, write a mandate, and keep control of it.

## Binding an agent

An agent is a program with an ERC-8004 identity and a signing key held in its own runtime, never by Tythe. Binding takes two signatures and one agreement.

<Steps>
  <Step title="Register or link the identity">
    The agent receives an ERC-8004 identity on Base, or you link one it already has. This is what other systems can look up, and what Tythe publishes its Conduct Rating against.
  </Step>

  <Step title="Sign the Agent Authorization">
    Your operator signs it, appointing the agent as your agent and accepting responsibility for what it does under any mandate you issue. The agent's key co-signs as evidence that the key is yours to authorise.
  </Step>

  <Step title="The binding is recorded">
    The agent is bound to your account and registered as a signer with no scope. Until you issue a mandate it can do nothing.
  </Step>
</Steps>

An agent binds to one principal at a time. Unbinding requires no live mandate. You can freeze an agent at any time without touching the rest of your account.

## Writing a mandate

A mandate is a bounded, expiring, revocable grant of authority. Its fields are fixed: there is no scripting language and nothing arbitrary to get wrong.

| Field                   | What it controls                                                                                               |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- |
| Budget per period       | How much the agent may spend in a rolling window, and the window's length                                      |
| Maximum per transaction | The largest single action                                                                                      |
| Counterparties          | An allowlist, a denylist, or open counterparties if you permit it                                              |
| Per-counterparty limit  | How much may go to any one counterparty in a period                                                            |
| Rate limit              | How many actions in a window                                                                                   |
| Permitted rails         | Which of transfers, x402, venues, credit draw, credit repay, and lend the agent may use                        |
| Credit share            | What fraction of your available Credit Limit the agent may draw per period, and the longest term it may choose |
| Earn authority          | What share of idle balance it may move into venues, and per-venue caps                                         |
| Lend authority          | Whether it may supply or withdraw from the credit market                                                       |
| Time window             | When the mandate starts and when it expires                                                                    |
| Escalation threshold    | The action size above which your approval is required                                                          |
| Sub-delegation          | Whether the agent may delegate, and how deep                                                                   |

Every numeric field is a **ceiling**: the most you are willing to grant. The Intelligence Layer sets an **effective** value at or below it from the agent's Conduct Rating, and the agent operates at the effective value. A new agent starts conservatively and earns its way up. Nothing can set an effective value above your ceiling.

<Note>
  Issuing a mandate reserves its remaining period budget from your idle balance, and the sum of your live mandates' effective budgets can never exceed idle balance. If a mandate cannot be reserved, it cannot be issued.
</Note>

### Changing a mandate

* **Narrowing** takes effect in place. Lower a budget, tighten an allowlist, shorten an expiry, remove a rail.
* **Widening** requires revoking and reissuing, which re-checks your balance and your available credit. This is the one rule that keeps "narrow only" honest.
* **Expiry is mandatory.** There are no perpetual mandates. A bounded maximum applies to every one.

## Escalation

An action above the mandate's escalation threshold does not execute. It becomes a pending approval on-chain, visible in your console, with a time to live.

* Approve it and the agent may execute that exact action once, within the window.
* Reject it, or let it expire, and it fails.
* An approval cannot be reused for a second action.

The Intelligence Layer can also place an agent on hold, which routes every action to approval until the hold clears. Escalation is how you keep judgement in the loop for the actions that deserve it without approving the ones that do not.

## Sub-delegation

If you permit it, an agent can delegate to a sub-agent. The rules are strict.

* A sub-agent's ceiling is a strict subset of its parent's effective scope at the time of delegation, on every field.
* The sub-agent **shares the parent's budget**. Its spending draws down the parent's counters. Spawning agents can never create authority.
* Depth is capped, by your mandate and by the protocol.
* The chain of authority is recorded end to end, so every action resolves to you.
* Revoking the parent revokes every sub-agent below it, in the same transaction.

## Revoking

Revocation is immediate and total.

* The mandate stops validating anything.
* Every sub-agent beneath it is revoked.
* Open payment sessions close and their reservations release.
* It is never blocked by a system pause.

You can revoke from the console. Tythe's compliance function can freeze an agent. The Intelligence Layer can revoke automatically on a sanctions hit, repeated actions outside the time window, a run of rejected actions, or a pattern consistent with a compromised key. Any of those can happen without the others.

## Writing a good mandate

<AccordionGroup>
  <Accordion title="Start smaller than you think" icon="ruler" iconType="solid">
    The effective value starts below your ceiling anyway, and a well-behaved agent earns its way up within weeks. A ceiling you never revisit is the one that costs you.
  </Accordion>

  <Accordion title="Prefer allowlists to open counterparties" icon="list-check" iconType="solid">
    Most agents pay a small, stable set of services. An allowlist makes a compromised key almost useless and makes novel-counterparty anomalies meaningful.
  </Accordion>

  <Accordion title="Set an escalation threshold you will actually action" icon="inbox" iconType="solid">
    A threshold that fires daily will be ignored; one that never fires is not a control. Set it at the size where you would want to look.
  </Accordion>

  <Accordion title="Give credit share separately from spend" icon="scale-balanced" iconType="solid">
    An agent that pays for data does not need to draw Loans. Rails and credit share are separate fields for exactly this reason.
  </Accordion>

  <Accordion title="Use expiry as a review cycle" icon="clock" iconType="solid">
    A ninety-day expiry forces a decision four times a year about whether the agent still needs what it has.
  </Accordion>
</AccordionGroup>

## What you remain responsible for

Under the Agent Authorization, you are responsible for what your agents do within their mandates. Tythe narrows authority on evidence and revokes it on serious signals, but a payment made inside scope to a counterparty you allowlisted is your payment, and a Loan drawn inside an agent's credit share is your Loan.

<CardGroup cols={2}>
  <Card title="Agent underwriting" icon="gauge-high" href="/get-started/resources/intelligence-agent-underwriting">
    How the Conduct Rating moves effective scope inside your ceiling.
  </Card>

  <Card title="Operators and keys" icon="key" href="/principals/onboarding/operators-keys">
    The keys that sign mandates, approvals, and revocations.
  </Card>
</CardGroup>
