{
  "openapi": "3.0.1",
  "info": {
    "title": "Law Counselor",
    "description": "LangGraph Plan-and-Execute AI agent for legal research using Yutori Scouts and MiniMax-M2.",
    "version": "0.0",
    "x-build-id": "sqRLslaiGfCnnQx2h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thoughtful_uncle~law-counselor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thoughtful_uncle-law-counselor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/thoughtful_uncle~law-counselor/runs": {
      "post": {
        "operationId": "runs-sync-thoughtful_uncle-law-counselor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/thoughtful_uncle~law-counselor/run-sync": {
      "post": {
        "operationId": "run-sync-thoughtful_uncle-law-counselor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "legalQuery"
        ],
        "properties": {
          "legalQuery": {
            "title": "Legal Research Query",
            "type": "string",
            "description": "Natural language description of the legal topic to research. Be specific about jurisdiction, legal area, and time frame. Yutori and MiniMax credentials are configured by the Actor owner via environment variables — they are not part of this form."
          },
          "outputInterval": {
            "title": "Scout Output Interval (seconds)",
            "minimum": 1800,
            "type": "integer",
            "description": "How often each Yutori scout should run. Minimum 1800 (30 min). Default 86400 (daily).",
            "default": 86400
          },
          "maxIterations": {
            "title": "Max Agent Iterations",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum plan-execute cycles the agent runs. Each cycle executes one plan step. Increase if minExecutedSteps requires more passes.",
            "default": 12
          },
          "minPlanSteps": {
            "title": "Minimum Plan Steps",
            "minimum": 3,
            "maximum": 20,
            "type": "integer",
            "description": "Planner will expand the research plan to at least this many delegated steps.",
            "default": 6
          },
          "minExecutedSteps": {
            "title": "Minimum Executed Steps Before Finish",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Replanner cannot emit a final response until this many executor steps have run (unless maxIterations is hit).",
            "default": 5
          },
          "maxToolRounds": {
            "title": "Max Tool Rounds Per Step",
            "minimum": 4,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum tool-calling rounds per executor step. Increase this when scouts need long polling.",
            "default": 20
          },
          "scoutPollIntervalSec": {
            "title": "Scout Poll Interval (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How often to poll Yutori while waiting for scout output.",
            "default": 20
          },
          "scoutMaxWaitSec": {
            "title": "Scout Max Wait (seconds)",
            "minimum": 60,
            "maximum": 3600,
            "type": "integer",
            "description": "Maximum time to wait for scout output per wait call. Use 1500 for ~25 minutes.",
            "default": 1500
          },
          "testingFallbackAfterSec": {
            "title": "Testing Fallback After (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "Testing-only: return estimated fallback output after N seconds (set 120 for 2 minutes). Use 0 to disable.",
            "default": 0
          },
          "scoutId": {
            "title": "Existing Scout ID (optional)",
            "type": "string",
            "description": "UUID of an existing Yutori scout to inspect or interact with. Agent will check this scout first."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}