# Pathmend (v0.2.0) - Self-Healing Web Action & Live Structured State Index > Pathmend turns fragile, changing live websites and login-gated B2B portals into deterministic, schema-validated JSON APIs for AI agents and developers. Every self-healed DOM selector or anti-bot egress escalation writes back to a tenant-isolated Action Graph so subsequent calls execute on the fast path. ## Quickstart (Self-Serve Account or Zero-Signup Agent Key) 1. Sign up for a persistent account (500 starter credits + named API keys) OR provision an instant agent key (250 credits, 500 with email): - Account Signup: POST https://pathmend.com/v1/auth/signup Content-Type: application/json {"email": "ops@acme.com", "password": "your-strong-password", "workspaceName": "Acme Agent Fleet"} - Zero-Browser Agent Provisioning: POST https://pathmend.com/v1/tenants/provision Content-Type: application/json {"name": "my-agent-fleet", "email": "ops@acme.com"} 2. Auto-draft & save a self-healing ActionBlueprint from any public URL (2 credits): POST https://pathmend.com/v1/blueprints/draft Authorization: Bearer pm_live_... Content-Type: application/json {"url": "https://example.com", "blueprintKey": "example.page_overview", "save": true} 3. Query the Sub-15ms Live Structured State Index (4 credits live refresh, 1 credit SQLite WAL cache hit): POST https://pathmend.com/v1/state/query Authorization: Bearer pm_live_... Content-Type: application/json {"blueprintKey": "example.page_overview", "maxAgeSeconds": 60} 4. Execute a Self-Healing Web Action with Post-Condition Verification (5 credits fast-path, 15 credits self-healed): POST https://pathmend.com/v1/actions/execute Authorization: Bearer pm_live_... Content-Type: application/json { "blueprintKey": "meridian.submit_rfq", "input": {"sku": "TI-6AL4V-PLATE", "quantity": 25, "buyerNote": "Priority lot"} } 5. Upload AES-256-GCM Encrypted Cookie / StorageState Profile for Login-Gated Portals: POST https://pathmend.com/v1/sessions Authorization: Bearer pm_live_... Content-Type: application/json {"name": "Supplier Portal Session", "siteDomain": "portal.supplier.com", "storageState": {"cookies": [], "origins": []}} ## CLI, TypeScript SDK & MCP Server - TypeScript SDK: `npm install pathmend` -> `import { PathmendClient } from 'pathmend'` - CLI Quickstart: - `npx pathmend signup --email ops@acme.com --password ...` (or `npx pathmend provision`) - `npx pathmend draft https://example.com --key example.overview` - `npx pathmend state example.overview` - `npx pathmend exec meridian.submit_rfq --input '{"sku":"TI-6AL4V-PLATE","quantity":10}'` - MCP Server (Cursor / Claude Code / Windsurf): `npx -y @pathmend/mcp-server` Tools: `pathmend_draft_blueprint`, `pathmend_query_state`, `pathmend_execute_action`, `pathmend_get_workspace`, `pathmend_list_blueprints`, `pathmend_upsert_blueprint`, `pathmend_delete_blueprint`, `pathmend_list_sessions`, `pathmend_list_traces`, `pathmend_get_healing_events` - Documentation: https://pathmend.com/docs - Customer Workspace: https://pathmend.com/dashboard - Interactive Chaos Lab: https://pathmend.com/console - OpenAPI 3.1 Spec: https://pathmend.com/openapi.json ## Metered Credit Economics & HTTP Status Codes - Cached Structured State Index Hit (<15ms): 1 credit - Auto-Draft Blueprint from Live URL: 2 credits - Live State Index Refresh: 4 credits - Fast-Path Web Action Execution: 5 credits - Self-Healed Action + Graph Write-Back: 15 credits - Failed Execution or Expired Session (424): 0 credits Error Codes: - `400 ValidationError` / `BlockedTargetUrl` (SSRF or domain mismatch blocked) - `401 Unauthorized` (missing or revoked API key / session) - `402 InsufficientCredits` (includes `upgradeUrl` to top up or subscribe) - `403 Forbidden` (cross-tenant access or missing `X-Pathmend-Csrf: 1` on cookie mutations) - `404 NotFound` (blueprint, session, key, or trace not found) - `409 Conflict` (account email already exists or workspace already claimed) - `424 SessionExpired` (target portal redirected to login; re-upload cookies in Session Vault) - `429 RateLimitExceeded` (check `Retry-After` header)