{
  "version": 1,
  "structures": [],
  "workflows": [
    {
      "name": "order_assistant",
      "description": "Looks up and cancels the signed-in user's orders through Supabase Edge Functions",
      "provider": "openai",
      "model": "gpt-6.1-terra",
      "backups": [{ "provider": "anthropic", "model": "claude-haiku-5-5" }],
      "request_type": "chat",
      "system_instructions": "You help customers with their orders. Use get_order to look an order up before you answer anything about it. Use cancel_order only when the customer asks to cancel, and only after looking the order up. If a tool fails, say so plainly and don't guess.",
      "hosted_tools": {
        "enabled": true,
        "max_rounds": 5,
        "max_calls": 8,
        "deadline_ms": 120000,
        "approval_timeout_ms": 600000,
        "tools": [
          {
            "name": "get_order",
            "description": "Looks up one of the signed-in user's orders by its order number: status, total, when it was placed and how many items it has.",
            "progress_label": "Looking up your order…",
            "parameters": {
              "type": "object",
              "properties": {
                "order_number": { "type": "string", "description": "The order number, for example 1041" }
              },
              "required": ["order_number"],
              "additionalProperties": false
            },
            "endpoint_url": "https://your-project-ref.supabase.co/functions/v1/modelriver-tools",
            "timeout_ms": 10000,
            "effect": "read",
            "enabled": true
          },
          {
            "name": "cancel_order",
            "description": "Cancels one of the signed-in user's orders by its order number. Only orders that haven't shipped can be cancelled. Look the order up first.",
            "progress_label": "Cancelling your order…",
            "parameters": {
              "type": "object",
              "properties": {
                "order_number": { "type": "string", "description": "The order number, for example 1041" }
              },
              "required": ["order_number"],
              "additionalProperties": false
            },
            "endpoint_url": "https://your-project-ref.supabase.co/functions/v1/modelriver-tools",
            "timeout_ms": 10000,
            "effect": "write",
            "enabled": true,
            "approval_prompt": "Cancel this order? This can't be undone.",
            "approval_fields": ["order_number"]
          }
        ]
      }
    }
  ]
}
