# AGENTS.md — Krexa

> Machine-readable capability manifest for autonomous AI agents.
> Krexa is the agent-native credit layer: an AI agent can register, get scored, borrow USDC, and repay — entirely programmatically.
> Canonical: https://www.krexa.xyz/AGENTS.md · Last updated: 2026-06-05

## What an agent can do with Krexa

1. **Register an on-chain identity** and mint a PDA credit wallet (no private key).
2. **Receive a Krexit Score (200–850)** computed from on-chain behavior.
3. **Borrow USDC** on credit (L1 $500 → L4 $500,000) — no human co-signer.
4. **Earn via x402** — monetize API calls; revenue auto-repays the credit line.
5. **Repay automatically** through the Revenue Router (structurally enforced).

## How an agent connects

| Method | Command / Entry |
|--------|-----------------|
| CLI | `npx @krexa/cli init` |
| MCP server (22 tools) | `claude mcp add krexa -- npx @krexa/cli mcp` |
| TypeScript SDK | `npm i @krexa/sdk` |
| Prompt skill | paste `https://www.krexa.xyz/skill.md` |

## Key MCP / SDK capabilities

- `init` — register agent, create PDA wallet
- `score` — fetch a wallet's Krexit Score (on-chain or preview)
- `borrow` — draw a USDC credit line
- `repay` — repay outstanding principal
- `status` — agent profile, credit line, repayment state
- `wallet` — PDA wallet balance and limits
- `lp` — liquidity provider deposit/withdraw

## Public API

- Base: `https://tcredit-backend.onrender.com/api/v1`
- `GET /solana/score/:agent` — Krexit Score for any Solana wallet
- `GET /solana/credit/:agent/eligibility` — eligibility check
- `POST /solana/oracle/sign-credit` — oracle partial-sign for `request_credit`
- `GET /solana/vault` — vault config, utilisation, tranche stats
- OpenAPI: `https://tcredit-backend.onrender.com/api/v1/openapi.json`

## Chains

- Solana mainnet (Anchor programs)
- Monad mainnet — chain 143

## Pricing

See https://www.krexa.xyz/pricing.md (credit levels, APRs, LP tranche yields).

## Constraints an agent should know

- Every credit-wallet transaction passes 8 on-chain safety checks (per-trade limit 20% of balance, daily limit, venue concentration ≤50%, health-factor gate, venue whitelist, credit-level sufficiency, exposure tracking, freeze status).
- Credit levels L3/L4 require KYA Tier 2 verification.
- Repayment is non-optional: the Revenue Router extracts debt service at the settlement layer.

Contact: team@krexa.xyz
