{
  "openapi": "3.0.1",
  "info": {
    "title": "Zentra Tool Firewall",
    "description": "Gate AI agent tool calls before they run with policy, budget, permission, connector-scope, and side-effect decisions.",
    "version": "1.0",
    "x-build-id": "OE163hnd8C031P0AX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zentrafoundry~zentra-agentops-tool-firewall/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zentrafoundry-zentra-agentops-tool-firewall",
        "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/zentrafoundry~zentra-agentops-tool-firewall/runs": {
      "post": {
        "operationId": "runs-sync-zentrafoundry-zentra-agentops-tool-firewall",
        "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/zentrafoundry~zentra-agentops-tool-firewall/run-sync": {
      "post": {
        "operationId": "run-sync-zentrafoundry-zentra-agentops-tool-firewall",
        "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",
        "properties": {
          "sourceMode": {
            "title": "Source mode",
            "enum": [
              "sample",
              "startUrls"
            ],
            "type": "string",
            "description": "Choose whether to run the built-in sample or process buyer-supplied sources.",
            "default": "sample"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional public URLs used as context for buyer-supplied runs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Public page or API documentation URL used as run context."
                },
                "userData": {
                  "type": "object",
                  "title": "User data",
                  "description": "Optional source metadata attached to this URL."
                }
              }
            },
            "default": [
              {
                "url": "https://zentraforge.store",
                "sourceId": "AGENTOPS-SUITE",
                "userData": {
                  "sourceId": "AGENTOPS-SUITE"
                }
              },
              {
                "url": "https://docs.apify.com/platform/actors/publishing",
                "sourceId": "APIFY-PUBLISH",
                "userData": {
                  "sourceId": "APIFY-PUBLISH"
                }
              },
              {
                "url": "https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event",
                "sourceId": "APIFY-PPE",
                "userData": {
                  "sourceId": "APIFY-PPE"
                }
              }
            ]
          },
          "maxItems": {
            "title": "Maximum dataset items",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum default dataset items to produce.",
            "default": 1
          },
          "sourceIds": {
            "title": "Source IDs",
            "type": "array",
            "description": "Optional source identifiers shown in output evidence.",
            "default": [
              "AGENTOPS-SUITE",
              "APIFY-PPE"
            ],
            "items": {
              "type": "string"
            }
          },
          "pricingEvents": {
            "title": "Pricing events",
            "type": "array",
            "description": "Optional visible pricing event names for the run report.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sinceLastRun": {
            "title": "Only new records",
            "type": "boolean",
            "description": "Use Actor state to skip records whose dedupe keys were saved by earlier runs.",
            "default": false
          },
          "watchlistTerms": {
            "title": "Watchlist terms",
            "type": "array",
            "description": "Optional buyer terms used to explain matches and recurring monitoring.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional endpoint that receives a compact completion alert for scheduled runs."
          },
          "includeSourceUrls": {
            "title": "Include source URLs",
            "type": "boolean",
            "description": "Include source URL evidence in dataset output.",
            "default": true
          },
          "includeMatchReasons": {
            "title": "Include match reasons",
            "type": "boolean",
            "description": "Include score reasons and buyer-value explanations in dataset output.",
            "default": true
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "sample-records",
              "buyer-ready-records"
            ],
            "type": "string",
            "description": "Choose the output shape for default Store runs.",
            "default": "sample-records"
          },
          "actorSlug": {
            "title": "Actor slug",
            "type": "string",
            "description": "Optional actor slug echoed in run reports.",
            "default": "zentra-agentops-tool-firewall"
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "When enabled, produce output and a would-charge ledger without calling Apify charge events.",
            "default": false
          },
          "maxArtifacts": {
            "title": "Maximum artifacts",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum number of buyer-value artifacts to generate in this run.",
            "default": 1
          },
          "agentGoal": {
            "title": "Agent goal",
            "type": "string",
            "description": "Goal, workflow, or buyer outcome the actor should protect or improve.",
            "default": "Stop unsafe and wasteful tool calls before they burn agent budget."
          },
          "businessPurpose": {
            "title": "Business purpose",
            "type": "string",
            "description": "Why the agent, actor, workflow, connector, or dataset is being evaluated.",
            "default": "Prevent unsafe or low-ROI tool calls."
          },
          "context": {
            "title": "Context",
            "type": "object",
            "description": "Optional actor-specific fields such as tool calls, budgets, connector manifests, logs, dataset references, or listing copy."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}