API and MCP
Gate your agent's trades from code.
One call before a swap: send a token and a policy, get ALLOW, DENY or REVIEW with every check and the fact it read, in an EIP-712 signed receipt. Answers come from the open rule engine today ("engine": "rules-v1"); when the judge model answers, the receipt will say so. Risk classification from public on-chain data, not financial advice.
Gate
Base URL https://actuaryai.pro/api/v1. No key, no account, CORS open, rate-limited per IP (HTTP 429 with Retry-After). Pay-per-call over x402 is coming; a free tier stays.
| Endpoint | What it does |
|---|---|
POST /gate | { "token": "0x…", "policy": {…} | "actuary-default-v1" } → decision, reasons, signed receipt. |
GET /gate/facts | The facts a policy may use, with type and meaning, and the rule syntax. |
GET /gate/presets | Built-in policies: actuary-default-v1, no-clones-v1. |
GET /receipts/{id} | A stored receipt. |
POST /receipts/verify | { "receipt": {…} } → is the signature ours and the content unchanged. |
GET /receipts/signer | The signer address and the EIP-712 domain. |
Policy
{
"policy": "my-agent-v1",
"deny_if": ["mint_with_live_owner", "ticker_clone_of_older", "first_hour_swaps < 20"],
"review_if": ["is_proxy", "liquidity_not_reported"],
"unknown": "review"
}
A rule is fact, !fact or fact OP value (< <= > >= == !=). Any matching deny_if gives DENY; otherwise a matching review_if gives REVIEW. A rule whose fact is missing is unknown: by default an unknown deny rule gives REVIEW, so missing data never lets a token through. Unknown fact names are rejected, so a typo cannot silently never match. Max 24 rules.
Example
curl -X POST https://actuaryai.pro/api/v1/gate \
-H "content-type: application/json" \
-d '{"token":"0x92de9d3888953f3c6a55840f189c409976d9bba1","policy":"no-clones-v1"}'
Receipts
Signed with EIP-712. Domain { name: "Actuary", version: "1", chainId: 4663 }, type Receipt(string id, address token, string decision, bytes32 policyHash, bytes32 bodyHash, uint64 issuedAt). policyHash is keccak256 of the canonical policy JSON; bodyHash covers every check, fact, reason, the engine and the sources. Verify with viem's recoverTypedDataAddress against /receipts/signer, or POST the receipt to /receipts/verify.
Mandates
Standing checks for tokens an agent already holds. About every 30 minutes we re-run the policy and POST to your webhook when the decision or the contract changes (owner, implementation, mint, pause, blacklist, supply moving 1% or more).
| Endpoint | What it does |
|---|---|
POST /mandates | { token, policy, webhook_url } → id and a secret shown once. |
GET /mandates/{id} | Status. Header Authorization: Bearer <secret>. |
POST /mandates/{id}/test | Send a test webhook now. |
DELETE /mandates/{id} | Stop the mandate. |
Webhooks carry X-Actuary-Event (mandate.decision_changed, mandate.contract_changed, mandate.test), X-Actuary-Timestamp and X-Actuary-Signature: sha256=HMAC_SHA256(secret, "<timestamp>.<body>"). Public https URLs only. A mandate stops after 20 failed deliveries; 20 active mandates per caller.
MCP server
Nine tools for AI agents: gate, gate_facts, verify_receipt, create_mandate, mandate_status, cancel_mandate, and check_token, premortem, autopsy_token.
git clone https://github.com/actuaryai/mcp.git
cd mcp && npm install
claude mcp add actuary -- node /absolute/path/to/mcp/server.mjs
Other endpoints
| Endpoint | What it does |
|---|---|
GET /verdict/{address} | Verdict from contract facts the server can read: owner, mint, blacklist, pause, proxy. |
POST /verdict | Same, plus market and holder facts you supply in ext. |
POST /premortem | Pre-mortem of a launch draft: risks, death patterns, fixes. |
POST /autopsy | What happened to a token the open collector watched for 24 hours. |
Machine-readable: openapi.json. Each verdict answer also carries narrative, a plain-language reading written from the verdict that adds no new facts.
Models
judge-31b (16-bit, Gemma 4 31B), judge-31b-GGUF (4-bit, 18.7 GB, for llama.cpp; accuracy of this build not measured yet) and coder-7b (fixes scanner flags in ERC-20 source; narrow synthetic training data, always compile). All Apache-2.0. The judge is not serving the Gate yet.
Sentinel
For people rather than agents: an email when a token's contract changes (owner, mint, blacklist or pause appearing, proxy upgrade, supply). Double opt-in, one-click unsubscribe. Sign up at /sentinel.
Actuary is independent and not affiliated with Robinhood. Fields may change before v1 is frozen. Actuary has no token yet; any contract address using our name is not ours.