> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lumina-org.com/llms.txt
> Use this file to discover all available pages before exploring further.

# For AI agents

> Why Lumina is built agent-first, and the integration patterns most agents use.

This section is for the LLM-driven trading bots, monitoring agents, and
strategy engines that integrate Lumina.

If you're a human trying to buy a policy through a UI, head to
[lumina-org.com/app](https://www.lumina-org.com/app) instead — these pages
assume you're writing code.

## Why Lumina is agent-first

Most DeFi insurance protocols were built for humans clicking a UI. Lumina
inverts that — every primitive is designed to be hit programmatically by
an autonomous process with no human in the loop.

| Property                           | What it means for an agent                                                                                                                                                                                             |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pure HTTP purchase path**        | One `POST /api/v1/policies` call buys cover end-to-end. No transaction signing, no nonce management, no on-chain encoding in the agent.                                                                                |
| **Relayer-paid gas**               | The relayer wallet (`0x06b1C5117591e2663bD83A66589165505f313c83`) submits every transaction. Your wallet needs USDC for the premium and *nothing else* — no Base mainnet ETH except the one-time onboarding signature. |
| **TypeScript SDK with full types** | `@lumina-org/sdk@^0.6.0` ships first-class types for products, policies, bonds, marketplace listings, webhooks, and the sandbox. Auto-resolves `productId` hash + per-shield `asset` from `productName`.               |
| **OpenAPI 3.0.3 spec**             | Every endpoint has a machine-readable schema at `/openapi.json`. Generate clients in any language; feed it to an LLM for prompt-time tool definitions.                                                                 |
| **No-wallet sandbox**              | `POST /sandbox/try` lets an LLM buy a real Base mainnet policy with zero setup — relayer pays both gas and premium. See [Sandbox-first](/agents/sandbox-first).                                                        |
| **Idempotent writes**              | Every mutating call accepts an `Idempotency-Key` header. Safe to retry on network blips without double-spending.                                                                                                       |
| **Self-service API keys**          | Mint a key by signing a message — no human admin in the loop. Up to 3 active keys per wallet.                                                                                                                          |

## The six things every agent does

| Need                       | Endpoint / SDK                                                             |
| -------------------------- | -------------------------------------------------------------------------- |
| First contact, zero wallet | `lumina.sandbox.try()` — see [Sandbox-first](/agents/sandbox-first)        |
| Mint an API key            | `lumina.agent.onboard(signer)` — see [Onboarding](/agents/onboarding)      |
| Buy a policy               | `lumina.policies.purchase(...)` — see [First policy](/agents/first-policy) |
| Watch for triggers         | `lumina.webhooks.create(...)` — see [Webhooks](/agents/webhooks)           |
| Read your bond positions   | `lumina.bonds.list()` — see [Monitor bonds](/agents/monitor-bonds)         |
| Trade bonds                | `lumina.marketplace.listings(...)` — see [Strategies](/agents/strategies)  |

## Canonical environment

| Field           | Value                                               |
| --------------- | --------------------------------------------------- |
| API base URL    | `https://lumina-api-production-ac85.up.railway.app` |
| ChainID         | `8453` (Base mainnet)                               |
| SDK             | `@lumina-org/sdk@^0.6.0`                            |
| Relayer wallet  | `0x06b1C5117591e2663bD83A66589165505f313c83`        |
| Active products | 6 (3 BTC + 3 ETH, durations 1h / 24h / 48h)         |

`/health` is canonical for every contract address. Hit it once on boot,
cache for the lifetime of your process — never hardcode addresses in source.
