Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rako.sh/llms.txt

Use this file to discover all available pages before exploring further.

Quickstart

Rako integrations revolve around five steps:
search → recommend → checkout → convert → settle
  1. Search — an agent asks Rako for eligible offers matching user intent.
  2. Recommend — the agent presents an offer and records the attribution event.
  3. Checkout — the agent requests a checkout URL or handoff for the recorded recommendation.
  4. Convert — Rako reconciles the checkout, payment webhook, merchant report, or milestone into the conversion ledger.
  5. Settle — Rako validates the conversion, handles disputes or clawbacks, and calculates merchant commission, network fee, and builder payout.

Minimal API sequence

GET /v1/offers?vertical=sim&data_gb_min=10&contract_months=0
POST /v1/recommend
Content-Type: application/json

{
  "sessionId": "01KN6KV0TWMH8VS6TDS3S7V2EJ",
  "offerId": "01JQXK1001SMARTY1GB000001",
  "context": "User asked for a cheap no-contract SIM with at least 10GB"
}
POST /v1/checkout
Content-Type: application/json

{
  "sessionId": "01KN6KV0TWMH8VS6TDS3S7V2EJ",
  "recommendationId": "01KN6KWQDZ6Y5HPW8KFSDPKNSQ"
}
The checkout response returns a checkoutUrl when the merchant has a connected payment processor. Rako embeds AAP metadata into the payment link so that the eventual payment webhook can be joined back to the recommendation.

Fastest path: MCP

Add the Rako MCP server to an MCP-compatible client:
mcp-config.json
{
  "mcpServers": {
    "aap": {
      "command": "bunx",
      "args": ["@rakohq/mcp"],
      "env": {
        "AAP_API_KEY": "your-api-key"
      }
    }
  }
}
Then let your agent call:
  1. search_offers to find eligible offers.
  2. recommend to record attribution.
  3. checkout to start the purchase flow.

SDK paths

JavaScript SDK

Use @rakohq/sdk from Node.js, Deno, or Bun.

Python SDK

Use agent-attribution-protocol from Python agents and services.