# tryx402 — Developer Documentation & Agent Integration Portal
> Official developer documentation, API contracts, MCP server guides, and spend governance for AI agents.

Canonical Website: https://www.tryx402.app/
Developer Documentation: https://www.tryx402.app/docs
Agent Authentication Protocol: https://www.tryx402.app/auth.md
Agent Guide (Full): https://www.tryx402.app/llms-full.txt
Agent Index: https://www.tryx402.app/llms.txt
A2A Agent Card: https://www.tryx402.app/.well-known/agent.json
ARD Catalog: https://www.tryx402.app/.well-known/agentic-resources.json
OAuth 2.0 Protected Resource: https://www.tryx402.app/.well-known/oauth-protected-resource
OAuth 2.0 Auth Server: https://www.tryx402.app/.well-known/oauth-authorization-server
MCP Server Streamable HTTP: https://www.tryx402.app/api/mcp
MCP Server Card: https://www.tryx402.app/.well-known/mcp/server-card.json
OpenAPI 3.1 Spec: https://www.tryx402.app/openapi.json
Pricing Catalog: https://www.tryx402.app/api/pricing
PyPI Package: https://pypi.org/project/tryx402/
GitHub Repository: https://github.com/crypto-yannso/tryx402

---

## 0. API Versioning & Deprecation Policy
- **Versioning Scheme**: Path versioning (`/api/v1/...`). Current active version: `v1`.
- **Deprecation Signals**: Scheduled deprecations emit the RFC 8594 `Sunset` header (`Sunset: Wed, 01 Sep 2027 00:00:00 GMT`) and `Link: <...>; rel="deprecation"`.
- **Stability Guarantee**: Minimum 12-month overlap before retiring any stable major endpoint version.

---

## 1. What is tryx402?
tryx402 is an execution and budget governance gateway between autonomous AI agents and paid HTTP 402 / x402 endpoints.

## 2. Why do agents need a budget layer?
Native x402 clients pay per HTTP request without spending ceilings. A loop error will drain a crypto balance. tryx402 intercepts the HTTP 402 `maxAmountRequired` challenge and verifies that `current_spend + cost <= max_budget` before authorizing signatures.

## 3. Interfaces & Zero-Config Setup
Agents can connect via:
- Zero-Dependency MCP Server: `python3 -m tryx402.mcp_server`
- Python Gateway SDK: `from tryx402 import Gateway`
- Local CLI Wrapper: `python3 -m gateway.cli`

## 4. Four Core Guarantees
1. Hard budget limits enforced prior to signing.
2. Idempotency keys prevent double charges on retried timeouts.
3. Structured cost ledgers exported in JSON by origin and project.
4. Fiat re-charging via Stripe Checkout in EUR/GBP/USD without holding crypto.
