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

# Configuring AI Agent Mandates in Synclear Protocol

> Field-by-field reference for the Synclear mandate schema and step-by-step instructions for creating and activating an on-chain agent mandate.

A mandate configuration defines the precise authorization envelope for a registered AI agent. Each field in the mandate schema corresponds to a constraint that is stored on-chain and enforced by the `MandateRegistry` contract at execution time. Configuring a mandate correctly is critical — overly permissive mandates increase operational risk, while overly restrictive mandates may prevent the agent from completing its intended function.

This page covers the full mandate schema, explains the purpose and valid values for each field, and walks through the end-to-end process of creating and activating a mandate.

## Mandate Schema Reference

The following JSON represents a complete mandate configuration object submitted to the `MandateRegistry`:

```json theme={null}
{
  "agentAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "permittedActions": ["DEPOSIT", "WITHDRAW"],
  "allowedAssets": [
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "0xdAC17F958D2ee523a2206206994597C13D831ec7"
  ],
  "allowedProtocols": [],
  "maxTransactionAmount": "10000000000",
  "maxDailyVolume": "50000000000",
  "expiresAt": 1893456000
}
```

Asset addresses in `allowedAssets` must be checksummed ERC-20 contract addresses as registered in the Synclear asset registry (the example above uses USDC and USDT on Ethereum mainnet). All monetary amounts are expressed as unsigned integers in the token's native decimal precision (e.g., 6 decimals for USDC, so `10000000000` represents 10,000 USDC). Submitting amounts in the wrong precision is a common configuration error and will result in unintended limit enforcement.

### Field Reference

<ParamField body="agentAddress" type="address" required>
  The checksummed Ethereum address of the registered AI agent that this mandate authorizes. The agent must already be registered in the Synclear agent registry under the principal's account. Mandates referencing unregistered addresses will be rejected at creation.
</ParamField>

<ParamField body="permittedActions" type="string[]" required>
  An array of action types the agent is authorized to perform. Valid values are drawn from a closed enum:

  * `BORROW` — initiate a credit draw against an approved credit line
  * `REPAY` — submit full or partial repayments on outstanding obligations
  * `DEPOSIT` — move assets into a Synclear-managed position or pool
  * `WITHDRAW` — redeem assets from a position or pool
  * `SWAP` — execute asset exchanges through permitted integrations

  Any action type not listed here will be rejected by the `MandateRegistry`, even if the agent's account has standing permission to perform it.
</ParamField>

<ParamField body="allowedAssets" type="address[]" required>
  An explicit allowlist of checksummed ERC-20 contract addresses that the agent may interact with. Each address must correspond to an asset registered in the Synclear asset registry. Interactions involving assets not on this list will be rejected at the contract level. Use the most restrictive list that satisfies the agent's operational requirements.
</ParamField>

<ParamField body="allowedProtocols" type="string[]">
  An optional list of protocol identifiers that the agent may route transactions through. If omitted, the agent is restricted to core Synclear protocol operations only. Specifying external protocol identifiers here enables integrations with whitelisted DeFi venues.
</ParamField>

<ParamField body="maxTransactionAmount" type="uint256" required>
  The maximum notional value, in the asset's base units, that may be moved in a single transaction. The `MandateRegistry` checks each incoming transaction against this cap before forwarding to the execution layer. Transactions exceeding this value are reverted.
</ParamField>

<ParamField body="maxDailyVolume" type="uint256" required>
  The maximum cumulative notional volume the agent may execute across all transactions within a rolling 24-hour window. The registry tracks daily usage per asset and rejects transactions that would cause the agent to exceed this limit. See [Spending Limits](/ai-agents/mandates-and-limits/spending-limits) for details on how the rolling window is calculated.
</ParamField>

<ParamField body="expiresAt" type="uint256" required>
  A Unix timestamp (in seconds) representing the moment this mandate ceases to be valid. The `MandateRegistry` compares this value against `block.timestamp` on every execution check. Mandates should be set to expire at a meaningful review boundary — typically no more than 90 days from activation for production agents.
</ParamField>

## Creating a Mandate

<Warning>
  Activating a mandate is an irreversible on-chain state transition. Once a mandate moves from `PENDING` to `ACTIVE`, it cannot be returned to `PENDING` — it can only be suspended or revoked. Review all mandate parameters carefully before proceeding with activation, as errors cannot be corrected without revoking the mandate and creating a new one.
</Warning>

<Steps>
  <Step title="Register the Agent">
    Navigate to **Settings → Agents** in the Synclear dashboard. Select **Register New Agent**, enter the agent's Ethereum address, and provide an optional descriptive label. Confirm the registration transaction from your principal wallet. The agent address must appear in the registry before you can proceed.
  </Step>

  <Step title="Open the Mandate Builder">
    From the agent's detail page, select **Create Mandate**. The mandate builder presents a structured form corresponding to the mandate schema. All required fields must be completed before the form will allow submission.
  </Step>

  <Step title="Configure Permitted Actions and Assets">
    Select the action types the agent requires from the permitted actions checklist. Then add assets to the allowlist using the asset picker, which displays only assets supported by your account's credit facilities. Apply the principle of least privilege — authorize only what is operationally necessary.
  </Step>

  <Step title="Set Spending Limits and Expiry">
    Enter the per-transaction cap and daily volume limit in the asset's native units. Use the unit converter in the interface to avoid decimal precision errors. Set an expiry date that aligns with your operational review schedule.
  </Step>

  <Step title="Submit and Confirm Creation">
    Select **Submit Mandate**. The interface will encode the mandate object and prompt you to sign and broadcast a creation transaction. Once the transaction is confirmed, the mandate exists on-chain in `PENDING` state.
  </Step>

  <Step title="Activate the Mandate">
    Return to the agent's mandate list and select **Activate** next to the newly created mandate. Confirm the activation transaction. After the transaction is mined, the mandate transitions to `ACTIVE` and the agent can begin operating under it immediately.
  </Step>
</Steps>

## Updating an Existing Mandate

Mandate parameters are immutable after creation. If you need to adjust permitted actions, change spending limits, or extend expiry, you must:

1. Suspend or revoke the existing mandate
2. Create a new mandate with the updated parameters
3. Activate the new mandate

This immutability is a deliberate design constraint that ensures the on-chain authorization record is a reliable, tamper-evident source of truth. It also means that mandate configuration decisions carry real operational weight and should be reviewed carefully before activation.
