Mandatedocs
Reference

Environment variables

Every variable read anywhere in the repo, grouped by who reads it.

One .env at the workspace root serves the contracts, the SDK, the console, the MCP server and the examples. Copy .env.example to start. Testnet keys only.

Chains

VariableRead byPurpose
BASE_SEPOLIA_RPCSDK chains.ts, env.ts, fork testBase Sepolia RPC; default https://sepolia.base.org
ARC_TESTNET_RPCSDKArc testnet RPC; default https://rpc.testnet.arc.io
ARB_SEPOLIA_RPCSDKArbitrum Sepolia RPC (future Aave executor)
MANDATE_RPC_<chainId>SDK env.tsper-chain override that beats the two above

Account and roles

VariableRead byPurpose
MANDATE_ACCOUNT (alias ACCOUNT)SDK env.ts, SetPolicy.s.solthe MandateAccount address
MANDATE_DEPLOYMENTS_DIRSDK addresses.tswhere contracts/deployments/*.json live when not in-repo
AGENT_PRIVATE_KEYSDK env.tsthe agent's local key; omit for read-only
AGENT_ADDRESSDeploy.s.solthe agent address at deploy time
CIRCLE_API_KEY, CIRCLE_ENTITY_SECRET, CIRCLE_WALLET_SET_IDSDK env.ts, scripts/circle-setup.tsCircle developer-controlled wallet; all three required to switch
DEPLOYER_PRIVATE_KEY, OWNER_ADDRESS, GUARDIAN_ADDRESS, ACCOUNT_SALTDeploy.s.soldeploy-time only; the runtime reads guardian() from the chain
OWNER_PRIVATE_KEY, PER_TX_CAP, DAILY_CAP, EXPIRY_DAYSSetPolicy.s.solcaps in 6-decimal units
ARC_USDCDeploy.s.solArc mainnet USDC when deploying to chain 5042

Guardian (development only)

VariableRead byPurpose
MANDATE_GUARDIAN_KEYSDK env.tsauto-signing dev guardian for createMandateFromEnv
GUARDIAN_PRIVATE_KEYscripts/e2e.ts, dev-sign-approval.ts, examplesdev guardian for scripts
DEV_GUARDIAN_KEYexamples/vercel-ai-agentsame, example only
NEXT_PUBLIC_DEV_GUARDIAN_KEYconsole lib/ledger.tsapproval sheet signs locally instead of with a Ledger

None of these belong in a production environment. The guardian is the Ledger.

Store

VariableRead byPurpose
MANDATE_STORE_DIRSDK env.ts, console, MCP, agent scriptsfileStore directory
UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKENconsole lib/agent.ts, lib/ratelimit.tsRedis store and rate limiter
KV_REST_API_URL, KV_REST_API_TOKENconsolethe Vercel Marketplace spelling of the same
MANDATE_ENV_FILEMCP serverexplicit .env path

Data and model

VariableRead byPurpose
GRAPH_API_KEYSDK, probe-markets.tsThe Graph gateway key
ANTHROPIC_API_KEY, ANTHROPIC_MODELconsole lib/model.ts, examplesAnthropic API; default model claude-opus-5
AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, BEDROCK_MODEL_IDconsole, examplesAmazon Bedrock alternative

Console operations

VariableRead byPurpose
TOOL_APPROVAL_SECRETapi/chatsigns tool-approval tokens
CRON_SECRET, REMIND_DAYSapi/cron, scripts/cron.tsbearer for the cron route; reminder horizon (default 2)
MANDATE_EXECUTION_ENABLEDlib/agent.tsfalse disables execute_step
RL_CHAT_PER_10M, RL_CHAT_PER_DAY, RL_CHAT_GLOBAL_PER_DAY, RL_APPROVAL_POST_PER_10M, RL_APPROVAL_GET_PER_10M, RL_READ_PER_MINlib/ratelimit.tsrate-limit overrides
NEXT_PUBLIC_DOCS_URLconsole navlink to this site

Scripts and examples

VariableRead byPurpose
RECIPIENT, AMOUNT_USDC, BORROW_USDCscripts/e2e.ts, examples/node-scriptdemo payee and amounts
AMOUNTscripts/probe-markets.tsamount for the venue table

On this page