[{"data":1,"prerenderedAt":752},["ShallowReactive",2],{"docs:\u002Fdocs\u002Ffor-developers":3},{"id":4,"title":5,"body":6,"description":744,"extension":745,"meta":746,"navigation":747,"path":748,"seo":749,"stem":750,"__hash__":751},"docs\u002Fdocs\u002Ffor-developers.md","For developers",{"type":7,"value":8,"toc":730},"minimark",[9,14,18,178,181,185,191,247,250,257,261,264,326,329,333,336,446,449,453,469,472,476,483,492,496,499,527,535,539,588,592,623,626,630,661,665,685,689,726],[10,11,13],"h2",{"id":12},"what-you-get-on-day-one","What you get on day one",[15,16,17],"p",{},"You add three lines to your agent:",[19,20,25],"pre",{"className":21,"code":22,"language":23,"meta":24,"style":24},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Iqrar } from \"@iqrar\u002Fagent\";\n\nconst iqrar = Iqrar({ org: \"acme\", jurisdiction: \"EU\", capabilities: [\"consumer_chatbot\"] });\nexport const myAgent = iqrar.wrap(existingAgent);\n","ts","",[26,27,28,64,71,150],"code",{"__ignoreMap":24},[29,30,33,37,41,45,48,51,54,58,61],"span",{"class":31,"line":32},"line",1,[29,34,36],{"class":35},"s7zQu","import",[29,38,40],{"class":39},"sMK4o"," {",[29,42,44],{"class":43},"sTEyZ"," Iqrar",[29,46,47],{"class":39}," }",[29,49,50],{"class":35}," from",[29,52,53],{"class":39}," \"",[29,55,57],{"class":56},"sfazB","@iqrar\u002Fagent",[29,59,60],{"class":39},"\"",[29,62,63],{"class":39},";\n",[29,65,67],{"class":31,"line":66},2,[29,68,70],{"emptyLinePlaceholder":69},true,"\n",[29,72,74,78,81,84,87,90,93,97,100,102,105,107,110,113,115,117,120,122,124,127,129,132,134,137,139,142,145,148],{"class":31,"line":73},3,[29,75,77],{"class":76},"spNyl","const",[29,79,80],{"class":43}," iqrar ",[29,82,83],{"class":39},"=",[29,85,44],{"class":86},"s2Zo4",[29,88,89],{"class":43},"(",[29,91,92],{"class":39},"{",[29,94,96],{"class":95},"swJcz"," org",[29,98,99],{"class":39},":",[29,101,53],{"class":39},[29,103,104],{"class":56},"acme",[29,106,60],{"class":39},[29,108,109],{"class":39},",",[29,111,112],{"class":95}," jurisdiction",[29,114,99],{"class":39},[29,116,53],{"class":39},[29,118,119],{"class":56},"EU",[29,121,60],{"class":39},[29,123,109],{"class":39},[29,125,126],{"class":95}," capabilities",[29,128,99],{"class":39},[29,130,131],{"class":43}," [",[29,133,60],{"class":39},[29,135,136],{"class":56},"consumer_chatbot",[29,138,60],{"class":39},[29,140,141],{"class":43},"] ",[29,143,144],{"class":39},"}",[29,146,147],{"class":43},")",[29,149,63],{"class":39},[29,151,153,156,159,162,164,167,170,173,176],{"class":31,"line":152},4,[29,154,155],{"class":35},"export",[29,157,158],{"class":76}," const",[29,160,161],{"class":43}," myAgent ",[29,163,83],{"class":39},[29,165,166],{"class":43}," iqrar",[29,168,169],{"class":39},".",[29,171,172],{"class":86},"wrap",[29,174,175],{"class":43},"(existingAgent)",[29,177,63],{"class":39},[15,179,180],{},"In return you get every benefit on this page. None of them require you to write extra code, change your call sites, swap your model, or restructure your agent.",[10,182,184],{"id":183},"_1-free-structured-observability","1. Free, structured observability",[15,186,187,190],{},[26,188,189],{},"iqrar.wrap(...)"," produces a transparent proxy that emits canonical telemetry events around every callable on the wrapped target — start, end, error, with duration, model, tools, and token usage when the underlying SDK exposes it. You also get:",[192,193,194,211,223,231,239],"ul",{},[195,196,197,210],"li",{},[198,199,200,203,204,203,207],"strong",{},[26,201,202],{},"agent.invocation.start"," \u002F ",[26,205,206],{},".end",[26,208,209],{},".error"," for each call",[195,212,213,222],{},[198,214,215,203,218,203,220],{},[26,216,217],{},"agent.tool.start",[26,219,206],{},[26,221,209],{}," when frameworks expose tools",[195,224,225,230],{},[198,226,227],{},[26,228,229],{},"agent.step"," for per-step events from CrewAI, LangChain agent actions, etc.",[195,232,233,238],{},[198,234,235],{},[26,236,237],{},"agent.handoff"," for multi-agent handoffs",[195,240,241,246],{},[198,242,243],{},[26,244,245],{},"agent.classified"," with your tier and the obligations that apply",[15,248,249],{},"All batched, debounced, durable, and non-blocking. Telemetry never breaks the host — failed flushes are dropped silently.",[15,251,252,253,256],{},"This is what you'd build with OpenTelemetry + a collector + a backend, except you don't write any of it. If you already use OTel, the upcoming ",[26,254,255],{},"@iqrar\u002Fotel-exporter"," lets you keep your tracer and add Iqrar by changing one config line.",[10,258,260],{"id":259},"_2-compliance-posture-without-writing-compliance-code","2. Compliance posture without writing compliance code",[15,262,263],{},"Compliance is normally a pile of bespoke conditionals: \"if EU and high-risk, log full input; if UAE and chatbot, show disclosure; if any tier 3, retain X for Y years\". Iqrar moves that out of your code:",[192,265,266,280,290,312],{},[195,267,268,271,272,275,276,279],{},[198,269,270],{},"Tier classification"," is computed from your declared capabilities against the jurisdiction's published ",[26,273,274],{},"tier_classifiers",". You don't write ",[26,277,278],{},"if capability === \"credit_decision\""," branches.",[195,281,282,285,286,289],{},[198,283,284],{},"Obligations"," filter to your tier automatically — ",[26,287,288],{},"iqrar.obligations()"," returns exactly the rules you have to comply with right now.",[195,291,292,295,296,299,300,303,304,307,308,311],{},[198,293,294],{},"Disclosure strings"," are generated from the active ruleset's ",[26,297,298],{},"authority",", ",[26,301,302],{},"jurisdiction_name",", and ",[26,305,306],{},"version"," — ",[26,309,310],{},"iqrar.disclose()"," returns a regulator-quality sentence without you authoring the legal copy.",[195,313,314,317,318,321,322,325],{},[198,315,316],{},"Payload retention"," auto-summarises below Tier 3 and retains full input\u002Foutput at Tier 3+, per the active ruleset's ",[26,319,320],{},"required_logs",". You call ",[26,323,324],{},"iqrar.decision({...})"," once; the SDK chooses the right retention.",[15,327,328],{},"When the regulator updates the ruleset, your agent picks up the change on the next 30-second sync. No redeploy.",[10,330,332],{"id":331},"_3-cross-jurisdiction-with-zero-branching-logic","3. Cross-jurisdiction with zero branching logic",[15,334,335],{},"Configure additional jurisdictions and the SDK fetches, verifies, and merges every supervisory ruleset using a strictest-wins N-way merge.",[19,337,339],{"className":21,"code":338,"language":23,"meta":24,"style":24},"const iqrar = Iqrar({\n  org: \"acme\",\n  jurisdiction: \"EU\",\n  jurisdictions: [\"EU\", \"AE-DIFC\"],\n  capabilities: [\"credit_decision\"],\n});\n",[26,340,341,356,372,387,416,437],{"__ignoreMap":24},[29,342,343,345,347,349,351,353],{"class":31,"line":32},[29,344,77],{"class":76},[29,346,80],{"class":43},[29,348,83],{"class":39},[29,350,44],{"class":86},[29,352,89],{"class":43},[29,354,355],{"class":39},"{\n",[29,357,358,361,363,365,367,369],{"class":31,"line":66},[29,359,360],{"class":95},"  org",[29,362,99],{"class":39},[29,364,53],{"class":39},[29,366,104],{"class":56},[29,368,60],{"class":39},[29,370,371],{"class":39},",\n",[29,373,374,377,379,381,383,385],{"class":31,"line":73},[29,375,376],{"class":95},"  jurisdiction",[29,378,99],{"class":39},[29,380,53],{"class":39},[29,382,119],{"class":56},[29,384,60],{"class":39},[29,386,371],{"class":39},[29,388,389,392,394,396,398,400,402,404,406,409,411,414],{"class":31,"line":152},[29,390,391],{"class":95},"  jurisdictions",[29,393,99],{"class":39},[29,395,131],{"class":43},[29,397,60],{"class":39},[29,399,119],{"class":56},[29,401,60],{"class":39},[29,403,109],{"class":39},[29,405,53],{"class":39},[29,407,408],{"class":56},"AE-DIFC",[29,410,60],{"class":39},[29,412,413],{"class":43},"]",[29,415,371],{"class":39},[29,417,419,422,424,426,428,431,433,435],{"class":31,"line":418},5,[29,420,421],{"class":95},"  capabilities",[29,423,99],{"class":39},[29,425,131],{"class":43},[29,427,60],{"class":39},[29,429,430],{"class":56},"credit_decision",[29,432,60],{"class":39},[29,434,413],{"class":43},[29,436,371],{"class":39},[29,438,440,442,444],{"class":31,"line":439},6,[29,441,144],{"class":39},[29,443,147],{"class":43},[29,445,63],{"class":39},[15,447,448],{},"Your code stays single-jurisdiction; the SDK supervises against the union. If any one bundle fails to verify, the SDK keeps the prior good cache rather than activating a partial set — patent §6.2.",[10,450,452],{"id":451},"_4-hot-rule-changes-without-redeploying","4. Hot rule changes without redeploying",[15,454,455,456,203,459,203,462,203,465,468],{},"A regulator can issue a signed runtime directive — verbosity elevation, sample-rate change, capability pause — and the SDK applies it on the next sync without redeployment. The directive's lifecycle (",[26,457,458],{},"directive.received",[26,460,461],{},".applied",[26,463,464],{},".skipped",[26,466,467],{},".rejected",") is recorded in your agent's audit chain so the SDK-side enforcement decision is itself auditable.",[15,470,471],{},"For your team this means: a supervisory inquiry doesn't require an emergency release. The regulator turns the dial; your agents respond within 60 seconds.",[10,473,475],{"id":474},"_5-cryptographic-audit-trail-by-default","5. Cryptographic audit trail by default",[15,477,478,479,482],{},"Every event the worker accepts is appended to a per-agent tamper-evident hash chain. A cron job builds an RFC 6962 Merkle tree over those entries every minute, signs the root with a foundation key, and submits the signed tree head to ",[198,480,481],{},"Sigstore Rekor"," — a public transparency log Iqrar does not control.",[15,484,485,486,491],{},"For you that means: when a regulator asks \"did you log this?\", the answer is structurally \"yes, here's the inclusion proof, verify it against Rekor yourself.\" You don't have to build that. You don't even have to think about it. See ",[487,488,490],"a",{"href":489},"\u002Fdocs\u002Fconcepts\u002Foverview","Concepts §3"," for the full chain.",[10,493,495],{"id":494},"_6-drop-in-across-every-framework","6. Drop-in across every framework",[15,497,498],{},"The same wrapper works across:",[192,500,501,507,513],{},[195,502,503,506],{},[198,504,505],{},"TypeScript"," — OpenAI, Anthropic, Vercel AI SDK, Mastra, LangChain.js \u002F LangGraph.js (5 first-class adapters)",[195,508,509,512],{},[198,510,511],{},"Python"," — CrewAI, LangChain \u002F LangGraph, OpenAI Agents SDK, AutoGen v0.4 (4 adapters)",[195,514,515,307,518,521,522,526],{},[198,516,517],{},"Anything else",[26,519,520],{},"iqrar.wrap(target)"," proxies any callable or class instance, or hit the ",[487,523,525],{"href":524},"\u002Fdocs\u002Fintegrations\u002Fhttp","HTTP API"," directly",[15,528,529,530,534],{},"See ",[487,531,533],{"href":532},"\u002Fdocs\u002Fintegrations","Integrations"," for the full list. Your call sites stay unchanged regardless of which adapter you use.",[10,536,538],{"id":537},"_7-local-dev-story-that-doesnt-get-in-your-way","7. Local dev story that doesn't get in your way",[192,540,541,547,561,570,579],{},[195,542,543,546],{},[198,544,545],{},"Tarball install"," for early-access integration without npm\u002FPyPI publishing.",[195,548,549,552,553,556,557,560],{},[198,550,551],{},"In-process mocks"," — the test suite shows how to spin a fake Worker via ",[26,554,555],{},"httpx.MockTransport"," (Python) or a custom ",[26,558,559],{},"fetch"," (TS) so unit tests don't need a deployed Worker.",[195,562,563,569],{},[198,564,565,568],{},[26,566,567],{},"auto_sync: false"," by default"," — safe for serverless \u002F Lambda \u002F Cloudflare Workers; long-lived hosts opt in.",[195,571,572,578],{},[198,573,574,577],{},[26,575,576],{},"waitUntil"," integration"," for Cloudflare Workers so queued telemetry survives the isolate's last 500 ms.",[195,580,581,587],{},[198,582,583,586],{},[26,584,585],{},"unref()"," on timers"," so the SDK never keeps a Node\u002FBun process alive past its natural shutdown.",[10,589,591],{"id":590},"_8-llm-and-ai-coding-agent-friendly","8. LLM- and AI-coding-agent-friendly",[192,593,594,602,614],{},[195,595,596,601],{},[198,597,598],{},[26,599,600],{},"apps\u002Fweb\u002Fpublic\u002Fllms-full.txt"," is the canonical architecture document for an LLM to load before integrating.",[195,603,604,609,610,613],{},[198,605,606],{},[26,607,608],{},"packages\u002Fagent\u002FAGENTS.md"," is auto-merged into your ",[26,611,612],{},"CLAUDE.md"," via vibe-rules so a coding agent integrating Iqrar follows the right conventions.",[195,615,616,622],{},[198,617,618,621],{},[26,619,620],{},"\u002Fsdk","'s \"For Coding Agents\" button"," copies the integration skill straight into your AGENTS.md \u002F Cursor rules \u002F Claude Code skill.",[15,624,625],{},"Coding agents — Claude Code, Cursor, Aider, Goose — integrate Iqrar correctly the first time. You don't burn cycles fixing wrong imports or hand-holding patterns.",[10,627,629],{"id":628},"_9-type-safe-narrow-public-surface","9. Type-safe, narrow public surface",[15,631,632,633,299,636,299,639,299,642,299,645,299,648,299,651,299,654,299,657,660],{},"The TS types describe exactly the public API — ",[26,634,635],{},"Iqrar",[26,637,638],{},"IqrarConfig",[26,640,641],{},"DecisionRecord",[26,643,644],{},"HumanReviewRecord",[26,646,647],{},"InvocationContext",[26,649,650],{},"RuleSet",[26,652,653],{},"Obligation",[26,655,656],{},"RiskTier",[26,658,659],{},"Verbosity",". The Python types mirror them with the same names (snake_case). No leaky internals — the SDK protects your build from refactors on our side.",[10,662,664],{"id":663},"_10-nothing-about-the-sdk-is-permanent","10. Nothing about the SDK is permanent",[192,666,667,673,679],{},[195,668,669,672],{},[198,670,671],{},"Open SDK, MIT-licensed"," — fork it, audit it, vendor it.",[195,674,675,678],{},[198,676,677],{},"Documented HTTP wire format"," — three endpoints cover 90% of integrations. If we disappeared tomorrow you could keep the worker running.",[195,680,681,684],{},[198,682,683],{},"Foundation-governed rules"," — the ruleset itself is signed by an authority registry pinned on first boot. Your trust is in cryptography, not in our continued goodwill.",[10,686,688],{"id":687},"whats-next","What's next",[192,690,691,699,705,712,719],{},[195,692,693,694,698],{},"Walk through the ",[487,695,697],{"href":696},"\u002Fdocs\u002Fgetting-started","Getting started"," guide",[195,700,701,702],{},"Pick your stack on the ",[487,703,704],{"href":532},"Integrations overview",[195,706,707,708,711],{},"Read the ",[487,709,710],{"href":489},"Concepts overview"," for the cryptographic primitives",[195,713,714,715],{},"See what regulators see in ",[487,716,718],{"href":717},"\u002Fdocs\u002Ffor-regulators","For regulators",[195,720,721,722],{},"See what your CTO sees in ",[487,723,725],{"href":724},"\u002Fdocs\u002Ffor-companies","For companies",[727,728,729],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":24,"searchDepth":66,"depth":66,"links":731},[732,733,734,735,736,737,738,739,740,741,742,743],{"id":12,"depth":66,"text":13},{"id":183,"depth":66,"text":184},{"id":259,"depth":66,"text":260},{"id":331,"depth":66,"text":332},{"id":451,"depth":66,"text":452},{"id":474,"depth":66,"text":475},{"id":494,"depth":66,"text":495},{"id":537,"depth":66,"text":538},{"id":590,"depth":66,"text":591},{"id":628,"depth":66,"text":629},{"id":663,"depth":66,"text":664},{"id":687,"depth":66,"text":688},"Iqrar gives you free production-grade observability, automatic compliance posture, and a cryptographic audit trail in three lines of code — without writing a custom OTel pipeline, governance code, or audit log.","md",{},{"title":5,"order":418},"\u002Fdocs\u002Ffor-developers",{"title":5,"description":744},"docs\u002Ffor-developers","EiNbtTKQ36tg52piNBYKgYatLz3JvHnJoDLye1JUUZ0",1781253131675]