# Retry-outcome resolution dedup proxy — TextForAgents LLC A timeout is UNKNOWN, not FAILED. A hosted claim-before-execute dedup proxy for side-effecting agent tool calls. ## Start (self-serve, no operator step) 1. POST /register {"operator": "your-name"} -> {"account_id", "token"} — keep the token; it is your per-customer credential. Operator identity is canonicalized (case, whitespace, punctuation, zero-width/format characters, confusable lookalikes and compatibility forms all fold to one identity), so registering again under ANY respelling of the same operator identity returns the existing account and does NOT re-grant the trial; the existing-account response carries no account id and no token. Registration attempts (new and existing identities alike) are rate-bounded, and the per-IP source bound uses the connection's peer address — a forwarded-for header is never trusted unless the deployment explicitly opts in behind a proxy that overwrites it. 2. POST /execute {"tool": "charge_payment", "args": {"invoice_id": "inv-1", "recipient": "vendor@example.com", "amount_cents": 4999, "attempt_id": "uuid-1"}, "scope_fields": ["invoice_id", "recipient", "amount_cents"], "provider_mode": "ok", "supports_status": true} with Authorization: Bearer . The proxy claims the semantic-identity slot BEFORE the effect fires. Fixture provider modes simulate your provider: ok / timeout_after_effect / timeout_before_effect / definitive_failure; supports_status=false models a provider with no status surface (UNKNOWN -> ESCALATED, re-fires refused). 3. Retry semantics: a retry sends a FRESH attempt_id with the same scope fields and payload — the scope_fields declaration is pinned per tool on first use, and a later call declaring a different set is refused rather than minting a second identity. Identity is computed over value meanings, so re-spelled scope values (100 vs 100.0 vs "100", NFC vs NFD strings) are the same operation. A COMMITTED operation returns {"outcome": "replayed", receipt: } and never re-fires (effect_count stays 1). A different payload under the same identity returns outcome "conflict". A timed-out operation resolves by status query: "resolved_committed" (true receipt) or exactly one re-fire on a not_happened verdict ("refired_after_not_happened"). No status surface: outcome "escalated" and every re-fire is refused until POST /resolve closes it with a committed verdict. 4. POST /receipt {"tool", "args", "scope_fields"} returns YOUR stored claim/receipt for an identity (another operator's claims are invisible: not_found). POST /resolve performs the manual status check on an ESCALATED claim. 5. POST /census {"servers": [ {"name": "...", "tools": [{"name": "pay", "write": true, "annotations": {"idempotentHint": true}}], "status_url": "https://.../status"} ]} — guard census over operator-supplied server descriptors (Fleet plan feature; the MCP guard_census tool runs the identical pipeline). SELF_GUARDED_VERIFIED requires a status endpoint the census itself fetched live during the call and found answering 200; a schema hint alone is never safe (CLAIMS_GUARDED_UNVERIFIED), a descriptor's own has_status_endpoint assertion is never taken on trust, and invisible guards read NO_VISIBLE_GUARD. A status_url is fetched only if it resolves to a public address that is not local to the census host (SSRF guard, validated and pinned at fetch time); any other status_url is never fetched and the endpoint counts as not checkable. 6. Billing: the first 100 claims are free, one time per operator; then per-claim $0.001 via x402 (X-PAYMENT header), or included under an active plan — Operator $9/mo (up to 50,000 claimed operations/mo), Fleet $29/mo (up to 500,000 claims/mo + per-server guard census reports). POST /subscribe {"tier": "operator"|"fleet"} with an x402 X-PAYMENT header for $9.00 / $29.00 activates that plan for 30 days. Billing is arbitrated by the claim itself: concurrent duplicates of one claim bill exactly once, and a call against an existing claim never bills — a payment header presented for an existing claim is not settled. A claim whose operation definitive-fails or escalates has consumed its one unit: the per-claim price buys the claim and its outcome resolution, and every retry of that claim is free. When several plans are active the highest tier applies, and a reached plan cap falls through to the trial/x402 waterfall rather than hard-blocking. x402 nonce handling: the authorization nonce is reserved before settlement; if the facilitator definitively refuses the settlement the reservation is released and the same authorization may be presented again; if the settlement outcome is unknown (facilitator unreachable mid-settle) the authorization stays consumed and a fresh authorization is required on retry. 7. MCP: POST /mcp (JSON-RPC) — tools dedup_execute, dedup_receipt, dedup_resolve, guard_census — same account token and billing. 8. Receipt verification: execute responses carry receipt_sig (HMAC under the product's signing key); POST /receipts/verify checks one and GET /verify-key lists accepted key fingerprints (rotation keeps archived keys verifiable) — both require your account token. ## PENDING lease tuning guidance Default lease 300s, resolve-before-takeover, single-winner stale-guarded takeover. Fast calls: 60–300s. Long-running effects: 900–3600s, above the longest legitimate tool call. Never below the tool's own timeout. ## Framework adapters (shipped integrations, source at /adapters/) CrewAI (adapters/crewai_adapter.py): DedupTool, a real crewai BaseTool for the agent's tool list — claims via /execute before the proxied effect fires; retries re-enter with a fresh attempt_id and identical scope fields and consume the stored verdict. LangGraph (adapters/langgraph_adapter.py): make_dedup_node / build_retry_graph — the claim inside the side-effecting node under a RetryPolicy; checkpoint resumes re-enter the same claim. Shared stdlib client: adapters/dedup_client.py. Raw MCP: dedup_execute mirrors the wrapped tool's arguments plus declared scope_fields. Proven end-to-end: a claim executed inside a real CrewAI tool-calling loop and a real LangGraph retry path with the effect firing exactly once. ## Limits Claim states: PENDING / COMMITTED / UNKNOWN / ESCALATED / FAILED_CONFIRMED / NOT_HAPPENED. Verdict meanings: executed / replayed / resolved_committed / refired_after_not_happened / failed_confirmed / in_progress / conflict / escalated / unknown_refused. Support: support@textforagents.com. ## Prices Operator $9/mo per operator · Fleet $29/mo per operator · Per-claim API $0.001/claim (x402). First 100 claims free, one time per operator. No perpetual free tier.