In about ten minutes you’ll have a registered, KYC-bound AI agent under a spending mandate, executing its first authorized action with a full on-chain audit trail.
You’ll need a Regent account, KYC verification, and an API key. All free during the demo phase.
Step 1 — Sign up and complete KYC
Create your account
Sign up at web.regentprotocol.org with email and password. Verify your email via the link you receive.
Complete identity verification
Open the Settings page → Start Identity Verification. The KYC flow takes a few minutes and uses Regent’s mock verifier in demo mode.
Get a DID
On KYC completion, your user DID is issued and anchored on Solana. You’ll see it on the Settings page under “Your Decentralized Identifier.”
Once your status shows Identity Verified in green, move on.
Step 2 — Register an agent and create a mandate
Register the agent
On the Agents page click Register Agent, give it a name (e.g. demo-bot), and submit. Regent generates the AgentID, signs the identity payload with its KMS root key, and queues a Solana anchoring transaction.
Within a few seconds the agent’s status will flip from pending to active and on-chain status to anchored. You’ll get an agent_id like:
agent_b1c59d23a4b07165f80a48ae861e20924594042cf5e10130Create a mandate
On the Mandates page click Create Mandate. Bind it to your new agent, set:
- Per-transaction: $50
- Daily: $300
- Monthly: $5,000
- Currency: USD
Submit. The mandate is registered on Solana via the MandateRegistry program. Once anchored its status flips to active.
Create an API key
On the API Keys page click Create API Key. Copy the rgnt_… value — this is shown once.
Step 3 — Run your first authorized action
Set your env vars:
export REGENT_API_KEY="rgnt_..."
export REGENT_ORG_ID="..." # from Settings page
export REGENT_AGENT_ID="agent_..." # from Agents page
export REGENT_MANDATE_ID="..." # from Mandates pageInstall the Python SDK:
pip install regentAuthorize a $25 payment, log the action, and shut everything down:
import asyncio
from decimal import Decimal
from regent import RegentClient, AuthorizeRequest, IngestEventRequest
async def main():
async with RegentClient(
base_url="https://api.regentprotocol.org",
api_key="<REGENT_API_KEY>",
) as r:
# 1. Ask the mandate for permission
auth = await r.payment.authorize(
mandate_id="<REGENT_MANDATE_ID>",
request=AuthorizeRequest(amount=Decimal("25"), currency="USD"),
)
print(f"Authorized: jti={auth.jti}")
# 2. (Your business logic happens here — call an exchange, sign a tx, etc.)
# 3. Log the action to the audit trail
await r.audit.ingest_event(IngestEventRequest(
event_id=f"action-{auth.jti}",
agent_id="<REGENT_AGENT_ID>",
event_type="action.completed",
payload={
"amount": "25",
"currency": "USD",
"authorization_jti": auth.jti,
},
))
print("Logged to audit trail")
asyncio.run(main())You should see:
Authorized: jti=abc12345-...
Logged to audit trailWhat just happened
On the dashboard open your agent’s detail page and the Audit Log. You’ll see:
- A
payment.authorizedevent with thejti - An
action.completedevent you just emitted, with itspayload_hash - Both events queued for Merkle batching → Solana anchoring (status:
received→batched→anchoredover the next few minutes)
On the Solana Explorer the agent registration and mandate registration are already searchable by their TX signatures (shown on the agent + mandate detail pages).
Try the kill switch
While the script is still running, go to Agents → your agent → Revoke.
The next time the script calls /authorize it will fail with:
AGENT_NOT_ACTIVEor
MANDATE_SUSPENDED(All active mandates for a revoked agent are automatically suspended within milliseconds via the agent.revoked event consumer.)
That’s the full lifecycle: identity → mandate → authorize → action → audit → revoke. Everything else in the docs is detail on top of these primitives.
Where to next
Full walkthrough of every SDK method with code examples.
Python SDK guideA complete real-world example: an AI agent trading BTC on Binance under Regent’s authorization.
Binance trading agentInspect the Anchor programs that anchor agents, mandates, and audit batches on-chain.
Solana programsUse Regent directly over HTTP — no SDK required.
REST API