---
name: juridex-statutes
description: Query authoritative, release-pinned U.S. state statute text (Florida and North
  Carolina estate/trust/probate/guardianship/POA law) through the Juridex statutes API. Use
  when an agent needs exact statutory text, citations with edition pins, or jurisdiction-scoped
  retrieval for legal-adjacent tasks.
---

# Juridex statutes API — agent skill

Retrieval over `statutes-corpus`'s evidence-chained system of record. Every response is pinned
to a `releaseKey` — an immutable edition hash. Treat statute text as trustworthy **only with
its pin**: `citation + releaseKey` identifies the exact edition of the exact section.

## Endpoint

```
POST /api/query                       # same-origin proxy (this demo app, browser-safe)
```

Direct API (requires a first-party service token — not distributed publicly):

```
POST https://api.juridex.esq/v1/query
Authorization: Bearer <INTERNAL_SERVICE_TOKEN>
```

Request body (JSON):

| field | type | notes |
|---|---|---|
| `query` | string, required | free text, a bare citation (`"732.502"`), or natural language |
| `jurisdiction` | string, **required** | `us-fl`, `us-nc`. Scope is enforced server-side on the fused result (verified live 2026-11-27); unscoped requests are rejected `400` per the `required-jurisdiction` contract (deployed 2026-11-28, version `29f25431`). Still discard out-of-scope hits yourself as defense-in-depth. |
| `practice_area` | string, optional | e.g. `probate`, `trusts`, `guardianship`, `powers-of-attorney`, `notary`, `real-property` |
| `limit` | int 1–100, optional | default 10 |

## Response

`{ "hits": [ { citation, citationKey, heading, chunkText, sourceURL, jurisdiction,
practiceArea, releaseKey, score } ] }`

- `citation` is pre-formatted (`Fla. Stat. § 732.502`, `N.C. Gen. Stat. § 28A-6`).
- Hybrid retrieval (FTS + embeddings, RRF-fused) — one endpoint, no modes to choose.
- Sections larger than 30k chars arrive as `citationKey` parts (`733.817:1` in raw ids);
  citation display stays un-parted.
- Errors: `401 invalid_authorization` · `400 invalid_request` · `503 corpus_unavailable`
  (no release published — retry later, it means "not ready", not "no answers").

## Example calls

```bash
BASE=https://ask.juridex.esq   # the demo's production origin (this app)

# exact citation lookup
curl -s -X POST $BASE/api/query -H 'content-type: application/json' \
  -d '{"query": "732.502", "jurisdiction": "us-fl"}'

# natural-language, jurisdiction-scoped
curl -s -X POST $BASE/api/query -H 'content-type: application/json' \
  -d '{"query": "who may an incapacitated adult\u2019s family ask to be guardian", "jurisdiction": "us-fl", "practice_area": "guardianship"}'

# NC probate
curl -s -X POST $BASE/api/query -H 'content-type: application/json' \
  -d '{"query": "assets of the estate available for debts and claims", "jurisdiction": "us-nc"}'
```

## Coverage

Live (since 2026-11-27) — no inference needed:

```
GET /api/jurisdictions            -> [{ jurisdiction, releaseKey, publishedAt, practiceAreas, sectionCount }]
GET /api/jurisdictions/us-fl/sections?limit=200[&cursor=…]
```

(the app's same-origin proxies for `juridex-statutes-api`'s coverage endpoints — see
`functions/api/jurisdictions.js` + `functions/api/jurisdictions/[jur]/sections.js`). Current
ground truth: **us-fl 725 sections** (726 chunks incl.
one 2-part partition) across trusts, banking-adjacent fiduciary, POA, probate, guardianship,
health-care advance directives; **us-nc 363 sections** across notary, probate, POA; both
pinned to `sc-release-v1-8c3a3372c361fd8b`. Prefer these over any hardcoded list.

## Rules for agents

1. **Never cite without the pin.** Quote text as of `releaseKey`; if the pin changed since you
   cached it, re-fetch.
2. **No hits is not "no law".** An empty result means only "nothing matched this query, these
   filters, this limit". The corpus covers enrolled chapters only; wording, filters, or
   `limit` can omit an enrolled section, and non-enrolled topics are simply absent. Never
   state that a statute does not exist.
3. **Jurisdiction boundaries are load-bearing.** Always pass `jurisdiction`; state statutes
   differ substantively (e.g. NC intestate shares ≠ FL).
4. **This API explains law; it does not advise.** Output of this corpus is for grounding, and
   any consumer-facing use keeps the not-legal-advice framing.
5. **`sourceURL` is the public authoritative page** (flsenate.gov / ncleg.gov) — link it when
   your UI can.
