{
  "agentsJson": "0.1.0",
  "info": {
    "title": "Rotomal catalog",
    "version": "1.0.0",
    "description": "Find the right Rotomal product for a task and read its plans, prices and FAQ."
  },
  "sources": [
    {
      "id": "catalog",
      "path": "https://rotomal.com/openapi.json"
    }
  ],
  "flows": [
    {
      "id": "find_product",
      "title": "Find a product for a task",
      "description": "Search the catalog with the user's words, then read the best match in full.",
      "actions": [
        {
          "id": "search",
          "sourceId": "catalog",
          "operationId": "searchProducts"
        },
        {
          "id": "details",
          "sourceId": "catalog",
          "operationId": "getProduct"
        }
      ],
      "links": [
        {
          "origin": {
            "actionId": "search",
            "fieldPath": "responses.success.results[0].slug"
          },
          "target": {
            "actionId": "details",
            "fieldPath": "parameters.slug"
          }
        }
      ],
      "fields": {
        "parameters": [
          {
            "name": "q",
            "type": "string",
            "required": true,
            "description": "What the user needs done"
          }
        ],
        "responses": {
          "success": {
            "type": "object"
          }
        }
      }
    },
    {
      "id": "read_guide",
      "title": "Read a guide",
      "description": "Read one answer-first guide with sources.",
      "actions": [
        {
          "id": "guide",
          "sourceId": "catalog",
          "operationId": "getGuide"
        }
      ],
      "fields": {
        "parameters": [
          {
            "name": "slug",
            "type": "string",
            "required": true
          },
          {
            "name": "guide",
            "type": "string",
            "required": true
          }
        ],
        "responses": {
          "success": {
            "type": "object"
          }
        }
      }
    }
  ]
}
