Beş dakikada ilk kararınız.
Tek bir HTTP çağrısı: durumu gönderin, hükmü, kuralı, izi ve mührü alın. Etkileşimli referans: api.answerr.me/v1/docs.
Hızlı başlangıç
- Konsolda ücretsiz hesap açın. E-postanıza gelen bağlantıya tıklayınca ilk API anahtarınız (
ans_live_…) bir kez gösterilir. - Anahtarı bir ortam değişkenine koyun:
export ANSWERR_API_KEY=ans_live_… - Yerleşik
agent_mcp_guardkapısına sorun:
- Create a free account in the console. When you open the link sent to your e-mail, your first API key (
ans_live_…) is shown once. - Put the key in an environment variable:
export ANSWERR_API_KEY=ans_live_… - Ask the built-in
agent_mcp_guardgate:
curl -s https://api.answerr.me/v1/gates/agent_mcp_guard/decide \
-H "Authorization: Bearer $ANSWERR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"state": {"tool_name": "send_payment", "user_role": "member", "amount_usd": 7200},
"external_id": "call-123"}'
import os, requests
r = requests.post(
"https://api.answerr.me/v1/gates/agent_mcp_guard/decide",
headers={"Authorization": "Bearer " + os.environ["ANSWERR_API_KEY"]},
json={"state": {"tool_name": "send_payment", "user_role": "member", "amount_usd": 7200},
"external_id": "call-123"},
timeout=5,
)
d = r.json()
print(d["verdict"], d["trace"]["rule_id"], d["decision_id"])
const r = await fetch("https://api.answerr.me/v1/gates/agent_mcp_guard/decide", {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.ANSWERR_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ state: { tool_name: "send_payment", user_role: "member", amount_usd: 7200 },
external_id: "call-123" })
});
const d = await r.json();
console.log(d.verdict, d.trace.rule_id, d.decision_id);
Yanıtın özü:
The essentials of the response:
{
"verdict": "REVIEW", // ALLOW | REVIEW | DENY
"label": "ABSTAIN_REVIEW",
"decision_id": "dec_7f3c…",
"trace": { "rule_id": "tool_class:financial", "reason": "…", "policy_id": "agent_mcp_guard",
"policy_version": "2.0.0", "policy_seal": "sha256:…", "candidates": [ … ] },
"usage": { "period": "2026-10", "decisions": 1, "quota": 10000 },
"review": { "id": "rev_…", "status": "pending", "poll": "/v1/reviews/rev_…" } // Pro+
}
Kimlik doğrulama
Her istek Authorization: Bearer <anahtar> başlığıyla gelir (X-API-Key de kabul edilir). Anahtarlar konsolda oluşturulur, yalnızca bir kez gösterilir ve sunucuda özet olarak saklanır. İptal edilen anahtar en geç 30 saniye içinde her yerde geçersiz olur.
Every request carries Authorization: Bearer <key> (X-API-Key is accepted too). Keys are created in the console, shown once and stored only as a hash. A revoked key stops working everywhere within 30 seconds.
| Tür | Ön ek | Kullanım |
|---|---|---|
| API key | ans_live_ | Sunucular ve ajanlar: kararlar, incelemeler, sonuçlar, kullanım |
| Session | ans_sess_ | Konsol: anahtarlar, üyeler, plan, fatura, ayarlar (7 gün) |
| Anahtarsız | — | Yalnızca yerleşik kapılarla demo; kayıt ve kota yok, IP başına hız sınırı |
Karar isteği
POST /v1/decide ya da POST /v1/gates/{gate_id}/decide. Kapı yolunda katı mod her zaman açıktır: tanınmayan tek bir alan bile kararı İNSANA DEVRET'e çevirir.
POST /v1/decide or POST /v1/gates/{gate_id}/decide. The gate path is always strict: a single unrecognised field turns the verdict into REVIEW.
| Alan | Açıklama |
|---|---|
state | Karar verilecek durum (JSON nesnesi, en fazla 64 KB istek). |
gate_id / policy | Kayıtlı bir kapı ya da kaydedilmeyen satır içi taslak politika. |
mode | live (varsayılan) ya da shadow: kaydedilir ve sayılır, incelemeye düşmez (Pro+). |
observed_outcome | Bu vaka için sizin kararınız (ALLOW/REVIEW/DENY ya da true/false); gölge raporu için. |
external_id | Sizin referansınız (sipariş, araç çağrısı); kayıtta, incelemede ve webhook'larda döner. |
enqueue_review | REVIEW hükmü inceleme kuyruğuna gitsin mi (varsayılan true, Pro+). |
questions | İsteğe bağlı tipli sorular: noul (evet/hayır), choice, score. Soru metni hükmü değiştirmez; yalnızca evet/hayır yönünü belirler. |
Yanıt başlıkları: X-Answerr-Verdict, X-Answerr-Policy-Seal, X-Answerr-Decision-Id, X-Answerr-Quota-Remaining, X-RateLimit-Remaining.
Response headers: X-Answerr-Verdict, X-Answerr-Policy-Seal, X-Answerr-Decision-Id, X-Answerr-Quota-Remaining, X-RateLimit-Remaining.
Kapılar ve derleyici
Üç yerleşik kapı vardır: agent_mcp_guard, fintech_payment_tr, api_zero_trust_waf. Kendi kapınızı yazmak için politikayı Türkçe ya da İngilizce yazın, derleyin, testleri ve soruları inceleyin, sonra kaydedin. Derleyici hiçbir şeyi kendiliğinden kaydetmez.
Three built-in gates exist: agent_mcp_guard, fintech_payment_tr, api_zero_trust_waf. To write your own, describe the policy in Turkish or English, compile it, review the tests and questions, then register it. The compiler never registers anything on its own.
# 1) derle (kaydetmez)
curl -s https://api.answerr.me/v1/policies/compile -H "Content-Type: application/json" \
-d '{"gate_id": "acme_payments", "prompt": "5.000 doları aşan ödemeyi insana gönder. Başarısız deneme sayısı 3’ten fazlaysa reddet."}' \
| jq .policy_spec > acme_payments.json
# 2) kaydet (API anahtarı)
curl -s https://api.answerr.me/v1/gates -H "Authorization: Bearer $ANSWERR_API_KEY" \
-H "Content-Type: application/json" -d @acme_payments.json
# 3) karar al / kullan
curl -s https://api.answerr.me/v1/gates/acme_payments/decide -H "Authorization: Bearer $ANSWERR_API_KEY" \
-H "Content-Type: application/json" -d '{"state": {"amount": 9200, "failed_attempts": 0}}'
# 1) compile (does not register)
curl -s https://api.answerr.me/v1/policies/compile -H "Content-Type: application/json" \
-d '{"gate_id": "acme_payments", "prompt": "Route payments over $5,000 to human review. Deny if failed attempts exceed 3."}' \
| jq .policy_spec > acme_payments.json
# 2) register (API key)
curl -s https://api.answerr.me/v1/gates -H "Authorization: Bearer $ANSWERR_API_KEY" \
-H "Content-Type: application/json" -d @acme_payments.json
# 3) evaluate / decide
curl -s https://api.answerr.me/v1/gates/acme_payments/decide -H "Authorization: Bearer $ANSWERR_API_KEY" \
-H "Content-Type: application/json" -d '{"state": {"amount": 9200, "failed_attempts": 0}}'
Her kayıtlı kapının bir mührü (kanonik JSON'un SHA-256 özeti) vardır; her karar hangi mühürle verildiğini söyler. Plan başına özel kapı sayısı: Keşif 1, Geliştirici 10, Pro ve üstü 200.
Every registered gate has a seal (SHA-256 of its canonical JSON); every decision says which seal produced it. Custom gates per plan: Explore 1, Developer 10, Pro and above 200.
AI ajan entegrasyonu
Ajanınız bir aracı çalıştırmadan önce kapıya sorar. DUR ise araç çalışmaz; İNSANA DEVRET ise inceleme sonucunu bekler (ya da işi kuyruğa bırakır); GEÇ ise devam eder.
Your agent asks the gate before running a tool. STOP: the tool does not run. REVIEW: it waits for the review (or parks the job). ALLOW: it proceeds.
import os, time, requests
API = "https://api.answerr.me"
H = {"Authorization": "Bearer " + os.environ["ANSWERR_API_KEY"]}
def guarded(tool_name, args, run, user_role="member", wait_s=300):
d = requests.post(f"{API}/v1/gates/agent_mcp_guard/decide", headers=H, timeout=5,
json={"state": {"tool_name": tool_name, "user_role": user_role, **args},
"external_id": args.get("call_id")}).json()
if d["verdict"] == "ALLOW":
return run(**args)
if d["verdict"] == "DENY":
raise PermissionError(d["trace"]["reason"])
review = d.get("review") # Pro+: human-review queue
if not review:
raise PermissionError("needs a human: " + d["trace"]["reason"])
deadline = time.time() + wait_s
while time.time() < deadline:
r = requests.get(f"{API}{review['poll']}", headers=H, timeout=5).json()["review"]
if r["status"] == "approved":
return run(**args)
if r["status"] in ("rejected", "expired"):
raise PermissionError("rejected by reviewer: " + (r.get("note") or ""))
time.sleep(3)
raise TimeoutError("review still pending")
⚡ Otonom Refleks & Edge AI Modu (Sıfır İnsan Beklemesi)⚡ Autonomous Reflex & Edge AI Mode (Zero Human Dependency)
IoT aygıtları, gömülü sistemler, robotik veya yüksek frekanslı otonom ajanlarda bir insanın onayı beklenemez (air-gapped veya offline ortamlarda insan erişimi mümkün değildir). answerr karar motoru bu senaryolar için parametrik otonom refleks çözümü sunar: İstekte "autonomous": true (veya politika içinde "autonomous": true) gönderildiğinde, REVIEW durumu bastırılır ve sistem deterministik bir refleksle ALLOW ya da DENY kararma ulaşır.
Embedded systems, robotics, IoT devices, or high-frequency autonomous agent loops cannot stall waiting for human intervention (and offline/air-gapped edge environments have no human in the loop). answerr provides a parametric autonomous reflex resolution for these workloads: by specifying "autonomous": true, the REVIEW state is suppressed and deterministically resolved into a binary ALLOW or DENY.
⚙️ Parametrik Çözüm Modları (autonomous_bias)
⚙️ Parametric Resolution Modes (autonomous_bias)
"balanced"(varsayılan): Medyan eşiği (0.50). Noul ≥ 0.50 iseALLOW, altındaysaDENYkararına çözümlenir."balanced"(default): Median split (0.50). Resolves toALLOWif noul ≥ 0.50, otherwiseDENY."fail_closed": Güvenlik öncelikli uç sistemler için. Eşik altı veya şüpheli tüm sınır durumları derhalDENYile kesilir."fail_closed": For security-critical edge systems. Resolves any ambiguous boundary condition toDENY."permissive": Görev devamlılığı öncelikli durumlar için. Sınır durumlarıALLOWile yürütülür."permissive": For high-availability workflows. Resolves boundary conditions toALLOW.
🎯 Güven Endeksi ve Yeniden Deneme Filtresi (%45 – %65 Kritik Geçiş Bandı)
🎯 Confidence Index & Retry Filter (45% – 65% Boundary Band)
Otonom modda her kararla birlikte bir confidence_index (0.00 – 1.00) ve confidence_band (HIGH_CONFIDENCE, MODERATE_CONFIDENCE, MARGINAL_CONFIDENCE) döndürülür. Eğer hesaplanan noul olasılığı 0.42 ≤ noul ≤ 0.58 (%45 – %65) kritik geçiş aralığına denk gelirse, motor "retry_recommended": true bayrağını üretir. Böylece uç sistem, insan onayı beklemeden sensör telemetrisini zenginleştirerek veya kısa bir geri çekilme (exponential backoff) ile sorguyu yeniden deneyebilir.
In autonomous mode, each decision emits a confidence_index (0.00 – 1.00) and confidence_band (HIGH_CONFIDENCE, MODERATE_CONFIDENCE, MARGINAL_CONFIDENCE). When the computed noul probability falls within the critical boundary transition band 0.42 ≤ noul ≤ 0.58 (45% – 65%), the engine sets "retry_recommended": true. This allows edge clients to enrich telemetry or apply exponential backoff without stalling workflows.
// Örnek: Otonom Karar İsteği (Autonomous Edge Request)
POST https://api.answerr.me/v1/gates/agent_mcp_guard/decide
{
"state": {
"tool_name": "execute_shell",
"command": "git push origin main",
"auth_level": "elevated",
"_autonomous": true
},
"autonomous": true,
"autonomous_bias": "balanced" // "balanced" | "fail_closed" | "permissive"
}
// Yanıt: Deterministik Refleks Çözümlemesi
{
"verdict": "ALLOW",
"label": "GEÇ",
"autonomous_resolution": true,
"original_verdict": "REVIEW",
"confidence_index": 0.542,
"confidence_band": "MODERATE_CONFIDENCE",
"retry_recommended": true,
"risk_score": 0.12,
"noul": 0.528,
"policy_seal": "9f82...sha256"
}
// Example: Autonomous Edge Decision Request
POST https://api.answerr.me/v1/gates/agent_mcp_guard/decide
{
"state": {
"tool_name": "execute_shell",
"command": "git push origin main",
"auth_level": "elevated",
"_autonomous": true
},
"autonomous": true,
"autonomous_bias": "balanced" // "balanced" | "fail_closed" | "permissive"
}
// Response: Deterministic Reflex Resolution
{
"verdict": "ALLOW",
"label": "ALLOW",
"autonomous_resolution": true,
"original_verdict": "REVIEW",
"confidence_index": 0.542,
"confidence_band": "MODERATE_CONFIDENCE",
"retry_recommended": true,
"risk_score": 0.12,
"noul": 0.528,
"policy_seal": "9f82...sha256"
}
İnsan incelemesi
Pro ve üstünde, canlı moddaki her İNSANA DEVRET hükmü inceleme kuyruğuna girer (enqueue_review: false ile kapatılabilir). İnceleyiciler konsoldan ya da API ile onaylar veya reddeder. Çözülmeyen kayıt 7 günde expired olur. Onay/ret, karar kaydına gerçek sonuç olarak yazılır ve gölge raporunu besler.
On Pro and above every live REVIEW verdict enters the review queue (turn off with enqueue_review: false). Reviewers approve or reject in the console or through the API. Unresolved items expire after 7 days. The resolution is written to the decision log as the real outcome and feeds the shadow report.
GET /v1/reviews?status=pending
GET /v1/reviews/{id}
POST /v1/reviews/{id}/resolve {"action": "approve" | "reject", "note": "…"}
Bekleme yerine webhook kullanabilirsiniz: review.resolved olayı geldiğinde işi sürdürün.
Instead of polling, use webhooks: resume the job when the review.resolved event arrives.
Gölge mod ve geri test
Gölge mod: answerr'i mevcut kurallarınızın yanında aksiyonsuz çalıştırın. "mode": "shadow" gönderin ve kendi kararınızı observed_outcome olarak ekleyin (ya da sonradan POST /v1/decisions/{id}/outcome). Rapor; uyum oranını, answerr'in sizden sıkı olduğu (potansiyel yakalama) ve gevşek olduğu (potansiyel kaçırma) vakaları verir.
Shadow mode: run answerr next to your current rules without acting on it. Send "mode": "shadow" with your own decision as observed_outcome (or later via POST /v1/decisions/{id}/outcome). The report gives the agreement rate and the cases where answerr was stricter (potential catches) or looser (potential misses) than you.
GET /v1/account/shadow-report?days=30&gate_id=acme_payments
POST /v1/backtest {"gate_id": "acme_payments",
"records": [{"state": {...}, "observed_outcome": "DENY", "id": "order-1"}, ...]} // ≤ 1,000 / call
Geri test, geçmiş kayıtları canlıya çıkmadan önce bir kapıya ya da satır içi taslak politikaya karşı çalıştırır; her kayıt bir karar sayılır. Gölge mod, geri test ve dışa aktarım Pro ve üstündedir.
Backtest replays historical records against a gate or an inline draft before going live; each record counts as one decision. Shadow mode, backtest and export are on Pro and above.
Webhook’lar
Konsol › Ayarlar'dan bir https adresi girin (Pro+). Olaylar: review.created, review.resolved, quota.warning, ping. Her istek X-Answerr-Signature: t=<zaman>,v1=<hmac> başlığıyla imzalanır; HMAC-SHA256(gizli anahtar, "t.gövde"). 5 dakikadan eski zaman damgalarını reddedin. Teslim 3 kez denenir (0, 2, 8 sn).
Set an https URL in Console › Settings (Pro+). Events: review.created, review.resolved, quota.warning, ping. Each request is signed with X-Answerr-Signature: t=<time>,v1=<hmac>, HMAC-SHA256(secret, "t.body"). Reject timestamps older than 5 minutes. Delivery is attempted 3 times (0, 2, 8 s).
import hmac, hashlib, time
def verify(secret: str, body: bytes, header: str, tolerance=300) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
t = int(parts["t"])
if abs(time.time() - t) > tolerance:
return False
mac = hmac.new(secret.encode(), f"{t}.".encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(mac, parts["v1"])
{ "event": "review.created", "created": 1792010000,
"data": { "id": "rev_…", "decision_id": "dec_…", "gate_id": "agent_mcp_guard",
"rule_id": "tool_class:financial", "reason": "…", "external_id": "call-123",
"console": "https://answerr.me/pro/console/#reviews" } }
Karar kaydı
Her ölçülen karar; hüküm, kural, gerekçe, gecikme, mod, mühür, alan adları ve external_id ile kaydedilir. Alan değerleri kaydedilmez (yalnızca inceleme kuyruğu durum vektörünü tutar ve bu da kapatılabilir). Saklama: Keşif 7, Geliştirici 30, Pro 90, Kurumsal 365 gün.
Every metered decision is logged with verdict, rule, reason, latency, mode, seal, field names and external_id. Field values are not stored (only the review queue keeps the state, and that can be turned off). Retention: Explore 7, Developer 30, Pro 90, Enterprise 365 days.
GET /v1/account/decisions?limit=100&verdict=DENY&gate_id=…&mode=shadow&before=<ts>
GET /v1/account/decisions.csv?days=30 // Pro+
GET /v1/account/usage?days=30
Kota, hız ve hatalar
Aylık kota planınıza göre sayılır (dönem: Türkiye saatiyle takvim ayı). %80 ve %100'de e-posta ve quota.warning webhook'u gönderilir. Kota dolunca, aşım kapalıysa karar çağrıları 429 quota_exceeded döner. Hız sınırı API anahtarı başına 600 istek/dk ve 50 istek/sn'dir.
The monthly quota follows your plan (period: calendar month, Türkiye time). At 80% and 100% an e-mail and a quota.warning webhook are sent. When the quota is reached and overage is off, decision calls return 429 quota_exceeded. Rate limit per API key: 600 requests/min and 50 requests/s.
| HTTP | error | Anlamı |
|---|---|---|
| 400 | bad_outcome, policy_required, … | İstek geçersiz |
| 401 | unauthorized | Anahtar ya da oturum yok veya geçersiz |
| 403 | feature_unavailable, gate_limit, key_limit, seat_limit, account_suspended | Planınız ya da rolünüz buna izin vermiyor |
| 404 | no_review, no_decision | Kayıt yok ya da saklama süresi geçti |
| 409 | already_resolved, expired | İnceleme zaten sonuçlanmış |
| 429 | quota_exceeded / Too Many Requests | Aylık kota ya da hız sınırı; Retry-After başlığına uyun |
Güvenli varsayılan: answerr'e ulaşamadığınızda (ağ hatası, 5xx, 429) aracı çalıştırmayın; işlemi İNSANA DEVRET gibi ele alın.
Safe default: when answerr cannot be reached (network error, 5xx, 429) do not run the tool; treat the case as REVIEW.
Uç noktalar
/v1/decide · /v1/gates/{id}/decideKarar/v1/gatesYerleşik ve sizin kapılarınız/v1/policies/compile · /v1/gatesDerle · kaydet/v1/reviews · /v1/reviews/{id}İnceleme kuyruğu/v1/reviews/{id}/resolveOnayla / reddet/v1/backtest · /v1/decisions/{id}/outcomeGeri test · gerçek sonuç/v1/account · /usage · /decisions · /shadow-report · /statementsHesap, kullanım, kayıt, raporlar, ekstreler/v1/plans · /v1/healthPlan kataloğu · sağlıkEndüstriyel Kullanım Senaryoları & Derleyici Mimarisi
answerr Pro, model bağımlılığı olmaksızın mikro-saniyelik hızda deterministik karar veren bir kural motorudur. Aşağıda yaygın üretim mimarileri ve Derleyici (Policy Compiler) entegrasyon senaryoları özetlenmiştir.
answerr Pro is a model-free, deterministic policy kernel operating at sub-millisecond speeds. Below are key production use cases and Policy Compiler integration patterns.
1. AI Agent MCP Tool Guard
LLM'ler ve Otonom Ajanlar harici araçları (shell, sql, para transferi, api çağrısı) çalıştırmadan önce yetki matrisini doğrular. Prompt injection durumunda dahi geri dönülmez operasyonları engeller.
Guards autonomous LLM agents before executing privileged tools (shell, database mutations, fund movement). Prevents harmful actions even under active prompt injection.
MCP / Function Calling2. DeFi Risk & Werracle Radar SVR
Merkeziyetsiz finans borç verme havuzlarında (Morpho, Aave) dinamik teminat ve borçlanma tavanlarını yönetir. Werracle Radar SVR oraklı ile anlık temerrüt ve likidite risklerini filtreler.
Governs collateral parameters, dynamic LTV caps, and liquidation guards in DeFi lending vaults. Interoperable with Werracle Radar SVR oracle metrics.
Web3 / Risk Engine3. Edge AI, robotik ve çevrimdışı sistemler3. Edge AI, robotics & offline systems
İnternet bağlantısı olmayan otonom araçlar, İHA'lar veya endüstriyel SCADA saha cihazları. Derlenmiş JSON politikası yerel C / Wasm / Python çekirdeğinde 0.1 ms altında sıfır gecikmeyle çalışır.
Offline robotics, UAVs, and field SCADA gateways. Compiled JSON policies evaluate locally via Python, Wasm, or embedded C in under 100 microseconds.
Sub-millisecond Offline4. FinTech ve dolandırıcılık önleme4. FinTech & fraud prevention
Ödeme ağ geçitlerinde her işlem için anlık kural tabanlı değerlendirme. Kara kutu ML yerine, her reddin arkasında BDDK/GDPR uyumlu denetlenebilir kural izi (audit trace) ve SHA-256 mühür bırakır.
Real-time payment authorization and transaction fraud filtering. Provides fully auditable rule traces and cryptographic SHA-256 seals for regulatory compliance.
Audit-Ready FinTechPolitika Derleyicisi (Compiler Workflow)
Policy Compiler Workflow
Politikalar doğal dilde yazılır veya answerr Studio görsel editöründe tasarlanır. POST /v1/policies/compile uç noktası bunu optimize edilmiş AST ve doğrulanmış kanonik JSON politikasına dönüştürür:
Write policies in natural language or compose them in the answerr Studio visual editor. The POST /v1/policies/compile endpoint transforms them into canonical JSON AST:
// 1. Doğal Dilde Politika Derleme (Compile Endpoint)
POST https://api.answerr.me/v1/policies/compile
Authorization: Bearer ans_live_...
Content-Type: application/json
{
"text": "Eğer transfer_tutari > 50000 ve kullanıcı_yasi < 18 ise DUR. Eğer kyc_onay == false ise İNSANA DEVRET. Aksi halde GEÇ.",
"language": "tr",
"gate_id": "genclik_transfer_kurali"
}
// 2. Kapı Olarak Kaydetme & Doğrudan Çağrı
POST https://api.answerr.me/v1/gates/genclik_transfer_kurali/decide
{
"state": {"transfer_tutari": 75000, "kullanıcı_yasi": 16, "kyc_onay": true}
}
// Sonuç: {"verdict": "DENY", "trace": {"rule_id": "rule_1", "reason": "transfer_tutari > 50000"}}
// 1. Natural Language Policy Compilation (Compile Endpoint)
POST https://api.answerr.me/v1/policies/compile
Authorization: Bearer ans_live_...
Content-Type: application/json
{
"text": "If transfer_amount > 50000 and user_age < 18 then DENY. If kyc_verified == false then REVIEW. Otherwise ALLOW.",
"language": "en",
"gate_id": "youth_transfer_rule"
}
// 2. Register Gate & Direct Decision Evaluation
POST https://api.answerr.me/v1/gates/youth_transfer_rule/decide
{
"state": {"transfer_amount": 75000, "user_age": 16, "kyc_verified": true}
}
// Result: {"verdict": "DENY", "trace": {"rule_id": "rule_1", "reason": "transfer_amount > 50000"}}